summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-04-30 13:28:41 +0000
committerJeremy Allison <jra@samba.org>2002-04-30 13:28:41 +0000
commitd04b55f2186fb8af998cf61c576771a5f72f4892 (patch)
tree9ff8c3a7cf34cefc0ee9a550a3bb1236a9e77595
parent73267ca42d9eddabb71b31b4c5068ebbe7bc9f7c (diff)
downloadsamba-d04b55f2186fb8af998cf61c576771a5f72f4892.tar.gz
samba-d04b55f2186fb8af998cf61c576771a5f72f4892.tar.xz
samba-d04b55f2186fb8af998cf61c576771a5f72f4892.zip
Start of merge to 2_2_RELEASE branch for release.
Jeremy.
-rw-r--r--Manifest15
-rw-r--r--README2
-rw-r--r--docs/OID/allocated-arcs.txt4
-rw-r--r--docs/Registry/WinXP_SignOrSeal.reg20
-rw-r--r--docs/Samba-HOWTO-Collection.pdf4407
-rw-r--r--docs/docbook/manpages/nmbd.8.sgml9
-rw-r--r--docs/docbook/manpages/rpcclient.1.sgml2
-rw-r--r--docs/docbook/manpages/smb.conf.5.sgml116
-rw-r--r--docs/docbook/manpages/smbcontrol.1.sgml21
-rw-r--r--docs/docbook/manpages/smbd.8.sgml4
-rw-r--r--docs/docbook/manpages/smbpasswd.8.sgml371
-rw-r--r--docs/docbook/projdoc/Samba-BDC-HOWTO.sgml2
-rw-r--r--docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml2
-rw-r--r--docs/docbook/projdoc/printer_driver2.sgml6
-rw-r--r--docs/docbook/projdoc/samba-doc.sgml9
-rw-r--r--docs/htmldocs/Samba-BDC-HOWTO.html4
-rw-r--r--docs/htmldocs/Samba-HOWTO-Collection.html596
-rw-r--r--docs/htmldocs/Samba-LDAP-HOWTO.html2
-rw-r--r--docs/htmldocs/nmbd.8.html24
-rw-r--r--docs/htmldocs/printer_driver2.html6
-rw-r--r--docs/htmldocs/rpcclient.1.html2
-rw-r--r--docs/htmldocs/smb.conf.5.html302
-rw-r--r--docs/htmldocs/smbcontrol.1.html36
-rw-r--r--docs/htmldocs/smbd.8.html27
-rw-r--r--docs/htmldocs/smbpasswd.8.html533
-rw-r--r--docs/manpages/nmbd.810
-rw-r--r--docs/manpages/rpcclient.14
-rw-r--r--docs/manpages/smb.conf.5135
-rw-r--r--docs/manpages/smbcontrol.123
-rw-r--r--docs/manpages/smbd.86
-rw-r--r--docs/manpages/smbpasswd.8292
-rw-r--r--examples/LDAP/samba.schema12
-rw-r--r--examples/VFS/Makefile2
-rw-r--r--examples/VFS/README4
-rw-r--r--examples/VFS/audit.c130
-rw-r--r--examples/VFS/block/Makefile4
-rw-r--r--examples/VFS/block/block.c208
-rw-r--r--examples/VFS/skel.c344
-rwxr-xr-xexamples/printing/smbprint104
-rwxr-xr-xpackaging/Caldera/OpenLinux/samba.init-lsb3
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl29
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl25
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-team.tmpl30
-rwxr-xr-xpackaging/Caldera/OpenServer/Compile14
-rwxr-xr-xpackaging/Caldera/OpenServer/Configure7
-rwxr-xr-xpackaging/Caldera/OpenServer/Install10
-rw-r--r--packaging/Caldera/OpenServer/README19
-rw-r--r--packaging/Caldera/OpenServer/docview.html21
-rwxr-xr-xpackaging/Caldera/OpenServer/findsmb17
-rwxr-xr-xpackaging/Caldera/OpenServer/initconfig4
-rw-r--r--packaging/Caldera/OpenServer/pkg/cdmt.config2
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/cntl/ccs91
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/cntl/cqs53
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs12
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/Samba.pkg71
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg35
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg48
-rw-r--r--packaging/Caldera/OpenServer/smb.conf2
-rwxr-xr-xpackaging/Caldera/OpenServer/smb.init23
-rwxr-xr-xpackaging/Caldera/OpenServer/smb.mkdev6
-rwxr-xr-xpackaging/Caldera/OpenServer/smbadduser4
-rwxr-xr-xpackaging/Caldera/OpenServer/smbprint4
-rwxr-xr-xpackaging/Caldera/UnixWare/Compile44
-rwxr-xr-xpackaging/Caldera/UnixWare/Configure30
-rwxr-xr-xpackaging/Caldera/UnixWare/Install5
-rw-r--r--packaging/Caldera/UnixWare/pkg/pkginfo7
-rwxr-xr-xpackaging/Caldera/UnixWare/pkg/postinstall6
-rw-r--r--packaging/Caldera/UnixWare/pkg/prototype593
-rwxr-xr-xpackaging/Caldera/UnixWare/smb.init2
-rw-r--r--packaging/Mandrake/makerpms.sh.tmpl47
-rw-r--r--packaging/Mandrake/samba2.spec.tmpl692
-rwxr-xr-xpackaging/Mandrake/smb.init2
-rw-r--r--packaging/RedHat/samba2.spec.tmpl4
-rwxr-xr-xpackaging/SGI/idb.pl23
-rwxr-xr-xpackaging/SGI/mkrelease.sh7
-rw-r--r--packaging/SGI/samba.rc35
-rw-r--r--packaging/SGI/smb.conf3
-rw-r--r--source/Makefile.in153
-rw-r--r--source/acconfig.h34
-rw-r--r--source/aclocal.m42
-rw-r--r--source/bin/.cvsignore5
-rw-r--r--source/client/client.c14
-rw-r--r--source/client/clitar.c2
-rw-r--r--source/client/smbmount.c15
-rw-r--r--source/client/smbspool.c3
-rwxr-xr-xsource/configure20360
-rw-r--r--source/configure.in228
-rw-r--r--source/include/byteorder.h2
-rw-r--r--source/include/config.h.in64
-rw-r--r--source/include/doserr.h4
-rw-r--r--source/include/includes.h48
-rw-r--r--source/include/kanji.h108
-rw-r--r--source/include/messages.h4
-rw-r--r--source/include/msdfs.h25
-rw-r--r--source/include/nterr.h7
-rw-r--r--source/include/printing.h12
-rw-r--r--source/include/proto.h1101
-rw-r--r--source/include/rpc_lsa.h120
-rw-r--r--source/include/rpc_secdes.h7
-rwxr-xr-xsource/include/rpc_spoolss.h143
-rw-r--r--source/include/rpc_srvsvc.h59
-rw-r--r--source/include/safe_string.h8
-rw-r--r--source/include/secrets.h29
-rw-r--r--source/include/smb.h53
-rw-r--r--source/include/smb_macros.h18
-rw-r--r--source/include/talloc.h43
-rw-r--r--source/include/version.h2
-rw-r--r--source/include/vfs.h61
-rw-r--r--source/lib/access.c12
-rw-r--r--source/lib/charcnv.c174
-rw-r--r--source/lib/debug.c21
-rw-r--r--source/lib/interface.c9
-rw-r--r--source/lib/kanji.c349
-rw-r--r--source/lib/messages.c128
-rw-r--r--source/lib/pidfile.c6
-rw-r--r--source/lib/replace.c42
-rw-r--r--source/lib/snprintf.c34
-rw-r--r--source/lib/substitute.c17
-rw-r--r--source/lib/sysacls.c4
-rw-r--r--source/lib/system.c134
-rw-r--r--source/lib/talloc.c354
-rw-r--r--source/lib/username.c16
-rw-r--r--source/lib/util.c206
-rw-r--r--source/lib/util_file.c5
-rw-r--r--source/lib/util_seaccess.c27
-rw-r--r--source/lib/util_sec.c2
-rw-r--r--source/lib/util_sid.c163
-rw-r--r--source/lib/util_sock.c361
-rw-r--r--source/lib/util_str.c95
-rw-r--r--source/lib/util_unistr.c46
-rw-r--r--source/lib/wins_srv.c6
-rw-r--r--source/libsmb/cli_dfs.c3
-rw-r--r--source/libsmb/cli_lsarpc.c314
-rw-r--r--source/libsmb/cli_netlogon.c222
-rw-r--r--source/libsmb/cli_reg.c3
-rw-r--r--source/libsmb/cli_samr.c176
-rw-r--r--source/libsmb/cli_spoolss.c1258
-rw-r--r--source/libsmb/cli_srvsvc.c5
-rw-r--r--source/libsmb/cliconnect.c192
-rw-r--r--source/libsmb/clidgram.c2
-rw-r--r--source/libsmb/clientgen.c4
-rw-r--r--source/libsmb/clierror.c6
-rw-r--r--source/libsmb/clifile.c58
-rw-r--r--source/libsmb/clirap.c8
-rw-r--r--source/libsmb/clireadwrite.c11
-rw-r--r--source/libsmb/clispnego.c13
-rw-r--r--source/libsmb/clistr.c6
-rw-r--r--source/libsmb/credentials.c8
-rw-r--r--source/libsmb/domain_client_validate.c21
-rw-r--r--source/libsmb/libsmbclient.c54
-rw-r--r--source/libsmb/namequery.c106
-rw-r--r--source/libsmb/nmblib.c25
-rw-r--r--source/libsmb/nterr.c8
-rw-r--r--source/libsmb/pwd_cache.c6
-rw-r--r--source/libsmb/smbdes.c9
-rw-r--r--source/libsmb/smbencrypt.c10
-rw-r--r--source/libsmb/smberr.c12
-rw-r--r--source/locking/brlock.c41
-rw-r--r--source/locking/locking.c46
-rw-r--r--source/msdfs/msdfs.c76
-rw-r--r--source/nmbd/nmbd.c87
-rw-r--r--source/nmbd/nmbd_become_dmb.c8
-rw-r--r--source/nmbd/nmbd_browsesync.c5
-rw-r--r--source/nmbd/nmbd_logonnames.c1
-rw-r--r--source/nmbd/nmbd_mynames.c39
-rw-r--r--source/nmbd/nmbd_namequery.c6
-rw-r--r--source/nmbd/nmbd_responserecordsdb.c2
-rw-r--r--source/nmbd/nmbd_subnetdb.c11
-rw-r--r--source/nmbd/nmbd_synclists.c6
-rw-r--r--source/nmbd/nmbd_winsserver.c4
-rw-r--r--source/nmbd/nmbd_workgroupdb.c3
-rw-r--r--source/nsswitch/hp_nss_common.h7
-rw-r--r--source/nsswitch/hp_nss_dbdefs.h3
-rw-r--r--source/nsswitch/nss.h5
-rw-r--r--source/nsswitch/pam_winbind.c723
-rw-r--r--source/nsswitch/pam_winbind.h21
-rw-r--r--source/nsswitch/wb_client.c49
-rw-r--r--source/nsswitch/wb_common.c5
-rw-r--r--source/nsswitch/wbinfo.c471
-rw-r--r--source/nsswitch/winbind_nss.c54
-rw-r--r--source/nsswitch/winbind_nss_config.h7
-rw-r--r--source/nsswitch/winbind_nss_solaris.c11
-rw-r--r--source/nsswitch/winbindd.c247
-rw-r--r--source/nsswitch/winbindd.h109
-rw-r--r--source/nsswitch/winbindd_cache.c1142
-rw-r--r--source/nsswitch/winbindd_cm.c482
-rw-r--r--source/nsswitch/winbindd_group.c462
-rw-r--r--source/nsswitch/winbindd_idmap.c440
-rw-r--r--source/nsswitch/winbindd_misc.c116
-rw-r--r--source/nsswitch/winbindd_nss.h52
-rw-r--r--source/nsswitch/winbindd_pam.c261
-rw-r--r--source/nsswitch/winbindd_proto.h140
-rw-r--r--source/nsswitch/winbindd_sid.c105
-rw-r--r--source/nsswitch/winbindd_user.c439
-rw-r--r--source/nsswitch/winbindd_util.c850
-rw-r--r--source/nsswitch/winbindd_wins.c70
-rw-r--r--source/nsswitch/wins.c25
-rw-r--r--source/pam_smbpass/pam_smb_acct.c1
-rw-r--r--source/pam_smbpass/pam_smb_auth.c3
-rw-r--r--source/pam_smbpass/pam_smb_passwd.c3
-rw-r--r--source/pam_smbpass/support.c11
-rw-r--r--source/pam_smbpass/support.h2
-rw-r--r--source/param/loadparm.c161
-rw-r--r--source/param/params.c2
-rw-r--r--source/passdb/machine_sid.c309
-rw-r--r--source/passdb/passdb.c7
-rw-r--r--source/passdb/pdb_ldap.c10
-rw-r--r--source/passdb/pdb_nisplus.c12
-rw-r--r--source/passdb/pdb_tdb.c1
-rw-r--r--source/passdb/secrets.c7
-rw-r--r--source/printing/lpq_parse.c85
-rw-r--r--source/printing/nt_printing.c144
-rw-r--r--source/printing/pcap.c4
-rw-r--r--source/printing/print_cups.c10
-rw-r--r--source/printing/print_generic.c9
-rw-r--r--source/printing/print_svid.c2
-rw-r--r--source/printing/printfsp.c1
-rw-r--r--source/printing/printing.c173
-rw-r--r--source/rpc_client/cli_login.c6
-rw-r--r--source/rpc_client/cli_netlogon.c12
-rw-r--r--source/rpc_client/cli_spoolss_notify.c339
-rw-r--r--source/rpc_client/cli_trust.c5
-rw-r--r--source/rpc_parse/parse_lsa.c280
-rw-r--r--source/rpc_parse/parse_misc.c6
-rw-r--r--source/rpc_parse/parse_net.c9
-rw-r--r--source/rpc_parse/parse_prs.c2
-rw-r--r--source/rpc_parse/parse_samr.c24
-rw-r--r--source/rpc_parse/parse_spoolss.c532
-rw-r--r--source/rpc_parse/parse_srv.c187
-rw-r--r--source/rpc_server/srv_dfs_nt.c6
-rw-r--r--source/rpc_server/srv_lsa_hnd.c13
-rw-r--r--source/rpc_server/srv_lsa_nt.c28
-rw-r--r--source/rpc_server/srv_netlog_nt.c12
-rw-r--r--source/rpc_server/srv_pipe_hnd.c16
-rw-r--r--source/rpc_server/srv_samr_nt.c42
-rwxr-xr-xsource/rpc_server/srv_spoolss.c69
-rw-r--r--source/rpc_server/srv_spoolss_nt.c1304
-rw-r--r--source/rpc_server/srv_srvsvc_nt.c295
-rw-r--r--source/rpc_server/srv_util.c2
-rw-r--r--source/rpc_server/srv_wkssvc_nt.c2
-rw-r--r--source/rpcclient/cmd_dfs.c3
-rw-r--r--source/rpcclient/cmd_lsarpc.c310
-rw-r--r--source/rpcclient/cmd_netlogon.c9
-rw-r--r--source/rpcclient/cmd_samr.c380
-rw-r--r--source/rpcclient/cmd_spoolss.c947
-rw-r--r--source/rpcclient/cmd_srvsvc.c3
-rw-r--r--source/rpcclient/cmd_wkssvc.c3
-rw-r--r--source/rpcclient/display_sec.c255
-rw-r--r--source/rpcclient/display_spool.c3
-rw-r--r--source/rpcclient/rpcclient.c286
-rw-r--r--source/script/mkproto.awk4
-rw-r--r--source/smbd/blocking.c15
-rw-r--r--source/smbd/close.c31
-rw-r--r--source/smbd/conn.c2
-rw-r--r--source/smbd/connection.c4
-rw-r--r--source/smbd/dfree.c4
-rw-r--r--source/smbd/dir.c57
-rw-r--r--source/smbd/dosmode.c6
-rw-r--r--source/smbd/error.c16
-rw-r--r--source/smbd/fileio.c796
-rw-r--r--source/smbd/filename.c10
-rw-r--r--source/smbd/lanman.c8
-rw-r--r--source/smbd/mangle.c42
-rw-r--r--source/smbd/message.c2
-rw-r--r--source/smbd/negprot.c18
-rw-r--r--source/smbd/notify_kernel.c8
-rw-r--r--source/smbd/nttrans.c932
-rw-r--r--source/smbd/open.c507
-rw-r--r--source/smbd/oplock.c8
-rw-r--r--source/smbd/oplock_irix.c12
-rw-r--r--source/smbd/password.c893
-rw-r--r--source/smbd/posix_acls.c202
-rw-r--r--source/smbd/process.c14
-rw-r--r--source/smbd/reply.c821
-rw-r--r--source/smbd/server.c99
-rw-r--r--source/smbd/service.c55
-rw-r--r--source/smbd/trans2.c165
-rw-r--r--source/smbd/uid.c10
-rw-r--r--source/smbd/vfs-wrap.c371
-rw-r--r--source/smbd/vfs.c609
-rw-r--r--source/smbwrapper/smbw.c5
-rw-r--r--source/tdb/Makefile5
-rw-r--r--source/tdb/spinlock.c7
-rw-r--r--source/tdb/tdb.c213
-rw-r--r--source/tdb/tdb.h8
-rw-r--r--source/tdb/tdbdump.c3
-rw-r--r--source/tdb/tdbtest.c24
-rw-r--r--source/tdb/tdbtool.c3
-rw-r--r--source/tdb/tdbtorture.c12
-rw-r--r--source/tdb/tdbutil.c163
-rw-r--r--source/utils/locktest.c18
-rw-r--r--source/utils/locktest2.c5
-rw-r--r--source/utils/masktest.c35
-rw-r--r--source/utils/nmblookup.c1
-rw-r--r--source/utils/smbcacls.c97
-rw-r--r--source/utils/smbcontrol.c13
-rw-r--r--source/utils/smbpasswd.c463
-rw-r--r--source/utils/status.c7
-rw-r--r--source/utils/testparm.c19
-rw-r--r--source/utils/torture.c5
-rw-r--r--source/web/statuspage.c2
-rw-r--r--source/web/swat.c96
-rw-r--r--swat/README17
-rw-r--r--testsuite/build_farm/basicsmb.fns2
-rw-r--r--testsuite/printing/psec.c47
305 files changed, 35227 insertions, 22057 deletions
diff --git a/Manifest b/Manifest
index 0b8e4a960e7..70d044cc98f 100644
--- a/Manifest
+++ b/Manifest
@@ -50,6 +50,21 @@ examples (Example configuration files):
Do read the smb.conf manual page in considering what settings are
appropriate for your site.
+ There are lots of interesting examples of how people have been able
+ to implement Samba for their use. Users may also be interested in
+ the VFS (Virtual File System) modules under this directory.
+
+SWAT: The Samba Web Administration Tool
+----- ---------------------------------
+
+ SWAT is a web based tool for configuring and optimising the smb.conf
+ file. To use it, you need to have SWAT enabled in your inetd control
+ file (for more information check the packaging directories for examples
+ of how this can be done). Then you connect to SWAT using your favourite
+ web browser - point it at http://hostname:901, then log on as "root"
+ using the root password. If you log on using a non-root account SWAT
+ will not allow the smb.conf file to be changed.
+
packaging (Only for those wishing to build binary distributions):
--------- -------------------------------------------------------
diff --git a/README b/README
index 60ec379a03e..84534311e36 100644
--- a/README
+++ b/README
@@ -90,7 +90,7 @@ CONTRIBUTIONS
If you want to contribute to the development of the software then
please join the mailing list. The Samba team accepts patches
-(preferably in "diff -u" format, see docs/BUGS.txt for more details)
+(preferably in "diff -u" format, see docs/textdocs/BUGS.txt for more details)
and are always glad to receive feedback or suggestions to the address
samba@samba.org. We have recently put a new bug tracking
system into place which should help the throughput quite a lot. You
diff --git a/docs/OID/allocated-arcs.txt b/docs/OID/allocated-arcs.txt
index 4666be4cd79..acef4930eae 100644
--- a/docs/OID/allocated-arcs.txt
+++ b/docs/OID/allocated-arcs.txt
@@ -1,7 +1,7 @@
!===========================================================================================
!==
!== Allocated Arcs from the Samba Team Private Enterprise Number
-!== ISO(1) org(3) dod(6) internet(1) experimental(3) private(4) enterprise(1) Samba(7165)
+!== ISO(1) org(3) dod(6) internet(1) private(4) enterprise(1) Samba(7165)
!==
!== Arc allocation is maintained by jerry carter <jerry@samba.org>. Please notify
!== me if you need an OID and update this file.
@@ -15,3 +15,5 @@ ARC Owner Contact Purpose
.1 Plainjoe.org Jerry Carter <jerry@samba.org> Use for Plainjoe.org domain
and examples in O'Reilly LDAP book
.2 Samba 2.2. Release jerry@samba.org schema for representing smbpasswd
+.3 Jean-Francois.Micouleau@dalalu.fr Experiemental SNMP fun
+
diff --git a/docs/Registry/WinXP_SignOrSeal.reg b/docs/Registry/WinXP_SignOrSeal.reg
index 18690ae6619..f6f4b4cd91c 100644
--- a/docs/Registry/WinXP_SignOrSeal.reg
+++ b/docs/Registry/WinXP_SignOrSeal.reg
@@ -1,9 +1,11 @@
-REGEDIT4
-
-;
-; This registry key (gathered from the Samba-tng lists) is needed
-; for a Windows XP client to join and logon to a Samba domain
-;
-
-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\netlogon\parameters
-"RequireSignOrSeal"=dword:00000000
+Windows Registry Editor Version 5.00
+
+;
+; This registry key is needed for a Windows XP Client to join
+; and logon to a Samba domain. Note: Samba 2.2.3a contained
+; this key in a broken format which did nothing to the registry -
+; however XP reported "registry key imported". If in doubt
+; check the key by hand with regedit.
+
+[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters]
+"requiresignorseal"=dword:00000000
diff --git a/docs/Samba-HOWTO-Collection.pdf b/docs/Samba-HOWTO-Collection.pdf
index 06fd459fc26..8179f6261a4 100644
--- a/docs/Samba-HOWTO-Collection.pdf
+++ b/docs/Samba-HOWTO-Collection.pdf
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
-1 0 obj<</Producer(htmldoc 1.8.11 Copyright 1997-2001 Easy Software Products, All Rights Reserved.)/CreationDate(D:20020202055155Z)/Title(SAMBA Project Documentation)/Creator(Modular DocBook HTML Stylesheet Version 1.57)>>endobj
+1 0 obj<</Producer(htmldoc 1.8.11 Copyright 1997-2001 Easy Software Products, All Rights Reserved.)/CreationDate(D:20020401145239Z)/Title(SAMBA Project Documentation)/Creator(Modular DocBook HTML Stylesheet Version 1.57)>>endobj
2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier-Bold/Encoding 2 0 R>>endobj
@@ -16,228 +16,230 @@
14 0 obj<</Subtype/Link/Rect[188.4 449.8 289.8 462.8]/Border[0 0 0]/A 13 0 R>>endobj
15 0 obj<</S/URI/URI(mailto:jerry@samba.org)>>endobj
16 0 obj<</Subtype/Link/Rect[72.0 436.6 148.4 449.6]/Border[0 0 0]/A 15 0 R>>endobj
-17 0 obj[14 0 R
+17 0 obj<</S/URI/URI(http://www.fsf.org/licenses/gpl.txt)>>endobj
+18 0 obj<</Subtype/Link/Rect[72.0 383.8 223.3 396.8]/Border[0 0 0]/A 17 0 R>>endobj
+19 0 obj[14 0 R
16 0 R
+18 0 R
]endobj
-18 0 obj<</S/URI/URI(http://www.samba.org/)>>endobj
-19 0 obj<</Subtype/Link/Rect[369.9 587.8 471.0 600.8]/Border[0 0 0]/A 18 0 R>>endobj
-20 0 obj[19 0 R
+20 0 obj<</S/URI/URI(http://www.samba.org/)>>endobj
+21 0 obj<</Subtype/Link/Rect[369.9 587.8 471.0 600.8]/Border[0 0 0]/A 20 0 R>>endobj
+22 0 obj[21 0 R
]endobj
-21 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
-22 0 obj<</Subtype/Link/Rect[176.8 381.8 270.6 394.8]/Border[0 0 0]/A 21 0 R>>endobj
-23 0 obj<</S/URI/URI(#PASSWORDLEVEL)>>endobj
-24 0 obj<</Subtype/Link/Rect[73.0 118.8 154.0 129.8]/Border[0 0 0]/A 23 0 R>>endobj
-25 0 obj<</S/URI/URI(#USERNAMELEVEL)>>endobj
-26 0 obj<</Subtype/Link/Rect[73.0 108.0 148.6 119.0]/Border[0 0 0]/A 25 0 R>>endobj
-27 0 obj[22 0 R
-24 0 R
+23 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
+24 0 obj<</Subtype/Link/Rect[176.8 381.8 270.6 394.8]/Border[0 0 0]/A 23 0 R>>endobj
+25 0 obj<</S/URI/URI(#PASSWORDLEVEL)>>endobj
+26 0 obj<</Subtype/Link/Rect[73.0 118.8 154.0 129.8]/Border[0 0 0]/A 25 0 R>>endobj
+27 0 obj<</S/URI/URI(#USERNAMELEVEL)>>endobj
+28 0 obj<</Subtype/Link/Rect[73.0 108.0 148.6 119.0]/Border[0 0 0]/A 27 0 R>>endobj
+29 0 obj[24 0 R
26 0 R
+28 0 R
]endobj
-28 0 obj<</S/URI/URI(winbind.html)>>endobj
-29 0 obj<</Subtype/Link/Rect[508.9 602.2 547.4 615.2]/Border[0 0 0]/A 28 0 R>>endobj
30 0 obj<</S/URI/URI(winbind.html)>>endobj
-31 0 obj<</Subtype/Link/Rect[72.0 589.0 115.4 602.0]/Border[0 0 0]/A 30 0 R>>endobj
-32 0 obj[29 0 R
-31 0 R
+31 0 obj<</Subtype/Link/Rect[508.9 602.2 547.4 615.2]/Border[0 0 0]/A 30 0 R>>endobj
+32 0 obj<</S/URI/URI(winbind.html)>>endobj
+33 0 obj<</Subtype/Link/Rect[72.0 589.0 115.4 602.0]/Border[0 0 0]/A 32 0 R>>endobj
+34 0 obj[31 0 R
+33 0 R
]endobj
-33 0 obj<</S/URI/URI(http://rsync.samba.org/)>>endobj
-34 0 obj<</Subtype/Link/Rect[120.9 89.0 222.3 102.0]/Border[0 0 0]/A 33 0 R>>endobj
-35 0 obj[34 0 R
+35 0 obj<</S/URI/URI(http://rsync.samba.org/)>>endobj
+36 0 obj<</Subtype/Link/Rect[120.9 89.0 222.3 102.0]/Border[0 0 0]/A 35 0 R>>endobj
+37 0 obj[36 0 R
]endobj
-36 0 obj<</S/URI/URI(#OBEYPAMRESTRICTIONS)>>endobj
-37 0 obj<</Subtype/Link/Rect[238.2 649.4 332.9 662.4]/Border[0 0 0]/A 36 0 R>>endobj
-38 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
-39 0 obj<</Subtype/Link/Rect[344.2 570.2 454.9 583.2]/Border[0 0 0]/A 38 0 R>>endobj
-40 0 obj[37 0 R
-39 0 R
+38 0 obj<</S/URI/URI(#OBEYPAMRESTRICTIONS)>>endobj
+39 0 obj<</Subtype/Link/Rect[238.2 649.4 332.9 662.4]/Border[0 0 0]/A 38 0 R>>endobj
+40 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
+41 0 obj<</Subtype/Link/Rect[344.2 570.2 454.9 583.2]/Border[0 0 0]/A 40 0 R>>endobj
+42 0 obj[39 0 R
+41 0 R
]endobj
-41 0 obj<</S/URI/URI(http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp)>>endobj
-42 0 obj<</Subtype/Link/Rect[72.0 590.2 183.5 603.2]/Border[0 0 0]/A 41 0 R>>endobj
-43 0 obj<</S/URI/URI(#HOSTMSDFS)>>endobj
-44 0 obj<</Subtype/Link/Rect[347.8 511.0 420.4 524.0]/Border[0 0 0]/A 43 0 R>>endobj
-45 0 obj<</S/URI/URI(#MSDFSROOT)>>endobj
-46 0 obj<</Subtype/Link/Rect[383.6 497.8 456.2 510.8]/Border[0 0 0]/A 45 0 R>>endobj
-47 0 obj[42 0 R
-44 0 R
+43 0 obj<</S/URI/URI(http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp)>>endobj
+44 0 obj<</Subtype/Link/Rect[72.0 590.2 183.5 603.2]/Border[0 0 0]/A 43 0 R>>endobj
+45 0 obj<</S/URI/URI(#HOSTMSDFS)>>endobj
+46 0 obj<</Subtype/Link/Rect[347.8 511.0 420.4 524.0]/Border[0 0 0]/A 45 0 R>>endobj
+47 0 obj<</S/URI/URI(#MSDFSROOT)>>endobj
+48 0 obj<</Subtype/Link/Rect[383.6 497.8 456.2 510.8]/Border[0 0 0]/A 47 0 R>>endobj
+49 0 obj[44 0 R
46 0 R
+48 0 R
]endobj
-48 0 obj<</S/URI/URI(#NTACLSUPPORT)>>endobj
-49 0 obj<</Subtype/Link/Rect[342.7 533.8 441.7 546.8]/Border[0 0 0]/A 48 0 R>>endobj
-50 0 obj[49 0 R
+50 0 obj<</S/URI/URI(#NTACLSUPPORT)>>endobj
+51 0 obj<</Subtype/Link/Rect[342.7 533.8 441.7 546.8]/Border[0 0 0]/A 50 0 R>>endobj
+52 0 obj[51 0 R
]endobj
-51 0 obj<</S/URI/URI(#SECURITYMASK)>>endobj
-52 0 obj<</Subtype/Link/Rect[88.2 668.2 180.6 681.2]/Border[0 0 0]/A 51 0 R>>endobj
-53 0 obj<</S/URI/URI(#CREATEMASK)>>endobj
-54 0 obj<</Subtype/Link/Rect[358.9 589.0 438.1 602.0]/Border[0 0 0]/A 53 0 R>>endobj
-55 0 obj<</S/URI/URI(#FORCESECURITYMODE)>>endobj
-56 0 obj<</Subtype/Link/Rect[427.0 536.2 526.0 549.2]/Border[0 0 0]/A 55 0 R>>endobj
+53 0 obj<</S/URI/URI(#SECURITYMASK)>>endobj
+54 0 obj<</Subtype/Link/Rect[88.2 668.2 180.6 681.2]/Border[0 0 0]/A 53 0 R>>endobj
+55 0 obj<</S/URI/URI(#CREATEMASK)>>endobj
+56 0 obj<</Subtype/Link/Rect[358.9 589.0 438.1 602.0]/Border[0 0 0]/A 55 0 R>>endobj
57 0 obj<</S/URI/URI(#FORCESECURITYMODE)>>endobj
-58 0 obj<</Subtype/Link/Rect[72.0 523.0 98.4 536.0]/Border[0 0 0]/A 57 0 R>>endobj
-59 0 obj<</S/URI/URI(#FORCECREATEMODE)>>endobj
-60 0 obj<</Subtype/Link/Rect[358.9 443.8 477.7 456.8]/Border[0 0 0]/A 59 0 R>>endobj
-61 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-62 0 obj<</Subtype/Link/Rect[72.0 166.6 151.2 179.6]/Border[0 0 0]/A 61 0 R>>endobj
-63 0 obj[52 0 R
-54 0 R
+58 0 obj<</Subtype/Link/Rect[427.0 536.2 526.0 549.2]/Border[0 0 0]/A 57 0 R>>endobj
+59 0 obj<</S/URI/URI(#FORCESECURITYMODE)>>endobj
+60 0 obj<</Subtype/Link/Rect[72.0 523.0 98.4 536.0]/Border[0 0 0]/A 59 0 R>>endobj
+61 0 obj<</S/URI/URI(#FORCECREATEMODE)>>endobj
+62 0 obj<</Subtype/Link/Rect[358.9 443.8 477.7 456.8]/Border[0 0 0]/A 61 0 R>>endobj
+63 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+64 0 obj<</Subtype/Link/Rect[72.0 166.6 151.2 179.6]/Border[0 0 0]/A 63 0 R>>endobj
+65 0 obj[54 0 R
56 0 R
58 0 R
60 0 R
62 0 R
+64 0 R
]endobj
-64 0 obj<</S/URI/URI(http://imprints.sourceforge.net)>>endobj
-65 0 obj<</Subtype/Link/Rect[146.5 548.2 280.3 561.2]/Border[0 0 0]/A 64 0 R>>endobj
-66 0 obj<</S/URI/URI(http://msdn.microsoft.com/)>>endobj
-67 0 obj<</Subtype/Link/Rect[221.4 521.8 341.1 534.8]/Border[0 0 0]/A 66 0 R>>endobj
-68 0 obj<</S/URI/URI(http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP)>>endobj
-69 0 obj<</Subtype/Link/Rect[72.0 297.4 355.9 310.4]/Border[0 0 0]/A 68 0 R>>endobj
-70 0 obj[65 0 R
-67 0 R
+66 0 obj<</S/URI/URI(http://imprints.sourceforge.net)>>endobj
+67 0 obj<</Subtype/Link/Rect[146.5 548.2 280.3 561.2]/Border[0 0 0]/A 66 0 R>>endobj
+68 0 obj<</S/URI/URI(http://msdn.microsoft.com/)>>endobj
+69 0 obj<</Subtype/Link/Rect[221.4 521.8 341.1 534.8]/Border[0 0 0]/A 68 0 R>>endobj
+70 0 obj<</S/URI/URI(http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP)>>endobj
+71 0 obj<</Subtype/Link/Rect[72.0 297.4 355.9 310.4]/Border[0 0 0]/A 70 0 R>>endobj
+72 0 obj[67 0 R
69 0 R
+71 0 R
]endobj
-71 0 obj<</Subtype/Link/Rect[462.9 705.8 540.9 718.8]/Border[0 0 0]/Dest[739 0 R/XYZ null 768 0]>>endobj
-72 0 obj<</S/URI/URI(#WRITELIST)>>endobj
-73 0 obj<</Subtype/Link/Rect[91.9 313.4 157.9 326.4]/Border[0 0 0]/A 72 0 R>>endobj
-74 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-75 0 obj<</Subtype/Link/Rect[192.7 300.2 294.1 313.2]/Border[0 0 0]/A 74 0 R>>endobj
-76 0 obj<</S/URI/URI(#GUESTOK)>>endobj
-77 0 obj<</Subtype/Link/Rect[163.3 273.8 231.3 286.8]/Border[0 0 0]/A 76 0 R>>endobj
-78 0 obj<</S/URI/URI(#MAPTOGUEST)>>endobj
-79 0 obj<</Subtype/Link/Rect[401.4 168.2 492.0 181.2]/Border[0 0 0]/A 78 0 R>>endobj
+73 0 obj<</Subtype/Link/Rect[462.9 705.8 540.9 718.8]/Border[0 0 0]/Dest[741 0 R/XYZ null 768 0]>>endobj
+74 0 obj<</S/URI/URI(#WRITELIST)>>endobj
+75 0 obj<</Subtype/Link/Rect[91.9 313.4 157.9 326.4]/Border[0 0 0]/A 74 0 R>>endobj
+76 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+77 0 obj<</Subtype/Link/Rect[192.7 300.2 294.1 313.2]/Border[0 0 0]/A 76 0 R>>endobj
+78 0 obj<</S/URI/URI(#GUESTOK)>>endobj
+79 0 obj<</Subtype/Link/Rect[163.3 273.8 231.3 286.8]/Border[0 0 0]/A 78 0 R>>endobj
80 0 obj<</S/URI/URI(#MAPTOGUEST)>>endobj
-81 0 obj<</Subtype/Link/Rect[108.0 155.0 130.0 168.0]/Border[0 0 0]/A 80 0 R>>endobj
-82 0 obj[71 0 R
-73 0 R
+81 0 obj<</Subtype/Link/Rect[401.4 168.2 492.0 181.2]/Border[0 0 0]/A 80 0 R>>endobj
+82 0 obj<</S/URI/URI(#MAPTOGUEST)>>endobj
+83 0 obj<</Subtype/Link/Rect[108.0 155.0 130.0 168.0]/Border[0 0 0]/A 82 0 R>>endobj
+84 0 obj[73 0 R
75 0 R
77 0 R
79 0 R
81 0 R
+83 0 R
]endobj
-83 0 obj<</S/URI/URI(#PRINTERADMIN)>>endobj
-84 0 obj<</Subtype/Link/Rect[433.8 567.8 526.2 580.8]/Border[0 0 0]/A 83 0 R>>endobj
-85 0 obj[84 0 R
+85 0 obj<</S/URI/URI(#PRINTERADMIN)>>endobj
+86 0 obj<</Subtype/Link/Rect[433.8 567.8 526.2 580.8]/Border[0 0 0]/A 85 0 R>>endobj
+87 0 obj[86 0 R
]endobj
-86 0 obj<</S/URI/URI(rpcclient.1.html)>>endobj
-87 0 obj<</Subtype/Link/Rect[239.1 583.4 382.1 596.4]/Border[0 0 0]/A 86 0 R>>endobj
-88 0 obj<</S/URI/URI(#SHOWADDPRINTERWIZARD)>>endobj
-89 0 obj<</Subtype/Link/Rect[108.0 159.0 306.0 172.0]/Border[0 0 0]/A 88 0 R>>endobj
-90 0 obj<</S/URI/URI(#ADDPRINTERCOMMAND)>>endobj
-91 0 obj<</Subtype/Link/Rect[456.6 132.6 535.8 145.6]/Border[0 0 0]/A 90 0 R>>endobj
+88 0 obj<</S/URI/URI(rpcclient.1.html)>>endobj
+89 0 obj<</Subtype/Link/Rect[239.1 583.4 382.1 596.4]/Border[0 0 0]/A 88 0 R>>endobj
+90 0 obj<</S/URI/URI(#SHOWADDPRINTERWIZARD)>>endobj
+91 0 obj<</Subtype/Link/Rect[108.0 159.0 306.0 172.0]/Border[0 0 0]/A 90 0 R>>endobj
92 0 obj<</S/URI/URI(#ADDPRINTERCOMMAND)>>endobj
-93 0 obj<</Subtype/Link/Rect[72.0 119.4 118.2 132.4]/Border[0 0 0]/A 92 0 R>>endobj
-94 0 obj[87 0 R
-89 0 R
+93 0 obj<</Subtype/Link/Rect[456.6 132.6 535.8 145.6]/Border[0 0 0]/A 92 0 R>>endobj
+94 0 obj<</S/URI/URI(#ADDPRINTERCOMMAND)>>endobj
+95 0 obj<</Subtype/Link/Rect[72.0 119.4 118.2 132.4]/Border[0 0 0]/A 94 0 R>>endobj
+96 0 obj[89 0 R
91 0 R
93 0 R
+95 0 R
]endobj
-95 0 obj<</S/URI/URI(#DELETEPRINTERCOMMAND)>>endobj
-96 0 obj<</Subtype/Link/Rect[189.3 681.4 334.5 694.4]/Border[0 0 0]/A 95 0 R>>endobj
-97 0 obj<</S/URI/URI(#ENUMPORTSCOMMAND)>>endobj
-98 0 obj<</Subtype/Link/Rect[451.4 504.2 510.8 517.2]/Border[0 0 0]/A 97 0 R>>endobj
+97 0 obj<</S/URI/URI(#DELETEPRINTERCOMMAND)>>endobj
+98 0 obj<</Subtype/Link/Rect[189.3 681.4 334.5 694.4]/Border[0 0 0]/A 97 0 R>>endobj
99 0 obj<</S/URI/URI(#ENUMPORTSCOMMAND)>>endobj
-100 0 obj<</Subtype/Link/Rect[72.0 491.0 118.2 504.0]/Border[0 0 0]/A 99 0 R>>endobj
-101 0 obj<</S/URI/URI(http://imprints.sourceforge.net/)>>endobj
-102 0 obj<</Subtype/Link/Rect[303.3 406.2 442.9 419.2]/Border[0 0 0]/A 101 0 R>>endobj
-103 0 obj[96 0 R
-98 0 R
+100 0 obj<</Subtype/Link/Rect[451.4 504.2 510.8 517.2]/Border[0 0 0]/A 99 0 R>>endobj
+101 0 obj<</S/URI/URI(#ENUMPORTSCOMMAND)>>endobj
+102 0 obj<</Subtype/Link/Rect[72.0 491.0 118.2 504.0]/Border[0 0 0]/A 101 0 R>>endobj
+103 0 obj<</S/URI/URI(http://imprints.sourceforge.net/)>>endobj
+104 0 obj<</Subtype/Link/Rect[303.3 406.2 442.9 419.2]/Border[0 0 0]/A 103 0 R>>endobj
+105 0 obj[98 0 R
100 0 R
102 0 R
+104 0 R
]endobj
-104 0 obj<</S/URI/URI(http://imprints.sourceforge.net/)>>endobj
-105 0 obj<</Subtype/Link/Rect[108.0 479.8 244.9 492.8]/Border[0 0 0]/A 104 0 R>>endobj
-106 0 obj[105 0 R
+106 0 obj<</S/URI/URI(http://imprints.sourceforge.net/)>>endobj
+107 0 obj<</Subtype/Link/Rect[108.0 479.8 244.9 492.8]/Border[0 0 0]/A 106 0 R>>endobj
+108 0 obj[107 0 R
]endobj
-107 0 obj<</S/URI/URI(smbpasswd.8.html)>>endobj
-108 0 obj<</Subtype/Link/Rect[221.4 455.8 287.7 468.8]/Border[0 0 0]/A 107 0 R>>endobj
-109 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-110 0 obj<</Subtype/Link/Rect[353.1 139.0 425.7 152.0]/Border[0 0 0]/A 109 0 R>>endobj
-111 0 obj<</S/URI/URI(#SECURITY)>>endobj
-112 0 obj<</Subtype/Link/Rect[169.1 99.4 241.7 112.4]/Border[0 0 0]/A 111 0 R>>endobj
-113 0 obj[108 0 R
-110 0 R
+109 0 obj<</S/URI/URI(smbpasswd.8.html)>>endobj
+110 0 obj<</Subtype/Link/Rect[221.4 455.8 287.7 468.8]/Border[0 0 0]/A 109 0 R>>endobj
+111 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+112 0 obj<</Subtype/Link/Rect[353.1 139.0 425.7 152.0]/Border[0 0 0]/A 111 0 R>>endobj
+113 0 obj<</S/URI/URI(#SECURITY)>>endobj
+114 0 obj<</Subtype/Link/Rect[169.1 99.4 241.7 112.4]/Border[0 0 0]/A 113 0 R>>endobj
+115 0 obj[110 0 R
112 0 R
+114 0 R
]endobj
-114 0 obj<</S/URI/URI(#WORKGROUP)>>endobj
-115 0 obj<</Subtype/Link/Rect[146.2 721.0 225.4 734.0]/Border[0 0 0]/A 114 0 R>>endobj
-116 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
-117 0 obj<</Subtype/Link/Rect[224.7 641.8 343.5 654.8]/Border[0 0 0]/A 116 0 R>>endobj
-118 0 obj<</S/URI/URI(#PASSWORDSERVER)>>endobj
-119 0 obj<</Subtype/Link/Rect[188.7 602.2 307.5 615.2]/Border[0 0 0]/A 118 0 R>>endobj
-120 0 obj[115 0 R
-117 0 R
+116 0 obj<</S/URI/URI(#WORKGROUP)>>endobj
+117 0 obj<</Subtype/Link/Rect[146.2 721.0 225.4 734.0]/Border[0 0 0]/A 116 0 R>>endobj
+118 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
+119 0 obj<</Subtype/Link/Rect[224.7 641.8 343.5 654.8]/Border[0 0 0]/A 118 0 R>>endobj
+120 0 obj<</S/URI/URI(#PASSWORDSERVER)>>endobj
+121 0 obj<</Subtype/Link/Rect[188.7 602.2 307.5 615.2]/Border[0 0 0]/A 120 0 R>>endobj
+122 0 obj[117 0 R
119 0 R
+121 0 R
]endobj
-121 0 obj<</S/URI/URI(#SECURITYEQUALSSERVER)>>endobj
-122 0 obj<</Subtype/Link/Rect[277.9 721.0 354.1 734.0]/Border[0 0 0]/A 121 0 R>>endobj
-123 0 obj<</S/URI/URI(winbind.html)>>endobj
-124 0 obj<</Subtype/Link/Rect[153.9 668.2 222.3 681.2]/Border[0 0 0]/A 123 0 R>>endobj
-125 0 obj<</S/URI/URI(http://www.linuxworld.com)>>endobj
-126 0 obj<</Subtype/Link/Rect[443.5 351.4 500.6 364.4]/Border[0 0 0]/A 125 0 R>>endobj
-127 0 obj<</S/URI/URI(http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html)>>endobj
-128 0 obj<</Subtype/Link/Rect[72.0 338.2 189.3 351.2]/Border[0 0 0]/A 127 0 R>>endobj
-129 0 obj[122 0 R
-124 0 R
+123 0 obj<</S/URI/URI(#SECURITYEQUALSSERVER)>>endobj
+124 0 obj<</Subtype/Link/Rect[277.9 721.0 354.1 734.0]/Border[0 0 0]/A 123 0 R>>endobj
+125 0 obj<</S/URI/URI(winbind.html)>>endobj
+126 0 obj<</Subtype/Link/Rect[153.9 668.2 222.3 681.2]/Border[0 0 0]/A 125 0 R>>endobj
+127 0 obj<</S/URI/URI(http://www.linuxworld.com)>>endobj
+128 0 obj<</Subtype/Link/Rect[443.5 351.4 500.6 364.4]/Border[0 0 0]/A 127 0 R>>endobj
+129 0 obj<</S/URI/URI(http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html)>>endobj
+130 0 obj<</Subtype/Link/Rect[72.0 338.2 189.3 351.2]/Border[0 0 0]/A 129 0 R>>endobj
+131 0 obj[124 0 R
126 0 R
128 0 R
+130 0 R
]endobj
-130 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-131 0 obj<</Subtype/Link/Rect[182.3 603.4 254.9 616.4]/Border[0 0 0]/A 130 0 R>>endobj
-132 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
-133 0 obj<</Subtype/Link/Rect[334.9 603.4 418.9 616.4]/Border[0 0 0]/A 132 0 R>>endobj
-134 0 obj<</S/URI/URI(UNIX_INSTALL.html)>>endobj
-135 0 obj<</Subtype/Link/Rect[339.0 439.4 443.5 452.4]/Border[0 0 0]/A 134 0 R>>endobj
-136 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-137 0 obj<</Subtype/Link/Rect[445.9 426.2 544.6 439.2]/Border[0 0 0]/A 136 0 R>>endobj
-138 0 obj[131 0 R
-133 0 R
+132 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+133 0 obj<</Subtype/Link/Rect[182.3 603.4 254.9 616.4]/Border[0 0 0]/A 132 0 R>>endobj
+134 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
+135 0 obj<</Subtype/Link/Rect[334.9 603.4 418.9 616.4]/Border[0 0 0]/A 134 0 R>>endobj
+136 0 obj<</S/URI/URI(UNIX_INSTALL.html)>>endobj
+137 0 obj<</Subtype/Link/Rect[339.0 439.4 443.5 452.4]/Border[0 0 0]/A 136 0 R>>endobj
+138 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+139 0 obj<</Subtype/Link/Rect[445.9 426.2 544.6 439.2]/Border[0 0 0]/A 138 0 R>>endobj
+140 0 obj[133 0 R
135 0 R
137 0 R
+139 0 R
]endobj
-139 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-140 0 obj<</Subtype/Link/Rect[468.3 636.2 549.6 649.2]/Border[0 0 0]/A 139 0 R>>endobj
141 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-142 0 obj<</Subtype/Link/Rect[72.0 623.0 92.8 636.0]/Border[0 0 0]/A 141 0 R>>endobj
-143 0 obj<</S/URI/URI(#NETBIOSNAME)>>endobj
-144 0 obj<</Subtype/Link/Rect[94.6 549.6 159.4 560.6]/Border[0 0 0]/A 143 0 R>>endobj
-145 0 obj<</S/URI/URI(#WORKGROUP)>>endobj
-146 0 obj<</Subtype/Link/Rect[94.6 538.8 143.2 549.8]/Border[0 0 0]/A 145 0 R>>endobj
-147 0 obj<</S/URI/URI(#OSLEVEL)>>endobj
-148 0 obj<</Subtype/Link/Rect[94.6 506.4 137.8 517.4]/Border[0 0 0]/A 147 0 R>>endobj
-149 0 obj<</S/URI/URI(#PERFERREDMASTER)>>endobj
-150 0 obj<</Subtype/Link/Rect[94.6 495.6 181.0 506.6]/Border[0 0 0]/A 149 0 R>>endobj
-151 0 obj<</S/URI/URI(#DOMAINMASTER)>>endobj
-152 0 obj<</Subtype/Link/Rect[94.6 484.8 164.8 495.8]/Border[0 0 0]/A 151 0 R>>endobj
-153 0 obj<</S/URI/URI(#LOCALMASTER)>>endobj
-154 0 obj<</Subtype/Link/Rect[94.6 474.0 159.4 485.0]/Border[0 0 0]/A 153 0 R>>endobj
-155 0 obj<</S/URI/URI(#SECURITYEQUALSUSER)>>endobj
-156 0 obj<</Subtype/Link/Rect[94.6 441.6 137.8 452.6]/Border[0 0 0]/A 155 0 R>>endobj
-157 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
-158 0 obj<</Subtype/Link/Rect[94.6 409.2 186.4 420.2]/Border[0 0 0]/A 157 0 R>>endobj
-159 0 obj<</S/URI/URI(#DOMAINLOGONS)>>endobj
-160 0 obj<</Subtype/Link/Rect[94.6 376.8 164.8 387.8]/Border[0 0 0]/A 159 0 R>>endobj
-161 0 obj<</S/URI/URI(#LOGONPATH)>>endobj
-162 0 obj<</Subtype/Link/Rect[94.6 344.4 148.6 355.4]/Border[0 0 0]/A 161 0 R>>endobj
-163 0 obj<</S/URI/URI(#LOGONDRIVE)>>endobj
-164 0 obj<</Subtype/Link/Rect[94.6 301.2 154.0 312.2]/Border[0 0 0]/A 163 0 R>>endobj
-165 0 obj<</S/URI/URI(#LOGONHOME)>>endobj
-166 0 obj<</Subtype/Link/Rect[94.6 290.4 148.6 301.4]/Border[0 0 0]/A 165 0 R>>endobj
-167 0 obj<</S/URI/URI(#LOGONSCRIPT)>>endobj
-168 0 obj<</Subtype/Link/Rect[94.6 247.2 159.4 258.2]/Border[0 0 0]/A 167 0 R>>endobj
-169 0 obj<</S/URI/URI(#PATH)>>endobj
-170 0 obj<</Subtype/Link/Rect[94.6 204.0 116.2 215.0]/Border[0 0 0]/A 169 0 R>>endobj
-171 0 obj<</S/URI/URI(#READONLY)>>endobj
-172 0 obj<</Subtype/Link/Rect[94.6 193.2 143.2 204.2]/Border[0 0 0]/A 171 0 R>>endobj
-173 0 obj<</S/URI/URI(#WRITELIST)>>endobj
-174 0 obj<</Subtype/Link/Rect[94.6 182.4 148.6 193.4]/Border[0 0 0]/A 173 0 R>>endobj
-175 0 obj<</S/URI/URI(#PATH)>>endobj
-176 0 obj<</Subtype/Link/Rect[94.6 139.2 116.2 150.2]/Border[0 0 0]/A 175 0 R>>endobj
-177 0 obj<</S/URI/URI(#READONLY)>>endobj
-178 0 obj<</Subtype/Link/Rect[94.6 128.4 143.2 139.4]/Border[0 0 0]/A 177 0 R>>endobj
-179 0 obj<</S/URI/URI(#CREATEMASK)>>endobj
-180 0 obj<</Subtype/Link/Rect[94.6 117.6 154.0 128.6]/Border[0 0 0]/A 179 0 R>>endobj
-181 0 obj<</S/URI/URI(#DIRECTORYMASK)>>endobj
-182 0 obj<</Subtype/Link/Rect[94.6 106.8 170.2 117.8]/Border[0 0 0]/A 181 0 R>>endobj
-183 0 obj[140 0 R
-142 0 R
+142 0 obj<</Subtype/Link/Rect[468.3 636.2 549.6 649.2]/Border[0 0 0]/A 141 0 R>>endobj
+143 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+144 0 obj<</Subtype/Link/Rect[72.0 623.0 92.8 636.0]/Border[0 0 0]/A 143 0 R>>endobj
+145 0 obj<</S/URI/URI(#NETBIOSNAME)>>endobj
+146 0 obj<</Subtype/Link/Rect[94.6 549.6 159.4 560.6]/Border[0 0 0]/A 145 0 R>>endobj
+147 0 obj<</S/URI/URI(#WORKGROUP)>>endobj
+148 0 obj<</Subtype/Link/Rect[94.6 538.8 143.2 549.8]/Border[0 0 0]/A 147 0 R>>endobj
+149 0 obj<</S/URI/URI(#OSLEVEL)>>endobj
+150 0 obj<</Subtype/Link/Rect[94.6 506.4 137.8 517.4]/Border[0 0 0]/A 149 0 R>>endobj
+151 0 obj<</S/URI/URI(#PERFERREDMASTER)>>endobj
+152 0 obj<</Subtype/Link/Rect[94.6 495.6 181.0 506.6]/Border[0 0 0]/A 151 0 R>>endobj
+153 0 obj<</S/URI/URI(#DOMAINMASTER)>>endobj
+154 0 obj<</Subtype/Link/Rect[94.6 484.8 164.8 495.8]/Border[0 0 0]/A 153 0 R>>endobj
+155 0 obj<</S/URI/URI(#LOCALMASTER)>>endobj
+156 0 obj<</Subtype/Link/Rect[94.6 474.0 159.4 485.0]/Border[0 0 0]/A 155 0 R>>endobj
+157 0 obj<</S/URI/URI(#SECURITYEQUALSUSER)>>endobj
+158 0 obj<</Subtype/Link/Rect[94.6 441.6 137.8 452.6]/Border[0 0 0]/A 157 0 R>>endobj
+159 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
+160 0 obj<</Subtype/Link/Rect[94.6 409.2 186.4 420.2]/Border[0 0 0]/A 159 0 R>>endobj
+161 0 obj<</S/URI/URI(#DOMAINLOGONS)>>endobj
+162 0 obj<</Subtype/Link/Rect[94.6 376.8 164.8 387.8]/Border[0 0 0]/A 161 0 R>>endobj
+163 0 obj<</S/URI/URI(#LOGONPATH)>>endobj
+164 0 obj<</Subtype/Link/Rect[94.6 344.4 148.6 355.4]/Border[0 0 0]/A 163 0 R>>endobj
+165 0 obj<</S/URI/URI(#LOGONDRIVE)>>endobj
+166 0 obj<</Subtype/Link/Rect[94.6 301.2 154.0 312.2]/Border[0 0 0]/A 165 0 R>>endobj
+167 0 obj<</S/URI/URI(#LOGONHOME)>>endobj
+168 0 obj<</Subtype/Link/Rect[94.6 290.4 148.6 301.4]/Border[0 0 0]/A 167 0 R>>endobj
+169 0 obj<</S/URI/URI(#LOGONSCRIPT)>>endobj
+170 0 obj<</Subtype/Link/Rect[94.6 247.2 159.4 258.2]/Border[0 0 0]/A 169 0 R>>endobj
+171 0 obj<</S/URI/URI(#PATH)>>endobj
+172 0 obj<</Subtype/Link/Rect[94.6 204.0 116.2 215.0]/Border[0 0 0]/A 171 0 R>>endobj
+173 0 obj<</S/URI/URI(#READONLY)>>endobj
+174 0 obj<</Subtype/Link/Rect[94.6 193.2 143.2 204.2]/Border[0 0 0]/A 173 0 R>>endobj
+175 0 obj<</S/URI/URI(#WRITELIST)>>endobj
+176 0 obj<</Subtype/Link/Rect[94.6 182.4 148.6 193.4]/Border[0 0 0]/A 175 0 R>>endobj
+177 0 obj<</S/URI/URI(#PATH)>>endobj
+178 0 obj<</Subtype/Link/Rect[94.6 139.2 116.2 150.2]/Border[0 0 0]/A 177 0 R>>endobj
+179 0 obj<</S/URI/URI(#READONLY)>>endobj
+180 0 obj<</Subtype/Link/Rect[94.6 128.4 143.2 139.4]/Border[0 0 0]/A 179 0 R>>endobj
+181 0 obj<</S/URI/URI(#CREATEMASK)>>endobj
+182 0 obj<</Subtype/Link/Rect[94.6 117.6 154.0 128.6]/Border[0 0 0]/A 181 0 R>>endobj
+183 0 obj<</S/URI/URI(#DIRECTORYMASK)>>endobj
+184 0 obj<</Subtype/Link/Rect[94.6 106.8 170.2 117.8]/Border[0 0 0]/A 183 0 R>>endobj
+185 0 obj[142 0 R
144 0 R
146 0 R
148 0 R
@@ -258,256 +260,255 @@
178 0 R
180 0 R
182 0 R
+184 0 R
]endobj
-184 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
-185 0 obj<</Subtype/Link/Rect[108.0 707.8 200.6 720.8]/Border[0 0 0]/A 184 0 R>>endobj
-186 0 obj<</S/URI/URI(#DOMAINADMINGROUP)>>endobj
-187 0 obj<</Subtype/Link/Rect[497.0 615.4 530.0 628.4]/Border[0 0 0]/A 186 0 R>>endobj
+186 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
+187 0 obj<</Subtype/Link/Rect[108.0 707.8 200.6 720.8]/Border[0 0 0]/A 186 0 R>>endobj
188 0 obj<</S/URI/URI(#DOMAINADMINGROUP)>>endobj
-189 0 obj<</Subtype/Link/Rect[72.0 602.2 127.9 615.2]/Border[0 0 0]/A 188 0 R>>endobj
-190 0 obj[185 0 R
-187 0 R
+189 0 obj<</Subtype/Link/Rect[497.0 615.4 530.0 628.4]/Border[0 0 0]/A 188 0 R>>endobj
+190 0 obj<</S/URI/URI(#DOMAINADMINGROUP)>>endobj
+191 0 obj<</Subtype/Link/Rect[72.0 602.2 127.9 615.2]/Border[0 0 0]/A 190 0 R>>endobj
+192 0 obj[187 0 R
189 0 R
+191 0 R
]endobj
-191 0 obj<</S/URI/URI(smbpasswd.8.html)>>endobj
-192 0 obj<</Subtype/Link/Rect[72.0 550.6 138.6 563.6]/Border[0 0 0]/A 191 0 R>>endobj
-193 0 obj<</S/URI/URI(#ADDUSERSCRIPT)>>endobj
-194 0 obj<</Subtype/Link/Rect[422.7 229.4 486.9 242.4]/Border[0 0 0]/A 193 0 R>>endobj
-195 0 obj[192 0 R
-194 0 R
+193 0 obj<</S/URI/URI(smbpasswd.8.html)>>endobj
+194 0 obj<</Subtype/Link/Rect[72.0 550.6 138.6 563.6]/Border[0 0 0]/A 193 0 R>>endobj
+195 0 obj<</S/URI/URI(#ADDUSERSCRIPT)>>endobj
+196 0 obj<</Subtype/Link/Rect[422.7 229.4 486.9 242.4]/Border[0 0 0]/A 195 0 R>>endobj
+197 0 obj[194 0 R
+196 0 R
]endobj
-196 0 obj<</S/URI/URI(http://www.microsoft.com/ntserver/management/deployment/planguide/prof_policies.asp)>>endobj
-197 0 obj<</Subtype/Link/Rect[164.2 636.2 409.3 649.2]/Border[0 0 0]/A 196 0 R>>endobj
-198 0 obj[197 0 R
+198 0 obj<</S/URI/URI(http://www.microsoft.com/ntserver/management/deployment/planguide/prof_policies.asp)>>endobj
+199 0 obj<</Subtype/Link/Rect[164.2 636.2 409.3 649.2]/Border[0 0 0]/A 198 0 R>>endobj
+200 0 obj[199 0 R
]endobj
-199 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE)>>endobj
-200 0 obj<</Subtype/Link/Rect[287.9 721.0 540.0 734.0]/Border[0 0 0]/A 199 0 R>>endobj
-201 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE)>>endobj
-202 0 obj<</Subtype/Link/Rect[236.3 681.4 508.6 694.4]/Border[0 0 0]/A 201 0 R>>endobj
-203 0 obj<</S/URI/URI(http://www.tcpdump.org/)>>endobj
-204 0 obj<</Subtype/Link/Rect[352.1 266.6 458.1 279.6]/Border[0 0 0]/A 203 0 R>>endobj
-205 0 obj<</S/URI/URI(http://www.ethereal.com/)>>endobj
-206 0 obj<</Subtype/Link/Rect[430.0 253.4 539.4 266.4]/Border[0 0 0]/A 205 0 R>>endobj
-207 0 obj[200 0 R
-202 0 R
+201 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE)>>endobj
+202 0 obj<</Subtype/Link/Rect[287.9 721.0 540.0 734.0]/Border[0 0 0]/A 201 0 R>>endobj
+203 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE)>>endobj
+204 0 obj<</Subtype/Link/Rect[236.3 681.4 508.6 694.4]/Border[0 0 0]/A 203 0 R>>endobj
+205 0 obj<</S/URI/URI(http://www.tcpdump.org/)>>endobj
+206 0 obj<</Subtype/Link/Rect[352.1 266.6 458.1 279.6]/Border[0 0 0]/A 205 0 R>>endobj
+207 0 obj<</S/URI/URI(http://www.ethereal.com/)>>endobj
+208 0 obj<</Subtype/Link/Rect[430.0 253.4 539.4 266.4]/Border[0 0 0]/A 207 0 R>>endobj
+209 0 obj[202 0 R
204 0 R
206 0 R
+208 0 R
]endobj
-208 0 obj<</S/URI/URI(http://samba.org)>>endobj
-209 0 obj<</Subtype/Link/Rect[236.3 338.2 310.8 351.2]/Border[0 0 0]/A 208 0 R>>endobj
-210 0 obj<</S/URI/URI(http://www.skippy.net/linux/smb-howto.html)>>endobj
-211 0 obj<</Subtype/Link/Rect[144.0 285.4 346.1 298.4]/Border[0 0 0]/A 210 0 R>>endobj
-212 0 obj<</S/URI/URI(http://bioserve.latrobe.edu.au/samba)>>endobj
-213 0 obj<</Subtype/Link/Rect[182.5 259.0 345.0 272.0]/Border[0 0 0]/A 212 0 R>>endobj
-214 0 obj<</S/URI/URI(http://samba.org/cifs/)>>endobj
-215 0 obj<</Subtype/Link/Rect[284.9 245.8 381.4 258.8]/Border[0 0 0]/A 214 0 R>>endobj
-216 0 obj<</S/URI/URI(http://mailhost.cb1.com/~lkcl/ntdom/)>>endobj
-217 0 obj<</Subtype/Link/Rect[244.2 232.6 411.2 245.6]/Border[0 0 0]/A 216 0 R>>endobj
-218 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/developr/drg/CIFS/)>>endobj
-219 0 obj<</Subtype/Link/Rect[280.3 219.4 471.9 232.4]/Border[0 0 0]/A 218 0 R>>endobj
-220 0 obj<</S/URI/URI(http://samba.org)>>endobj
-221 0 obj<</Subtype/Link/Rect[361.0 166.6 432.8 179.6]/Border[0 0 0]/A 220 0 R>>endobj
-222 0 obj<</S/URI/URI(http://www.samba-tng.org/)>>endobj
-223 0 obj<</Subtype/Link/Rect[301.1 127.0 425.6 140.0]/Border[0 0 0]/A 222 0 R>>endobj
-224 0 obj[209 0 R
-211 0 R
+210 0 obj<</S/URI/URI(http://samba.org)>>endobj
+211 0 obj<</Subtype/Link/Rect[236.3 338.2 310.8 351.2]/Border[0 0 0]/A 210 0 R>>endobj
+212 0 obj<</S/URI/URI(http://www.skippy.net/linux/smb-howto.html)>>endobj
+213 0 obj<</Subtype/Link/Rect[144.0 285.4 346.1 298.4]/Border[0 0 0]/A 212 0 R>>endobj
+214 0 obj<</S/URI/URI(http://bioserve.latrobe.edu.au/samba)>>endobj
+215 0 obj<</Subtype/Link/Rect[182.5 259.0 345.0 272.0]/Border[0 0 0]/A 214 0 R>>endobj
+216 0 obj<</S/URI/URI(http://samba.org/cifs/)>>endobj
+217 0 obj<</Subtype/Link/Rect[284.9 245.8 381.4 258.8]/Border[0 0 0]/A 216 0 R>>endobj
+218 0 obj<</S/URI/URI(http://mailhost.cb1.com/~lkcl/ntdom/)>>endobj
+219 0 obj<</Subtype/Link/Rect[244.2 232.6 411.2 245.6]/Border[0 0 0]/A 218 0 R>>endobj
+220 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/developr/drg/CIFS/)>>endobj
+221 0 obj<</Subtype/Link/Rect[280.3 219.4 471.9 232.4]/Border[0 0 0]/A 220 0 R>>endobj
+222 0 obj<</S/URI/URI(http://samba.org)>>endobj
+223 0 obj<</Subtype/Link/Rect[361.0 166.6 432.8 179.6]/Border[0 0 0]/A 222 0 R>>endobj
+224 0 obj<</S/URI/URI(http://www.samba-tng.org/)>>endobj
+225 0 obj<</Subtype/Link/Rect[301.1 127.0 425.6 140.0]/Border[0 0 0]/A 224 0 R>>endobj
+226 0 obj[211 0 R
213 0 R
215 0 R
217 0 R
219 0 R
221 0 R
223 0 R
+225 0 R
]endobj
-225 0 obj<</S/URI/URI(http://lists.samba.org/)>>endobj
-226 0 obj<</Subtype/Link/Rect[135.5 351.4 227.8 364.4]/Border[0 0 0]/A 225 0 R>>endobj
-227 0 obj<</S/URI/URI(http://lists.samba.org/mailman/roster/samba-ntdom)>>endobj
-228 0 obj<</Subtype/Link/Rect[309.0 338.2 330.7 351.2]/Border[0 0 0]/A 227 0 R>>endobj
-229 0 obj[226 0 R
-228 0 R
+227 0 obj<</S/URI/URI(http://lists.samba.org/)>>endobj
+228 0 obj<</Subtype/Link/Rect[135.5 351.4 227.8 364.4]/Border[0 0 0]/A 227 0 R>>endobj
+229 0 obj<</S/URI/URI(http://lists.samba.org/mailman/roster/samba-ntdom)>>endobj
+230 0 obj<</Subtype/Link/Rect[309.0 338.2 330.7 351.2]/Border[0 0 0]/A 229 0 R>>endobj
+231 0 obj[228 0 R
+230 0 R
]endobj
-230 0 obj<</S/URI/URI(Samba-PDC-HOWTO.html)>>endobj
-231 0 obj<</Subtype/Link/Rect[213.2 616.6 317.8 629.6]/Border[0 0 0]/A 230 0 R>>endobj
-232 0 obj[231 0 R
+232 0 obj<</S/URI/URI(Samba-PDC-HOWTO.html)>>endobj
+233 0 obj<</Subtype/Link/Rect[213.2 616.6 317.8 629.6]/Border[0 0 0]/A 232 0 R>>endobj
+234 0 obj[233 0 R
]endobj
-233 0 obj<</S/URI/URI(http://www.openldap.org/)>>endobj
-234 0 obj<</Subtype/Link/Rect[172.3 563.8 285.9 576.8]/Border[0 0 0]/A 233 0 R>>endobj
-235 0 obj<</S/URI/URI(http://iplanet.netscape.com/directory)>>endobj
-236 0 obj<</Subtype/Link/Rect[226.6 550.6 387.9 563.6]/Border[0 0 0]/A 235 0 R>>endobj
-237 0 obj<</S/URI/URI(http://www.ora.com/)>>endobj
-238 0 obj<</Subtype/Link/Rect[115.4 524.2 202.0 537.2]/Border[0 0 0]/A 237 0 R>>endobj
-239 0 obj<</S/URI/URI(http://www.unav.es/cti/ldap-smb/ldap-smb-2_2-howto.html)>>endobj
-240 0 obj<</Subtype/Link/Rect[127.9 458.2 267.5 471.2]/Border[0 0 0]/A 239 0 R>>endobj
-241 0 obj<</S/URI/URI(http://samba.idealx.org/)>>endobj
-242 0 obj<</Subtype/Link/Rect[246.4 445.0 287.3 458.0]/Border[0 0 0]/A 241 0 R>>endobj
-243 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
-244 0 obj<</Subtype/Link/Rect[215.6 360.2 332.5 373.2]/Border[0 0 0]/A 243 0 R>>endobj
-245 0 obj[234 0 R
-236 0 R
+235 0 obj<</S/URI/URI(http://www.openldap.org/)>>endobj
+236 0 obj<</Subtype/Link/Rect[172.3 563.8 285.9 576.8]/Border[0 0 0]/A 235 0 R>>endobj
+237 0 obj<</S/URI/URI(http://iplanet.netscape.com/directory)>>endobj
+238 0 obj<</Subtype/Link/Rect[226.6 550.6 387.9 563.6]/Border[0 0 0]/A 237 0 R>>endobj
+239 0 obj<</S/URI/URI(http://www.ora.com/)>>endobj
+240 0 obj<</Subtype/Link/Rect[115.4 524.2 202.0 537.2]/Border[0 0 0]/A 239 0 R>>endobj
+241 0 obj<</S/URI/URI(http://www.unav.es/cti/ldap-smb/ldap-smb-2_2-howto.html)>>endobj
+242 0 obj<</Subtype/Link/Rect[127.9 458.2 267.5 471.2]/Border[0 0 0]/A 241 0 R>>endobj
+243 0 obj<</S/URI/URI(http://samba.idealx.org/)>>endobj
+244 0 obj<</Subtype/Link/Rect[246.4 445.0 287.3 458.0]/Border[0 0 0]/A 243 0 R>>endobj
+245 0 obj<</S/URI/URI(#ENCRYPTPASSWORDS)>>endobj
+246 0 obj<</Subtype/Link/Rect[215.6 360.2 332.5 373.2]/Border[0 0 0]/A 245 0 R>>endobj
+247 0 obj[236 0 R
238 0 R
240 0 R
242 0 R
244 0 R
+246 0 R
]endobj
-246 0 obj<</S/URI/URI(http://www.padl.com/)>>endobj
-247 0 obj<</Subtype/Link/Rect[284.3 589.0 380.9 602.0]/Border[0 0 0]/A 246 0 R>>endobj
-248 0 obj<</S/URI/URI(samba-patches@samba.org)>>endobj
-249 0 obj<</Subtype/Link/Rect[335.0 464.6 458.0 477.6]/Border[0 0 0]/A 248 0 R>>endobj
-250 0 obj<</S/URI/URI(jerry@samba.org)>>endobj
-251 0 obj<</Subtype/Link/Rect[479.4 464.6 555.8 477.6]/Border[0 0 0]/A 250 0 R>>endobj
+248 0 obj<</S/URI/URI(http://www.padl.com/)>>endobj
+249 0 obj<</Subtype/Link/Rect[284.3 589.0 380.9 602.0]/Border[0 0 0]/A 248 0 R>>endobj
+250 0 obj<</S/URI/URI(samba-patches@samba.org)>>endobj
+251 0 obj<</Subtype/Link/Rect[335.0 464.6 458.0 477.6]/Border[0 0 0]/A 250 0 R>>endobj
252 0 obj<</S/URI/URI(jerry@samba.org)>>endobj
-253 0 obj<</Subtype/Link/Rect[273.9 223.8 350.4 236.8]/Border[0 0 0]/A 252 0 R>>endobj
-254 0 obj[247 0 R
-249 0 R
+253 0 obj<</Subtype/Link/Rect[479.4 464.6 555.8 477.6]/Border[0 0 0]/A 252 0 R>>endobj
+254 0 obj<</S/URI/URI(jerry@samba.org)>>endobj
+255 0 obj<</Subtype/Link/Rect[273.9 223.8 350.4 236.8]/Border[0 0 0]/A 254 0 R>>endobj
+256 0 obj[249 0 R
251 0 R
253 0 R
+255 0 R
]endobj
-255 0 obj<</S/URI/URI(#LDAPSSL)>>endobj
-256 0 obj<</Subtype/Link/Rect[108.0 651.4 141.3 664.4]/Border[0 0 0]/A 255 0 R>>endobj
-257 0 obj<</S/URI/URI(#LDAPSERVER)>>endobj
-258 0 obj<</Subtype/Link/Rect[108.0 638.2 156.6 651.2]/Border[0 0 0]/A 257 0 R>>endobj
-259 0 obj<</S/URI/URI(#LDAPADMINDN)>>endobj
-260 0 obj<</Subtype/Link/Rect[108.0 625.0 170.9 638.0]/Border[0 0 0]/A 259 0 R>>endobj
-261 0 obj<</S/URI/URI(#LDAPSUFFIX)>>endobj
-262 0 obj<</Subtype/Link/Rect[108.0 611.8 155.4 624.8]/Border[0 0 0]/A 261 0 R>>endobj
-263 0 obj<</S/URI/URI(#LDAPFILTER)>>endobj
-264 0 obj<</Subtype/Link/Rect[108.0 598.6 151.1 611.6]/Border[0 0 0]/A 263 0 R>>endobj
-265 0 obj<</S/URI/URI(#LDAPPORT)>>endobj
-266 0 obj<</Subtype/Link/Rect[108.0 585.4 147.4 598.4]/Border[0 0 0]/A 265 0 R>>endobj
-267 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
-268 0 obj<</Subtype/Link/Rect[189.6 559.0 243.1 572.0]/Border[0 0 0]/A 267 0 R>>endobj
-269 0 obj[256 0 R
-258 0 R
+257 0 obj<</S/URI/URI(#LDAPSSL)>>endobj
+258 0 obj<</Subtype/Link/Rect[108.0 651.4 141.3 664.4]/Border[0 0 0]/A 257 0 R>>endobj
+259 0 obj<</S/URI/URI(#LDAPSERVER)>>endobj
+260 0 obj<</Subtype/Link/Rect[108.0 638.2 156.6 651.2]/Border[0 0 0]/A 259 0 R>>endobj
+261 0 obj<</S/URI/URI(#LDAPADMINDN)>>endobj
+262 0 obj<</Subtype/Link/Rect[108.0 625.0 170.9 638.0]/Border[0 0 0]/A 261 0 R>>endobj
+263 0 obj<</S/URI/URI(#LDAPSUFFIX)>>endobj
+264 0 obj<</Subtype/Link/Rect[108.0 611.8 155.4 624.8]/Border[0 0 0]/A 263 0 R>>endobj
+265 0 obj<</S/URI/URI(#LDAPFILTER)>>endobj
+266 0 obj<</Subtype/Link/Rect[108.0 598.6 151.1 611.6]/Border[0 0 0]/A 265 0 R>>endobj
+267 0 obj<</S/URI/URI(#LDAPPORT)>>endobj
+268 0 obj<</Subtype/Link/Rect[108.0 585.4 147.4 598.4]/Border[0 0 0]/A 267 0 R>>endobj
+269 0 obj<</S/URI/URI(smb.conf.5.html)>>endobj
+270 0 obj<</Subtype/Link/Rect[189.6 559.0 243.1 572.0]/Border[0 0 0]/A 269 0 R>>endobj
+271 0 obj[258 0 R
260 0 R
262 0 R
264 0 R
266 0 R
268 0 R
+270 0 R
]endobj
-270 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
-271 0 obj<</Subtype/Link/Rect[72.0 451.4 176.8 464.4]/Border[0 0 0]/A 270 0 R>>endobj
-272 0 obj[271 0 R
+272 0 obj<</S/URI/URI(ENCRYPTION.html)>>endobj
+273 0 obj<</Subtype/Link/Rect[72.0 451.4 176.8 464.4]/Border[0 0 0]/A 272 0 R>>endobj
+274 0 obj[273 0 R
]endobj
-273 0 obj<</S/URI/URI(Samba-PDC-HOWTO.html)>>endobj
-274 0 obj<</Subtype/Link/Rect[72.0 391.0 176.7 404.0]/Border[0 0 0]/A 273 0 R>>endobj
-275 0 obj[274 0 R
+275 0 obj<</S/URI/URI(Samba-PDC-HOWTO.html)>>endobj
+276 0 obj<</Subtype/Link/Rect[72.0 391.0 176.7 404.0]/Border[0 0 0]/A 275 0 R>>endobj
+277 0 obj[276 0 R
]endobj
-276 0 obj<</S/URI/URI(mailto:jerry@samba.org)>>endobj
-277 0 obj<</Subtype/Link/Rect[305.4 285.8 381.8 298.8]/Border[0 0 0]/A 276 0 R>>endobj
-278 0 obj[277 0 R
+278 0 obj<</S/URI/URI(mailto:jerry@samba.org)>>endobj
+279 0 obj<</Subtype/Link/Rect[305.4 285.8 381.8 298.8]/Border[0 0 0]/A 278 0 R>>endobj
+280 0 obj[279 0 R
]endobj
-279 0 obj<</S/URI/URI(mailto:jtrostel@snapserver.com)>>endobj
-280 0 obj<</Subtype/Link/Rect[200.6 255.4 310.1 268.4]/Border[0 0 0]/A 279 0 R>>endobj
-281 0 obj[280 0 R
+281 0 obj<</S/URI/URI(mailto:jtrostel@snapserver.com)>>endobj
+282 0 obj<</Subtype/Link/Rect[200.6 255.4 310.1 268.4]/Border[0 0 0]/A 281 0 R>>endobj
+283 0 obj[282 0 R
]endobj
-282 0 obj<</S/URI/URI(http://samba.org/)>>endobj
-283 0 obj<</Subtype/Link/Rect[196.9 385.4 308.1 398.4]/Border[0 0 0]/A 282 0 R>>endobj
-284 0 obj[283 0 R
+284 0 obj<</S/URI/URI(http://samba.org/)>>endobj
+285 0 obj<</Subtype/Link/Rect[196.9 385.4 308.1 398.4]/Border[0 0 0]/A 284 0 R>>endobj
+286 0 obj[285 0 R
]endobj
-285 0 obj<</S/URI/URI(winbindd.8.html)>>endobj
-286 0 obj<</Subtype/Link/Rect[311.8 208.2 366.1 221.2]/Border[0 0 0]/A 285 0 R>>endobj
-287 0 obj<</S/URI/URI(#WINBINDSEPARATOR)>>endobj
-288 0 obj<</Subtype/Link/Rect[100.0 137.2 191.8 148.2]/Border[0 0 0]/A 287 0 R>>endobj
-289 0 obj<</S/URI/URI(#WINBINDUID)>>endobj
-290 0 obj<</Subtype/Link/Rect[100.0 115.6 159.4 126.6]/Border[0 0 0]/A 289 0 R>>endobj
-291 0 obj<</S/URI/URI(#WINBINDGID)>>endobj
-292 0 obj<</Subtype/Link/Rect[100.0 94.0 159.4 105.0]/Border[0 0 0]/A 291 0 R>>endobj
-293 0 obj<</S/URI/URI(#WINBINDENUMUSERS)>>endobj
-294 0 obj<</Subtype/Link/Rect[100.0 72.4 197.2 83.4]/Border[0 0 0]/A 293 0 R>>endobj
-295 0 obj<</S/URI/URI(#WINBINDENUMGROUP)>>endobj
-296 0 obj<</Subtype/Link/Rect[100.0 61.6 202.6 72.6]/Border[0 0 0]/A 295 0 R>>endobj
-297 0 obj[286 0 R
-288 0 R
+287 0 obj<</S/URI/URI(winbindd.8.html)>>endobj
+288 0 obj<</Subtype/Link/Rect[311.8 208.2 366.1 221.2]/Border[0 0 0]/A 287 0 R>>endobj
+289 0 obj<</S/URI/URI(#WINBINDSEPARATOR)>>endobj
+290 0 obj<</Subtype/Link/Rect[100.0 137.2 191.8 148.2]/Border[0 0 0]/A 289 0 R>>endobj
+291 0 obj<</S/URI/URI(#WINBINDUID)>>endobj
+292 0 obj<</Subtype/Link/Rect[100.0 115.6 159.4 126.6]/Border[0 0 0]/A 291 0 R>>endobj
+293 0 obj<</S/URI/URI(#WINBINDGID)>>endobj
+294 0 obj<</Subtype/Link/Rect[100.0 94.0 159.4 105.0]/Border[0 0 0]/A 293 0 R>>endobj
+295 0 obj<</S/URI/URI(#WINBINDENUMUSERS)>>endobj
+296 0 obj<</Subtype/Link/Rect[100.0 72.4 197.2 83.4]/Border[0 0 0]/A 295 0 R>>endobj
+297 0 obj<</S/URI/URI(#WINBINDENUMGROUP)>>endobj
+298 0 obj<</Subtype/Link/Rect[100.0 61.6 202.6 72.6]/Border[0 0 0]/A 297 0 R>>endobj
+299 0 obj[288 0 R
290 0 R
292 0 R
294 0 R
296 0 R
+298 0 R
]endobj
-298 0 obj<</S/URI/URI(#TEMPLATEHOMEDIR)>>endobj
-299 0 obj<</Subtype/Link/Rect[100.0 711.2 186.4 722.2]/Border[0 0 0]/A 298 0 R>>endobj
-300 0 obj<</S/URI/URI(#TEMPLATESHELL)>>endobj
-301 0 obj<</Subtype/Link/Rect[100.0 700.4 175.6 711.4]/Border[0 0 0]/A 300 0 R>>endobj
-302 0 obj[299 0 R
-301 0 R
+300 0 obj<</S/URI/URI(#TEMPLATEHOMEDIR)>>endobj
+301 0 obj<</Subtype/Link/Rect[100.0 711.2 186.4 722.2]/Border[0 0 0]/A 300 0 R>>endobj
+302 0 obj<</S/URI/URI(#TEMPLATESHELL)>>endobj
+303 0 obj<</Subtype/Link/Rect[100.0 700.4 175.6 711.4]/Border[0 0 0]/A 302 0 R>>endobj
+304 0 obj[301 0 R
+303 0 R
]endobj
-303 0 obj<</S/URI/URI(http://carol.wins.uva.nl/~leeuw/samba/warp.html)>>endobj
-304 0 obj<</Subtype/Link/Rect[331.1 607.0 550.0 620.0]/Border[0 0 0]/A 303 0 R>>endobj
-305 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/BusSys/Clients/LANMAN.OS2/)>>endobj
-306 0 obj<</Subtype/Link/Rect[72.0 241.4 319.2 254.4]/Border[0 0 0]/A 305 0 R>>endobj
-307 0 obj<</S/URI/URI(http://carol.wins.uva.nl/~leeuw/lanman.html)>>endobj
-308 0 obj<</Subtype/Link/Rect[346.1 241.4 544.2 254.4]/Border[0 0 0]/A 307 0 R>>endobj
-309 0 obj<</S/URI/URI(ftp://ftp.cdrom.com/pub/os2/network/ndis/)>>endobj
-310 0 obj<</Subtype/Link/Rect[175.9 117.8 366.2 130.8]/Border[0 0 0]/A 309 0 R>>endobj
-311 0 obj[304 0 R
-306 0 R
+305 0 obj<</S/URI/URI(http://carol.wins.uva.nl/~leeuw/samba/warp.html)>>endobj
+306 0 obj<</Subtype/Link/Rect[331.1 607.0 550.0 620.0]/Border[0 0 0]/A 305 0 R>>endobj
+307 0 obj<</S/URI/URI(ftp://ftp.microsoft.com/BusSys/Clients/LANMAN.OS2/)>>endobj
+308 0 obj<</Subtype/Link/Rect[72.0 241.4 319.2 254.4]/Border[0 0 0]/A 307 0 R>>endobj
+309 0 obj<</S/URI/URI(http://carol.wins.uva.nl/~leeuw/lanman.html)>>endobj
+310 0 obj<</Subtype/Link/Rect[346.1 241.4 544.2 254.4]/Border[0 0 0]/A 309 0 R>>endobj
+311 0 obj<</S/URI/URI(ftp://ftp.cdrom.com/pub/os2/network/ndis/)>>endobj
+312 0 obj<</Subtype/Link/Rect[175.9 117.8 366.2 130.8]/Border[0 0 0]/A 311 0 R>>endobj
+313 0 obj[306 0 R
308 0 R
310 0 R
+312 0 R
]endobj
-312 0 obj<</S/URI/URI(http://carol.wins.uva.nl/~leeuw/samba/fix.html)>>endobj
-313 0 obj<</Subtype/Link/Rect[225.7 661.0 434.8 674.0]/Border[0 0 0]/A 312 0 R>>endobj
-314 0 obj[313 0 R
+314 0 obj<</S/URI/URI(http://carol.wins.uva.nl/~leeuw/samba/fix.html)>>endobj
+315 0 obj<</Subtype/Link/Rect[225.7 661.0 434.8 674.0]/Border[0 0 0]/A 314 0 R>>endobj
+316 0 obj[315 0 R
]endobj
-315 0 obj<</S/URI/URI(http://samba.org/samba/cvs.html)>>endobj
-316 0 obj<</Subtype/Link/Rect[357.1 577.0 500.7 590.0]/Border[0 0 0]/A 315 0 R>>endobj
-317 0 obj<</S/URI/URI(http://samba.org/cgi-bin/cvsweb)>>endobj
-318 0 obj<</Subtype/Link/Rect[138.6 354.6 283.2 367.6]/Border[0 0 0]/A 317 0 R>>endobj
-319 0 obj<</S/URI/URI(http://www.cyclic.com/)>>endobj
-320 0 obj<</Subtype/Link/Rect[394.3 230.2 498.2 243.2]/Border[0 0 0]/A 319 0 R>>endobj
-321 0 obj[316 0 R
-318 0 R
+317 0 obj<</S/URI/URI(http://samba.org/samba/cvs.html)>>endobj
+318 0 obj<</Subtype/Link/Rect[357.1 577.0 500.7 590.0]/Border[0 0 0]/A 317 0 R>>endobj
+319 0 obj<</S/URI/URI(http://samba.org/cgi-bin/cvsweb)>>endobj
+320 0 obj<</Subtype/Link/Rect[138.6 354.6 283.2 367.6]/Border[0 0 0]/A 319 0 R>>endobj
+321 0 obj<</S/URI/URI(http://www.cyclic.com/)>>endobj
+322 0 obj<</Subtype/Link/Rect[394.3 230.2 498.2 243.2]/Border[0 0 0]/A 321 0 R>>endobj
+323 0 obj[318 0 R
320 0 R
+322 0 R
]endobj
-322 0 obj<</S/URI/URI(x1098.htm)>>endobj
-323 0 obj<</Subtype/Link/Rect[201.6 408.2 258.1 421.2]/Border[0 0 0]/A 322 0 R>>endobj
-324 0 obj[323 0 R
+324 0 obj<</S/URI/URI(x1100.htm)>>endobj
+325 0 obj<</Subtype/Link/Rect[201.6 408.2 258.1 421.2]/Border[0 0 0]/A 324 0 R>>endobj
+326 0 obj[325 0 R
]endobj
-325 0 obj<</Subtype/Link/Rect[72.0 684.0 277.3 697.0]/Border[0 0 0]/Dest[637 0 R/XYZ null 798 0]>>endobj
-326 0 obj<</Subtype/Link/Rect[108.0 670.8 249.2 683.8]/Border[0 0 0]/Dest[637 0 R/XYZ null 730 0]>>endobj
-327 0 obj<</Subtype/Link/Rect[108.0 657.6 255.0 670.6]/Border[0 0 0]/Dest[637 0 R/XYZ null 593 0]>>endobj
-328 0 obj<</Subtype/Link/Rect[108.0 644.4 257.7 657.4]/Border[0 0 0]/Dest[637 0 R/XYZ null 178 0]>>endobj
-329 0 obj<</Subtype/Link/Rect[108.0 631.2 309.0 644.2]/Border[0 0 0]/Dest[640 0 R/XYZ null 739 0]>>endobj
-330 0 obj<</Subtype/Link/Rect[108.0 618.0 316.7 631.0]/Border[0 0 0]/Dest[640 0 R/XYZ null 379 0]>>endobj
-331 0 obj<</Subtype/Link/Rect[108.0 604.8 284.9 617.8]/Border[0 0 0]/Dest[640 0 R/XYZ null 268 0]>>endobj
-332 0 obj<</Subtype/Link/Rect[108.0 591.6 280.0 604.6]/Border[0 0 0]/Dest[643 0 R/XYZ null 768 0]>>endobj
-333 0 obj<</Subtype/Link/Rect[108.0 578.4 328.6 591.4]/Border[0 0 0]/Dest[643 0 R/XYZ null 266 0]>>endobj
-334 0 obj<</Subtype/Link/Rect[108.0 565.2 364.9 578.2]/Border[0 0 0]/Dest[646 0 R/XYZ null 686 0]>>endobj
-335 0 obj<</Subtype/Link/Rect[108.0 552.0 315.8 565.0]/Border[0 0 0]/Dest[646 0 R/XYZ null 509 0]>>endobj
-336 0 obj<</Subtype/Link/Rect[108.0 538.8 514.3 551.8]/Border[0 0 0]/Dest[646 0 R/XYZ null 332 0]>>endobj
-337 0 obj<</Subtype/Link/Rect[108.0 525.6 259.4 538.6]/Border[0 0 0]/Dest[649 0 R/XYZ null 768 0]>>endobj
-338 0 obj<</Subtype/Link/Rect[108.0 512.4 236.0 525.4]/Border[0 0 0]/Dest[649 0 R/XYZ null 577 0]>>endobj
-339 0 obj<</Subtype/Link/Rect[108.0 499.2 186.5 512.2]/Border[0 0 0]/Dest[649 0 R/XYZ null 505 0]>>endobj
-340 0 obj<</Subtype/Link/Rect[108.0 486.0 267.2 499.0]/Border[0 0 0]/Dest[649 0 R/XYZ null 394 0]>>endobj
-341 0 obj<</Subtype/Link/Rect[108.0 472.8 295.6 485.8]/Border[0 0 0]/Dest[652 0 R/XYZ null 739 0]>>endobj
-342 0 obj<</Subtype/Link/Rect[108.0 459.6 177.7 472.6]/Border[0 0 0]/Dest[652 0 R/XYZ null 615 0]>>endobj
-343 0 obj<</Subtype/Link/Rect[108.0 446.4 232.3 459.4]/Border[0 0 0]/Dest[655 0 R/XYZ null 768 0]>>endobj
-344 0 obj<</Subtype/Link/Rect[108.0 433.2 232.6 446.2]/Border[0 0 0]/Dest[655 0 R/XYZ null 683 0]>>endobj
-345 0 obj<</Subtype/Link/Rect[72.0 406.8 348.8 419.8]/Border[0 0 0]/Dest[658 0 R/XYZ null 798 0]>>endobj
-346 0 obj<</Subtype/Link/Rect[108.0 393.6 161.5 406.6]/Border[0 0 0]/Dest[658 0 R/XYZ null 706 0]>>endobj
-347 0 obj<</Subtype/Link/Rect[108.0 380.4 327.7 393.4]/Border[0 0 0]/Dest[658 0 R/XYZ null 463 0]>>endobj
-348 0 obj<</Subtype/Link/Rect[108.0 367.2 177.1 380.2]/Border[0 0 0]/Dest[658 0 R/XYZ null 325 0]>>endobj
-349 0 obj<</Subtype/Link/Rect[108.0 354.0 203.6 367.0]/Border[0 0 0]/Dest[661 0 R/XYZ null 435 0]>>endobj
-350 0 obj<</Subtype/Link/Rect[108.0 340.8 195.1 353.8]/Border[0 0 0]/Dest[661 0 R/XYZ null 285 0]>>endobj
-351 0 obj<</Subtype/Link/Rect[108.0 327.6 215.2 340.6]/Border[0 0 0]/Dest[664 0 R/XYZ null 768 0]>>endobj
-352 0 obj<</Subtype/Link/Rect[108.0 314.4 382.4 327.4]/Border[0 0 0]/Dest[664 0 R/XYZ null 268 0]>>endobj
-353 0 obj<</Subtype/Link/Rect[108.0 301.2 255.6 314.2]/Border[0 0 0]/Dest[667 0 R/XYZ null 210 0]>>endobj
-354 0 obj<</Subtype/Link/Rect[108.0 288.0 224.1 301.0]/Border[0 0 0]/Dest[670 0 R/XYZ null 660 0]>>endobj
-355 0 obj<</Subtype/Link/Rect[108.0 274.8 187.8 287.8]/Border[0 0 0]/Dest[673 0 R/XYZ null 371 0]>>endobj
-356 0 obj<</Subtype/Link/Rect[108.0 261.6 194.5 274.6]/Border[0 0 0]/Dest[673 0 R/XYZ null 260 0]>>endobj
-357 0 obj<</Subtype/Link/Rect[108.0 248.4 200.6 261.4]/Border[0 0 0]/Dest[676 0 R/XYZ null 768 0]>>endobj
-358 0 obj<</Subtype/Link/Rect[108.0 235.2 526.0 248.2]/Border[0 0 0]/Dest[676 0 R/XYZ null 529 0]>>endobj
-359 0 obj<</Subtype/Link/Rect[108.0 222.0 500.6 235.0]/Border[0 0 0]/Dest[679 0 R/XYZ null 633 0]>>endobj
-360 0 obj<</Subtype/Link/Rect[108.0 208.8 353.3 221.8]/Border[0 0 0]/Dest[682 0 R/XYZ null 581 0]>>endobj
-361 0 obj<</Subtype/Link/Rect[108.0 195.6 419.0 208.6]/Border[0 0 0]/Dest[682 0 R/XYZ null 304 0]>>endobj
-362 0 obj<</Subtype/Link/Rect[108.0 182.4 332.5 195.4]/Border[0 0 0]/Dest[685 0 R/XYZ null 594 0]>>endobj
-363 0 obj<</Subtype/Link/Rect[108.0 169.2 181.6 182.2]/Border[0 0 0]/Dest[688 0 R/XYZ null 639 0]>>endobj
-364 0 obj<</Subtype/Link/Rect[72.0 142.8 463.4 155.8]/Border[0 0 0]/Dest[691 0 R/XYZ null 798 0]>>endobj
-365 0 obj<</Subtype/Link/Rect[108.0 129.6 202.4 142.6]/Border[0 0 0]/Dest[691 0 R/XYZ null 706 0]>>endobj
-366 0 obj<</Subtype/Link/Rect[108.0 116.4 244.9 129.4]/Border[0 0 0]/Dest[694 0 R/XYZ null 179 0]>>endobj
-367 0 obj<</Subtype/Link/Rect[108.0 103.2 270.3 116.2]/Border[0 0 0]/Dest[697 0 R/XYZ null 726 0]>>endobj
-368 0 obj<</Subtype/Link/Rect[72.0 76.8 402.3 89.8]/Border[0 0 0]/Dest[700 0 R/XYZ null 798 0]>>endobj
-369 0 obj<</Subtype/Link/Rect[108.0 63.6 179.2 76.6]/Border[0 0 0]/Dest[700 0 R/XYZ null 706 0]>>endobj
-370 0 obj[325 0 R
-326 0 R
-327 0 R
+327 0 obj<</Subtype/Link/Rect[72.0 684.0 277.3 697.0]/Border[0 0 0]/Dest[639 0 R/XYZ null 798 0]>>endobj
+328 0 obj<</Subtype/Link/Rect[108.0 670.8 249.2 683.8]/Border[0 0 0]/Dest[639 0 R/XYZ null 730 0]>>endobj
+329 0 obj<</Subtype/Link/Rect[108.0 657.6 255.0 670.6]/Border[0 0 0]/Dest[639 0 R/XYZ null 593 0]>>endobj
+330 0 obj<</Subtype/Link/Rect[108.0 644.4 257.7 657.4]/Border[0 0 0]/Dest[639 0 R/XYZ null 178 0]>>endobj
+331 0 obj<</Subtype/Link/Rect[108.0 631.2 309.0 644.2]/Border[0 0 0]/Dest[642 0 R/XYZ null 739 0]>>endobj
+332 0 obj<</Subtype/Link/Rect[108.0 618.0 316.7 631.0]/Border[0 0 0]/Dest[642 0 R/XYZ null 379 0]>>endobj
+333 0 obj<</Subtype/Link/Rect[108.0 604.8 284.9 617.8]/Border[0 0 0]/Dest[642 0 R/XYZ null 268 0]>>endobj
+334 0 obj<</Subtype/Link/Rect[108.0 591.6 280.0 604.6]/Border[0 0 0]/Dest[645 0 R/XYZ null 768 0]>>endobj
+335 0 obj<</Subtype/Link/Rect[108.0 578.4 328.6 591.4]/Border[0 0 0]/Dest[645 0 R/XYZ null 266 0]>>endobj
+336 0 obj<</Subtype/Link/Rect[108.0 565.2 364.9 578.2]/Border[0 0 0]/Dest[648 0 R/XYZ null 686 0]>>endobj
+337 0 obj<</Subtype/Link/Rect[108.0 552.0 315.8 565.0]/Border[0 0 0]/Dest[648 0 R/XYZ null 509 0]>>endobj
+338 0 obj<</Subtype/Link/Rect[108.0 538.8 514.3 551.8]/Border[0 0 0]/Dest[648 0 R/XYZ null 332 0]>>endobj
+339 0 obj<</Subtype/Link/Rect[108.0 525.6 259.4 538.6]/Border[0 0 0]/Dest[651 0 R/XYZ null 768 0]>>endobj
+340 0 obj<</Subtype/Link/Rect[108.0 512.4 236.0 525.4]/Border[0 0 0]/Dest[651 0 R/XYZ null 577 0]>>endobj
+341 0 obj<</Subtype/Link/Rect[108.0 499.2 186.5 512.2]/Border[0 0 0]/Dest[651 0 R/XYZ null 505 0]>>endobj
+342 0 obj<</Subtype/Link/Rect[108.0 486.0 267.2 499.0]/Border[0 0 0]/Dest[651 0 R/XYZ null 394 0]>>endobj
+343 0 obj<</Subtype/Link/Rect[108.0 472.8 295.6 485.8]/Border[0 0 0]/Dest[654 0 R/XYZ null 739 0]>>endobj
+344 0 obj<</Subtype/Link/Rect[108.0 459.6 177.7 472.6]/Border[0 0 0]/Dest[654 0 R/XYZ null 615 0]>>endobj
+345 0 obj<</Subtype/Link/Rect[108.0 446.4 232.3 459.4]/Border[0 0 0]/Dest[657 0 R/XYZ null 768 0]>>endobj
+346 0 obj<</Subtype/Link/Rect[108.0 433.2 232.6 446.2]/Border[0 0 0]/Dest[657 0 R/XYZ null 683 0]>>endobj
+347 0 obj<</Subtype/Link/Rect[72.0 406.8 348.8 419.8]/Border[0 0 0]/Dest[660 0 R/XYZ null 798 0]>>endobj
+348 0 obj<</Subtype/Link/Rect[108.0 393.6 161.5 406.6]/Border[0 0 0]/Dest[660 0 R/XYZ null 706 0]>>endobj
+349 0 obj<</Subtype/Link/Rect[108.0 380.4 327.7 393.4]/Border[0 0 0]/Dest[660 0 R/XYZ null 463 0]>>endobj
+350 0 obj<</Subtype/Link/Rect[108.0 367.2 177.1 380.2]/Border[0 0 0]/Dest[660 0 R/XYZ null 325 0]>>endobj
+351 0 obj<</Subtype/Link/Rect[108.0 354.0 203.6 367.0]/Border[0 0 0]/Dest[663 0 R/XYZ null 435 0]>>endobj
+352 0 obj<</Subtype/Link/Rect[108.0 340.8 195.1 353.8]/Border[0 0 0]/Dest[663 0 R/XYZ null 285 0]>>endobj
+353 0 obj<</Subtype/Link/Rect[108.0 327.6 215.2 340.6]/Border[0 0 0]/Dest[666 0 R/XYZ null 768 0]>>endobj
+354 0 obj<</Subtype/Link/Rect[108.0 314.4 382.4 327.4]/Border[0 0 0]/Dest[666 0 R/XYZ null 268 0]>>endobj
+355 0 obj<</Subtype/Link/Rect[108.0 301.2 255.6 314.2]/Border[0 0 0]/Dest[669 0 R/XYZ null 210 0]>>endobj
+356 0 obj<</Subtype/Link/Rect[108.0 288.0 224.1 301.0]/Border[0 0 0]/Dest[672 0 R/XYZ null 660 0]>>endobj
+357 0 obj<</Subtype/Link/Rect[108.0 274.8 187.8 287.8]/Border[0 0 0]/Dest[675 0 R/XYZ null 371 0]>>endobj
+358 0 obj<</Subtype/Link/Rect[108.0 261.6 194.5 274.6]/Border[0 0 0]/Dest[675 0 R/XYZ null 260 0]>>endobj
+359 0 obj<</Subtype/Link/Rect[108.0 248.4 200.6 261.4]/Border[0 0 0]/Dest[678 0 R/XYZ null 768 0]>>endobj
+360 0 obj<</Subtype/Link/Rect[108.0 235.2 526.0 248.2]/Border[0 0 0]/Dest[678 0 R/XYZ null 529 0]>>endobj
+361 0 obj<</Subtype/Link/Rect[108.0 222.0 500.6 235.0]/Border[0 0 0]/Dest[681 0 R/XYZ null 633 0]>>endobj
+362 0 obj<</Subtype/Link/Rect[108.0 208.8 353.3 221.8]/Border[0 0 0]/Dest[684 0 R/XYZ null 581 0]>>endobj
+363 0 obj<</Subtype/Link/Rect[108.0 195.6 419.0 208.6]/Border[0 0 0]/Dest[684 0 R/XYZ null 304 0]>>endobj
+364 0 obj<</Subtype/Link/Rect[108.0 182.4 332.5 195.4]/Border[0 0 0]/Dest[687 0 R/XYZ null 594 0]>>endobj
+365 0 obj<</Subtype/Link/Rect[108.0 169.2 181.6 182.2]/Border[0 0 0]/Dest[690 0 R/XYZ null 639 0]>>endobj
+366 0 obj<</Subtype/Link/Rect[72.0 142.8 463.4 155.8]/Border[0 0 0]/Dest[693 0 R/XYZ null 798 0]>>endobj
+367 0 obj<</Subtype/Link/Rect[108.0 129.6 202.4 142.6]/Border[0 0 0]/Dest[693 0 R/XYZ null 706 0]>>endobj
+368 0 obj<</Subtype/Link/Rect[108.0 116.4 244.9 129.4]/Border[0 0 0]/Dest[696 0 R/XYZ null 179 0]>>endobj
+369 0 obj<</Subtype/Link/Rect[108.0 103.2 270.3 116.2]/Border[0 0 0]/Dest[699 0 R/XYZ null 726 0]>>endobj
+370 0 obj<</Subtype/Link/Rect[72.0 76.8 402.3 89.8]/Border[0 0 0]/Dest[702 0 R/XYZ null 798 0]>>endobj
+371 0 obj<</Subtype/Link/Rect[108.0 63.6 179.2 76.6]/Border[0 0 0]/Dest[702 0 R/XYZ null 706 0]>>endobj
+372 0 obj[327 0 R
328 0 R
329 0 R
330 0 R
@@ -550,54 +551,54 @@
367 0 R
368 0 R
369 0 R
+370 0 R
+371 0 R
]endobj
-371 0 obj<</Subtype/Link/Rect[108.0 684.0 161.2 697.0]/Border[0 0 0]/Dest[703 0 R/XYZ null 673 0]>>endobj
-372 0 obj<</Subtype/Link/Rect[72.0 657.6 412.7 670.6]/Border[0 0 0]/Dest[706 0 R/XYZ null 798 0]>>endobj
-373 0 obj<</Subtype/Link/Rect[108.0 644.4 447.4 657.4]/Border[0 0 0]/Dest[706 0 R/XYZ null 706 0]>>endobj
-374 0 obj<</Subtype/Link/Rect[108.0 631.2 319.1 644.2]/Border[0 0 0]/Dest[706 0 R/XYZ null 525 0]>>endobj
-375 0 obj<</Subtype/Link/Rect[108.0 618.0 231.1 631.0]/Border[0 0 0]/Dest[706 0 R/XYZ null 348 0]>>endobj
-376 0 obj<</Subtype/Link/Rect[108.0 604.8 292.2 617.8]/Border[0 0 0]/Dest[709 0 R/XYZ null 686 0]>>endobj
-377 0 obj<</Subtype/Link/Rect[108.0 591.6 208.5 604.6]/Border[0 0 0]/Dest[709 0 R/XYZ null 443 0]>>endobj
-378 0 obj<</Subtype/Link/Rect[108.0 578.4 233.6 591.4]/Border[0 0 0]/Dest[709 0 R/XYZ null 187 0]>>endobj
-379 0 obj<</Subtype/Link/Rect[108.0 565.2 301.4 578.2]/Border[0 0 0]/Dest[712 0 R/XYZ null 673 0]>>endobj
-380 0 obj<</Subtype/Link/Rect[108.0 552.0 394.8 565.0]/Border[0 0 0]/Dest[712 0 R/XYZ null 232 0]>>endobj
-381 0 obj<</Subtype/Link/Rect[108.0 538.8 386.9 551.8]/Border[0 0 0]/Dest[718 0 R/XYZ null 594 0]>>endobj
-382 0 obj<</Subtype/Link/Rect[72.0 512.4 277.1 525.4]/Border[0 0 0]/Dest[721 0 R/XYZ null 798 0]>>endobj
-383 0 obj<</Subtype/Link/Rect[108.0 499.2 181.6 512.2]/Border[0 0 0]/Dest[721 0 R/XYZ null 730 0]>>endobj
-384 0 obj<</Subtype/Link/Rect[108.0 486.0 189.0 499.0]/Border[0 0 0]/Dest[721 0 R/XYZ null 302 0]>>endobj
-385 0 obj<</Subtype/Link/Rect[108.0 472.8 209.7 485.8]/Border[0 0 0]/Dest[724 0 R/XYZ null 693 0]>>endobj
-386 0 obj<</Subtype/Link/Rect[108.0 459.6 294.4 472.6]/Border[0 0 0]/Dest[727 0 R/XYZ null 463 0]>>endobj
-387 0 obj<</Subtype/Link/Rect[108.0 446.4 287.3 459.4]/Border[0 0 0]/Dest[730 0 R/XYZ null 686 0]>>endobj
-388 0 obj<</Subtype/Link/Rect[108.0 433.2 350.9 446.2]/Border[0 0 0]/Dest[730 0 R/XYZ null 302 0]>>endobj
-389 0 obj<</Subtype/Link/Rect[108.0 420.0 242.1 433.0]/Border[0 0 0]/Dest[733 0 R/XYZ null 686 0]>>endobj
-390 0 obj<</Subtype/Link/Rect[108.0 406.8 220.1 419.8]/Border[0 0 0]/Dest[733 0 R/XYZ null 496 0]>>endobj
-391 0 obj<</Subtype/Link/Rect[108.0 393.6 214.3 406.6]/Border[0 0 0]/Dest[733 0 R/XYZ null 385 0]>>endobj
-392 0 obj<</Subtype/Link/Rect[108.0 380.4 281.2 393.4]/Border[0 0 0]/Dest[733 0 R/XYZ null 247 0]>>endobj
-393 0 obj<</Subtype/Link/Rect[108.0 367.2 222.3 380.2]/Border[0 0 0]/Dest[733 0 R/XYZ null 149 0]>>endobj
-394 0 obj<</Subtype/Link/Rect[108.0 354.0 234.5 367.0]/Border[0 0 0]/Dest[736 0 R/XYZ null 713 0]>>endobj
-395 0 obj<</Subtype/Link/Rect[108.0 340.8 300.2 353.8]/Border[0 0 0]/Dest[739 0 R/XYZ null 768 0]>>endobj
-396 0 obj<</Subtype/Link/Rect[72.0 314.4 272.9 327.4]/Border[0 0 0]/Dest[742 0 R/XYZ null 798 0]>>endobj
-397 0 obj<</Subtype/Link/Rect[108.0 301.2 299.9 314.2]/Border[0 0 0]/Dest[742 0 R/XYZ null 730 0]>>endobj
-398 0 obj<</Subtype/Link/Rect[108.0 288.0 288.0 301.0]/Border[0 0 0]/Dest[745 0 R/XYZ null 383 0]>>endobj
-399 0 obj<</Subtype/Link/Rect[108.0 274.8 307.9 287.8]/Border[0 0 0]/Dest[745 0 R/XYZ null 166 0]>>endobj
-400 0 obj<</Subtype/Link/Rect[72.0 248.4 416.3 261.4]/Border[0 0 0]/Dest[751 0 R/XYZ null 798 0]>>endobj
-401 0 obj<</Subtype/Link/Rect[108.0 235.2 219.2 248.2]/Border[0 0 0]/Dest[751 0 R/XYZ null 706 0]>>endobj
-402 0 obj<</Subtype/Link/Rect[108.0 222.0 181.0 235.0]/Border[0 0 0]/Dest[751 0 R/XYZ null 608 0]>>endobj
-403 0 obj<</Subtype/Link/Rect[108.0 208.8 316.1 221.8]/Border[0 0 0]/Dest[754 0 R/XYZ null 726 0]>>endobj
-404 0 obj<</Subtype/Link/Rect[108.0 195.6 430.0 208.6]/Border[0 0 0]/Dest[757 0 R/XYZ null 607 0]>>endobj
-405 0 obj<</Subtype/Link/Rect[108.0 182.4 333.2 195.4]/Border[0 0 0]/Dest[757 0 R/XYZ null 232 0]>>endobj
-406 0 obj<</Subtype/Link/Rect[108.0 169.2 362.5 182.2]/Border[0 0 0]/Dest[760 0 R/XYZ null 359 0]>>endobj
-407 0 obj<</Subtype/Link/Rect[108.0 156.0 279.4 169.0]/Border[0 0 0]/Dest[763 0 R/XYZ null 768 0]>>endobj
-408 0 obj<</Subtype/Link/Rect[108.0 142.8 261.4 155.8]/Border[0 0 0]/Dest[763 0 R/XYZ null 392 0]>>endobj
-409 0 obj<</Subtype/Link/Rect[108.0 129.6 252.8 142.6]/Border[0 0 0]/Dest[769 0 R/XYZ null 739 0]>>endobj
-410 0 obj<</Subtype/Link/Rect[108.0 116.4 243.6 129.4]/Border[0 0 0]/Dest[772 0 R/XYZ null 686 0]>>endobj
-411 0 obj<</Subtype/Link/Rect[108.0 103.2 292.9 116.2]/Border[0 0 0]/Dest[778 0 R/XYZ null 303 0]>>endobj
-412 0 obj<</Subtype/Link/Rect[108.0 90.0 332.0 103.0]/Border[0 0 0]/Dest[781 0 R/XYZ null 277 0]>>endobj
-413 0 obj<</Subtype/Link/Rect[108.0 76.8 406.2 89.8]/Border[0 0 0]/Dest[784 0 R/XYZ null 482 0]>>endobj
-414 0 obj<</Subtype/Link/Rect[108.0 63.6 431.0 76.6]/Border[0 0 0]/Dest[796 0 R/XYZ null 274 0]>>endobj
-415 0 obj[371 0 R
-372 0 R
-373 0 R
+373 0 obj<</Subtype/Link/Rect[108.0 684.0 161.2 697.0]/Border[0 0 0]/Dest[705 0 R/XYZ null 673 0]>>endobj
+374 0 obj<</Subtype/Link/Rect[72.0 657.6 412.7 670.6]/Border[0 0 0]/Dest[708 0 R/XYZ null 798 0]>>endobj
+375 0 obj<</Subtype/Link/Rect[108.0 644.4 447.4 657.4]/Border[0 0 0]/Dest[708 0 R/XYZ null 706 0]>>endobj
+376 0 obj<</Subtype/Link/Rect[108.0 631.2 319.1 644.2]/Border[0 0 0]/Dest[708 0 R/XYZ null 525 0]>>endobj
+377 0 obj<</Subtype/Link/Rect[108.0 618.0 231.1 631.0]/Border[0 0 0]/Dest[708 0 R/XYZ null 348 0]>>endobj
+378 0 obj<</Subtype/Link/Rect[108.0 604.8 292.2 617.8]/Border[0 0 0]/Dest[711 0 R/XYZ null 686 0]>>endobj
+379 0 obj<</Subtype/Link/Rect[108.0 591.6 208.5 604.6]/Border[0 0 0]/Dest[711 0 R/XYZ null 443 0]>>endobj
+380 0 obj<</Subtype/Link/Rect[108.0 578.4 233.6 591.4]/Border[0 0 0]/Dest[711 0 R/XYZ null 187 0]>>endobj
+381 0 obj<</Subtype/Link/Rect[108.0 565.2 301.4 578.2]/Border[0 0 0]/Dest[714 0 R/XYZ null 673 0]>>endobj
+382 0 obj<</Subtype/Link/Rect[108.0 552.0 394.8 565.0]/Border[0 0 0]/Dest[714 0 R/XYZ null 232 0]>>endobj
+383 0 obj<</Subtype/Link/Rect[108.0 538.8 386.9 551.8]/Border[0 0 0]/Dest[720 0 R/XYZ null 594 0]>>endobj
+384 0 obj<</Subtype/Link/Rect[72.0 512.4 277.1 525.4]/Border[0 0 0]/Dest[723 0 R/XYZ null 798 0]>>endobj
+385 0 obj<</Subtype/Link/Rect[108.0 499.2 181.6 512.2]/Border[0 0 0]/Dest[723 0 R/XYZ null 730 0]>>endobj
+386 0 obj<</Subtype/Link/Rect[108.0 486.0 189.0 499.0]/Border[0 0 0]/Dest[723 0 R/XYZ null 302 0]>>endobj
+387 0 obj<</Subtype/Link/Rect[108.0 472.8 209.7 485.8]/Border[0 0 0]/Dest[726 0 R/XYZ null 693 0]>>endobj
+388 0 obj<</Subtype/Link/Rect[108.0 459.6 294.4 472.6]/Border[0 0 0]/Dest[729 0 R/XYZ null 450 0]>>endobj
+389 0 obj<</Subtype/Link/Rect[108.0 446.4 287.3 459.4]/Border[0 0 0]/Dest[732 0 R/XYZ null 686 0]>>endobj
+390 0 obj<</Subtype/Link/Rect[108.0 433.2 350.9 446.2]/Border[0 0 0]/Dest[732 0 R/XYZ null 302 0]>>endobj
+391 0 obj<</Subtype/Link/Rect[108.0 420.0 242.1 433.0]/Border[0 0 0]/Dest[735 0 R/XYZ null 686 0]>>endobj
+392 0 obj<</Subtype/Link/Rect[108.0 406.8 220.1 419.8]/Border[0 0 0]/Dest[735 0 R/XYZ null 496 0]>>endobj
+393 0 obj<</Subtype/Link/Rect[108.0 393.6 214.3 406.6]/Border[0 0 0]/Dest[735 0 R/XYZ null 385 0]>>endobj
+394 0 obj<</Subtype/Link/Rect[108.0 380.4 281.2 393.4]/Border[0 0 0]/Dest[735 0 R/XYZ null 247 0]>>endobj
+395 0 obj<</Subtype/Link/Rect[108.0 367.2 222.3 380.2]/Border[0 0 0]/Dest[735 0 R/XYZ null 149 0]>>endobj
+396 0 obj<</Subtype/Link/Rect[108.0 354.0 234.5 367.0]/Border[0 0 0]/Dest[738 0 R/XYZ null 713 0]>>endobj
+397 0 obj<</Subtype/Link/Rect[108.0 340.8 300.2 353.8]/Border[0 0 0]/Dest[741 0 R/XYZ null 768 0]>>endobj
+398 0 obj<</Subtype/Link/Rect[72.0 314.4 272.9 327.4]/Border[0 0 0]/Dest[744 0 R/XYZ null 798 0]>>endobj
+399 0 obj<</Subtype/Link/Rect[108.0 301.2 299.9 314.2]/Border[0 0 0]/Dest[744 0 R/XYZ null 730 0]>>endobj
+400 0 obj<</Subtype/Link/Rect[108.0 288.0 288.0 301.0]/Border[0 0 0]/Dest[747 0 R/XYZ null 383 0]>>endobj
+401 0 obj<</Subtype/Link/Rect[108.0 274.8 307.9 287.8]/Border[0 0 0]/Dest[747 0 R/XYZ null 166 0]>>endobj
+402 0 obj<</Subtype/Link/Rect[72.0 248.4 416.3 261.4]/Border[0 0 0]/Dest[753 0 R/XYZ null 798 0]>>endobj
+403 0 obj<</Subtype/Link/Rect[108.0 235.2 219.2 248.2]/Border[0 0 0]/Dest[753 0 R/XYZ null 706 0]>>endobj
+404 0 obj<</Subtype/Link/Rect[108.0 222.0 181.0 235.0]/Border[0 0 0]/Dest[753 0 R/XYZ null 608 0]>>endobj
+405 0 obj<</Subtype/Link/Rect[108.0 208.8 316.1 221.8]/Border[0 0 0]/Dest[756 0 R/XYZ null 726 0]>>endobj
+406 0 obj<</Subtype/Link/Rect[108.0 195.6 430.0 208.6]/Border[0 0 0]/Dest[759 0 R/XYZ null 607 0]>>endobj
+407 0 obj<</Subtype/Link/Rect[108.0 182.4 333.2 195.4]/Border[0 0 0]/Dest[759 0 R/XYZ null 232 0]>>endobj
+408 0 obj<</Subtype/Link/Rect[108.0 169.2 362.5 182.2]/Border[0 0 0]/Dest[762 0 R/XYZ null 359 0]>>endobj
+409 0 obj<</Subtype/Link/Rect[108.0 156.0 279.4 169.0]/Border[0 0 0]/Dest[765 0 R/XYZ null 768 0]>>endobj
+410 0 obj<</Subtype/Link/Rect[108.0 142.8 261.4 155.8]/Border[0 0 0]/Dest[765 0 R/XYZ null 392 0]>>endobj
+411 0 obj<</Subtype/Link/Rect[108.0 129.6 252.8 142.6]/Border[0 0 0]/Dest[771 0 R/XYZ null 739 0]>>endobj
+412 0 obj<</Subtype/Link/Rect[108.0 116.4 243.6 129.4]/Border[0 0 0]/Dest[774 0 R/XYZ null 686 0]>>endobj
+413 0 obj<</Subtype/Link/Rect[108.0 103.2 292.9 116.2]/Border[0 0 0]/Dest[780 0 R/XYZ null 303 0]>>endobj
+414 0 obj<</Subtype/Link/Rect[108.0 90.0 332.0 103.0]/Border[0 0 0]/Dest[783 0 R/XYZ null 277 0]>>endobj
+415 0 obj<</Subtype/Link/Rect[108.0 76.8 406.2 89.8]/Border[0 0 0]/Dest[786 0 R/XYZ null 482 0]>>endobj
+416 0 obj<</Subtype/Link/Rect[108.0 63.6 431.0 76.6]/Border[0 0 0]/Dest[798 0 R/XYZ null 274 0]>>endobj
+417 0 obj[373 0 R
374 0 R
375 0 R
376 0 R
@@ -639,55 +640,55 @@
412 0 R
413 0 R
414 0 R
+415 0 R
+416 0 R
]endobj
-416 0 obj<</Subtype/Link/Rect[72.0 684.0 329.6 697.0]/Border[0 0 0]/Dest[805 0 R/XYZ null 798 0]>>endobj
-417 0 obj<</Subtype/Link/Rect[108.0 670.8 219.2 683.8]/Border[0 0 0]/Dest[805 0 R/XYZ null 706 0]>>endobj
-418 0 obj<</Subtype/Link/Rect[108.0 657.6 181.0 670.6]/Border[0 0 0]/Dest[805 0 R/XYZ null 621 0]>>endobj
-419 0 obj<</Subtype/Link/Rect[108.0 644.4 359.1 657.4]/Border[0 0 0]/Dest[805 0 R/XYZ null 239 0]>>endobj
-420 0 obj<</Subtype/Link/Rect[108.0 631.2 364.3 644.2]/Border[0 0 0]/Dest[808 0 R/XYZ null 768 0]>>endobj
-421 0 obj<</Subtype/Link/Rect[108.0 618.0 251.0 631.0]/Border[0 0 0]/Dest[808 0 R/XYZ null 630 0]>>endobj
-422 0 obj<</Subtype/Link/Rect[108.0 604.8 325.8 617.8]/Border[0 0 0]/Dest[808 0 R/XYZ null 532 0]>>endobj
-423 0 obj<</Subtype/Link/Rect[108.0 591.6 268.1 604.6]/Border[0 0 0]/Dest[808 0 R/XYZ null 381 0]>>endobj
-424 0 obj<</Subtype/Link/Rect[108.0 578.4 309.6 591.4]/Border[0 0 0]/Dest[811 0 R/XYZ null 650 0]>>endobj
-425 0 obj<</Subtype/Link/Rect[72.0 552.0 484.2 565.0]/Border[0 0 0]/Dest[814 0 R/XYZ null 798 0]>>endobj
-426 0 obj<</Subtype/Link/Rect[108.0 538.8 168.2 551.8]/Border[0 0 0]/Dest[814 0 R/XYZ null 706 0]>>endobj
-427 0 obj<</Subtype/Link/Rect[108.0 525.6 187.1 538.6]/Border[0 0 0]/Dest[814 0 R/XYZ null 437 0]>>endobj
-428 0 obj<</Subtype/Link/Rect[108.0 512.4 245.2 525.4]/Border[0 0 0]/Dest[817 0 R/XYZ null 581 0]>>endobj
-429 0 obj<</Subtype/Link/Rect[108.0 499.2 384.2 512.2]/Border[0 0 0]/Dest[817 0 R/XYZ null 469 0]>>endobj
-430 0 obj<</Subtype/Link/Rect[108.0 486.0 273.0 499.0]/Border[0 0 0]/Dest[820 0 R/XYZ null 739 0]>>endobj
-431 0 obj<</Subtype/Link/Rect[108.0 472.8 255.6 485.8]/Border[0 0 0]/Dest[820 0 R/XYZ null 709 0]>>endobj
-432 0 obj<</Subtype/Link/Rect[108.0 459.6 227.5 472.6]/Border[0 0 0]/Dest[823 0 R/XYZ null 768 0]>>endobj
-433 0 obj<</Subtype/Link/Rect[108.0 446.4 287.0 459.4]/Border[0 0 0]/Dest[823 0 R/XYZ null 180 0]>>endobj
-434 0 obj<</Subtype/Link/Rect[108.0 433.2 256.2 446.2]/Border[0 0 0]/Dest[826 0 R/XYZ null 633 0]>>endobj
-435 0 obj<</Subtype/Link/Rect[108.0 420.0 330.7 433.0]/Border[0 0 0]/Dest[826 0 R/XYZ null 240 0]>>endobj
-436 0 obj<</Subtype/Link/Rect[108.0 406.8 324.3 419.8]/Border[0 0 0]/Dest[829 0 R/XYZ null 211 0]>>endobj
-437 0 obj<</Subtype/Link/Rect[108.0 393.6 185.9 406.6]/Border[0 0 0]/Dest[832 0 R/XYZ null 362 0]>>endobj
-438 0 obj<</Subtype/Link/Rect[72.0 367.2 431.7 380.2]/Border[0 0 0]/Dest[835 0 R/XYZ null 798 0]>>endobj
-439 0 obj<</Subtype/Link/Rect[108.0 354.0 170.0 367.0]/Border[0 0 0]/Dest[835 0 R/XYZ null 706 0]>>endobj
-440 0 obj<</Subtype/Link/Rect[108.0 340.8 187.1 353.8]/Border[0 0 0]/Dest[835 0 R/XYZ null 569 0]>>endobj
-441 0 obj<</Subtype/Link/Rect[108.0 327.6 239.1 340.6]/Border[0 0 0]/Dest[835 0 R/XYZ null 246 0]>>endobj
-442 0 obj<</Subtype/Link/Rect[108.0 314.4 193.8 327.4]/Border[0 0 0]/Dest[838 0 R/XYZ null 581 0]>>endobj
-443 0 obj<</Subtype/Link/Rect[108.0 301.2 227.5 314.2]/Border[0 0 0]/Dest[838 0 R/XYZ null 417 0]>>endobj
-444 0 obj<</Subtype/Link/Rect[108.0 288.0 294.1 301.0]/Border[0 0 0]/Dest[838 0 R/XYZ null 292 0]>>endobj
-445 0 obj<</Subtype/Link/Rect[108.0 274.8 236.3 287.8]/Border[0 0 0]/Dest[841 0 R/XYZ null 768 0]>>endobj
-446 0 obj<</Subtype/Link/Rect[108.0 261.6 294.4 274.6]/Border[0 0 0]/Dest[841 0 R/XYZ null 313 0]>>endobj
-447 0 obj<</Subtype/Link/Rect[108.0 248.4 274.8 261.4]/Border[0 0 0]/Dest[844 0 R/XYZ null 673 0]>>endobj
-448 0 obj<</Subtype/Link/Rect[108.0 235.2 208.5 248.2]/Border[0 0 0]/Dest[844 0 R/XYZ null 483 0]>>endobj
-449 0 obj<</Subtype/Link/Rect[108.0 222.0 265.4 235.0]/Border[0 0 0]/Dest[844 0 R/XYZ null 332 0]>>endobj
-450 0 obj<</Subtype/Link/Rect[108.0 208.8 195.4 221.8]/Border[0 0 0]/Dest[844 0 R/XYZ null 221 0]>>endobj
-451 0 obj<</Subtype/Link/Rect[108.0 195.6 202.1 208.6]/Border[0 0 0]/Dest[847 0 R/XYZ null 581 0]>>endobj
-452 0 obj<</Subtype/Link/Rect[108.0 182.4 226.6 195.4]/Border[0 0 0]/Dest[847 0 R/XYZ null 298 0]>>endobj
-453 0 obj<</Subtype/Link/Rect[108.0 169.2 183.5 182.2]/Border[0 0 0]/Dest[862 0 R/XYZ null 355 0]>>endobj
-454 0 obj<</Subtype/Link/Rect[108.0 156.0 182.9 169.0]/Border[0 0 0]/Dest[865 0 R/XYZ null 768 0]>>endobj
-455 0 obj<</Subtype/Link/Rect[72.0 129.6 228.8 142.6]/Border[0 0 0]/Dest[868 0 R/XYZ null 798 0]>>endobj
-456 0 obj<</Subtype/Link/Rect[108.0 116.4 159.0 129.4]/Border[0 0 0]/Dest[868 0 R/XYZ null 730 0]>>endobj
-457 0 obj<</Subtype/Link/Rect[108.0 103.2 499.0 116.2]/Border[0 0 0]/Dest[868 0 R/XYZ null 700 0]>>endobj
-458 0 obj<</Subtype/Link/Rect[108.0 90.0 504.2 103.0]/Border[0 0 0]/Dest[868 0 R/XYZ null 348 0]>>endobj
-459 0 obj<</Subtype/Link/Rect[108.0 76.8 455.7 89.8]/Border[0 0 0]/Dest[871 0 R/XYZ null 768 0]>>endobj
-460 0 obj<</Subtype/Link/Rect[108.0 63.6 425.4 76.6]/Border[0 0 0]/Dest[871 0 R/XYZ null 639 0]>>endobj
-461 0 obj[416 0 R
-417 0 R
-418 0 R
+418 0 obj<</Subtype/Link/Rect[72.0 684.0 512.6 697.0]/Border[0 0 0]/Dest[807 0 R/XYZ null 798 0]>>endobj
+419 0 obj<</Subtype/Link/Rect[108.0 670.8 219.2 683.8]/Border[0 0 0]/Dest[807 0 R/XYZ null 706 0]>>endobj
+420 0 obj<</Subtype/Link/Rect[108.0 657.6 181.0 670.6]/Border[0 0 0]/Dest[807 0 R/XYZ null 621 0]>>endobj
+421 0 obj<</Subtype/Link/Rect[108.0 644.4 359.1 657.4]/Border[0 0 0]/Dest[807 0 R/XYZ null 239 0]>>endobj
+422 0 obj<</Subtype/Link/Rect[108.0 631.2 364.3 644.2]/Border[0 0 0]/Dest[810 0 R/XYZ null 768 0]>>endobj
+423 0 obj<</Subtype/Link/Rect[108.0 618.0 251.0 631.0]/Border[0 0 0]/Dest[810 0 R/XYZ null 630 0]>>endobj
+424 0 obj<</Subtype/Link/Rect[108.0 604.8 325.8 617.8]/Border[0 0 0]/Dest[810 0 R/XYZ null 532 0]>>endobj
+425 0 obj<</Subtype/Link/Rect[108.0 591.6 268.1 604.6]/Border[0 0 0]/Dest[810 0 R/XYZ null 381 0]>>endobj
+426 0 obj<</Subtype/Link/Rect[108.0 578.4 309.6 591.4]/Border[0 0 0]/Dest[813 0 R/XYZ null 650 0]>>endobj
+427 0 obj<</Subtype/Link/Rect[72.0 552.0 484.2 565.0]/Border[0 0 0]/Dest[816 0 R/XYZ null 798 0]>>endobj
+428 0 obj<</Subtype/Link/Rect[108.0 538.8 168.2 551.8]/Border[0 0 0]/Dest[816 0 R/XYZ null 706 0]>>endobj
+429 0 obj<</Subtype/Link/Rect[108.0 525.6 187.1 538.6]/Border[0 0 0]/Dest[816 0 R/XYZ null 437 0]>>endobj
+430 0 obj<</Subtype/Link/Rect[108.0 512.4 245.2 525.4]/Border[0 0 0]/Dest[819 0 R/XYZ null 581 0]>>endobj
+431 0 obj<</Subtype/Link/Rect[108.0 499.2 384.2 512.2]/Border[0 0 0]/Dest[819 0 R/XYZ null 469 0]>>endobj
+432 0 obj<</Subtype/Link/Rect[108.0 486.0 273.0 499.0]/Border[0 0 0]/Dest[822 0 R/XYZ null 739 0]>>endobj
+433 0 obj<</Subtype/Link/Rect[108.0 472.8 255.6 485.8]/Border[0 0 0]/Dest[822 0 R/XYZ null 709 0]>>endobj
+434 0 obj<</Subtype/Link/Rect[108.0 459.6 227.5 472.6]/Border[0 0 0]/Dest[825 0 R/XYZ null 768 0]>>endobj
+435 0 obj<</Subtype/Link/Rect[108.0 446.4 287.0 459.4]/Border[0 0 0]/Dest[825 0 R/XYZ null 180 0]>>endobj
+436 0 obj<</Subtype/Link/Rect[108.0 433.2 256.2 446.2]/Border[0 0 0]/Dest[828 0 R/XYZ null 633 0]>>endobj
+437 0 obj<</Subtype/Link/Rect[108.0 420.0 330.7 433.0]/Border[0 0 0]/Dest[828 0 R/XYZ null 240 0]>>endobj
+438 0 obj<</Subtype/Link/Rect[108.0 406.8 324.3 419.8]/Border[0 0 0]/Dest[831 0 R/XYZ null 211 0]>>endobj
+439 0 obj<</Subtype/Link/Rect[108.0 393.6 185.9 406.6]/Border[0 0 0]/Dest[834 0 R/XYZ null 362 0]>>endobj
+440 0 obj<</Subtype/Link/Rect[72.0 367.2 431.7 380.2]/Border[0 0 0]/Dest[837 0 R/XYZ null 798 0]>>endobj
+441 0 obj<</Subtype/Link/Rect[108.0 354.0 170.0 367.0]/Border[0 0 0]/Dest[837 0 R/XYZ null 706 0]>>endobj
+442 0 obj<</Subtype/Link/Rect[108.0 340.8 187.1 353.8]/Border[0 0 0]/Dest[837 0 R/XYZ null 569 0]>>endobj
+443 0 obj<</Subtype/Link/Rect[108.0 327.6 239.1 340.6]/Border[0 0 0]/Dest[837 0 R/XYZ null 246 0]>>endobj
+444 0 obj<</Subtype/Link/Rect[108.0 314.4 193.8 327.4]/Border[0 0 0]/Dest[840 0 R/XYZ null 581 0]>>endobj
+445 0 obj<</Subtype/Link/Rect[108.0 301.2 227.5 314.2]/Border[0 0 0]/Dest[840 0 R/XYZ null 417 0]>>endobj
+446 0 obj<</Subtype/Link/Rect[108.0 288.0 294.1 301.0]/Border[0 0 0]/Dest[840 0 R/XYZ null 292 0]>>endobj
+447 0 obj<</Subtype/Link/Rect[108.0 274.8 236.3 287.8]/Border[0 0 0]/Dest[843 0 R/XYZ null 768 0]>>endobj
+448 0 obj<</Subtype/Link/Rect[108.0 261.6 294.4 274.6]/Border[0 0 0]/Dest[843 0 R/XYZ null 313 0]>>endobj
+449 0 obj<</Subtype/Link/Rect[108.0 248.4 274.8 261.4]/Border[0 0 0]/Dest[846 0 R/XYZ null 673 0]>>endobj
+450 0 obj<</Subtype/Link/Rect[108.0 235.2 208.5 248.2]/Border[0 0 0]/Dest[846 0 R/XYZ null 483 0]>>endobj
+451 0 obj<</Subtype/Link/Rect[108.0 222.0 265.4 235.0]/Border[0 0 0]/Dest[846 0 R/XYZ null 332 0]>>endobj
+452 0 obj<</Subtype/Link/Rect[108.0 208.8 195.4 221.8]/Border[0 0 0]/Dest[846 0 R/XYZ null 221 0]>>endobj
+453 0 obj<</Subtype/Link/Rect[108.0 195.6 202.1 208.6]/Border[0 0 0]/Dest[849 0 R/XYZ null 581 0]>>endobj
+454 0 obj<</Subtype/Link/Rect[108.0 182.4 226.6 195.4]/Border[0 0 0]/Dest[849 0 R/XYZ null 298 0]>>endobj
+455 0 obj<</Subtype/Link/Rect[108.0 169.2 183.5 182.2]/Border[0 0 0]/Dest[864 0 R/XYZ null 355 0]>>endobj
+456 0 obj<</Subtype/Link/Rect[108.0 156.0 182.9 169.0]/Border[0 0 0]/Dest[867 0 R/XYZ null 768 0]>>endobj
+457 0 obj<</Subtype/Link/Rect[72.0 129.6 228.8 142.6]/Border[0 0 0]/Dest[870 0 R/XYZ null 798 0]>>endobj
+458 0 obj<</Subtype/Link/Rect[108.0 116.4 159.0 129.4]/Border[0 0 0]/Dest[870 0 R/XYZ null 730 0]>>endobj
+459 0 obj<</Subtype/Link/Rect[108.0 103.2 499.0 116.2]/Border[0 0 0]/Dest[870 0 R/XYZ null 700 0]>>endobj
+460 0 obj<</Subtype/Link/Rect[108.0 90.0 504.2 103.0]/Border[0 0 0]/Dest[870 0 R/XYZ null 348 0]>>endobj
+461 0 obj<</Subtype/Link/Rect[108.0 76.8 455.7 89.8]/Border[0 0 0]/Dest[873 0 R/XYZ null 768 0]>>endobj
+462 0 obj<</Subtype/Link/Rect[108.0 63.6 425.4 76.6]/Border[0 0 0]/Dest[873 0 R/XYZ null 639 0]>>endobj
+463 0 obj[418 0 R
419 0 R
420 0 R
421 0 R
@@ -730,301 +731,307 @@
458 0 R
459 0 R
460 0 R
+461 0 R
+462 0 R
]endobj
-462 0 obj<</Subtype/Link/Rect[72.0 684.0 342.4 697.0]/Border[0 0 0]/Dest[874 0 R/XYZ null 798 0]>>endobj
-463 0 obj<</Subtype/Link/Rect[108.0 670.8 187.1 683.8]/Border[0 0 0]/Dest[874 0 R/XYZ null 706 0]>>endobj
-464 0 obj<</Subtype/Link/Rect[108.0 657.6 247.6 670.6]/Border[0 0 0]/Dest[874 0 R/XYZ null 582 0]>>endobj
-465 0 obj<</Subtype/Link/Rect[108.0 644.4 230.8 657.4]/Border[0 0 0]/Dest[874 0 R/XYZ null 484 0]>>endobj
-466 0 obj<</Subtype/Link/Rect[108.0 631.2 205.8 644.2]/Border[0 0 0]/Dest[874 0 R/XYZ null 359 0]>>endobj
-467 0 obj<</Subtype/Link/Rect[72.0 618.0 97.0 631.0]/Border[0 0 0]/Dest[877 0 R/XYZ null 503 0]>>endobj
-468 0 obj[462 0 R
-463 0 R
-464 0 R
+464 0 obj<</Subtype/Link/Rect[72.0 684.0 342.4 697.0]/Border[0 0 0]/Dest[876 0 R/XYZ null 798 0]>>endobj
+465 0 obj<</Subtype/Link/Rect[108.0 670.8 187.1 683.8]/Border[0 0 0]/Dest[876 0 R/XYZ null 706 0]>>endobj
+466 0 obj<</Subtype/Link/Rect[108.0 657.6 247.6 670.6]/Border[0 0 0]/Dest[876 0 R/XYZ null 582 0]>>endobj
+467 0 obj<</Subtype/Link/Rect[108.0 644.4 230.8 657.4]/Border[0 0 0]/Dest[876 0 R/XYZ null 484 0]>>endobj
+468 0 obj<</Subtype/Link/Rect[108.0 631.2 205.8 644.2]/Border[0 0 0]/Dest[876 0 R/XYZ null 359 0]>>endobj
+469 0 obj<</Subtype/Link/Rect[72.0 618.0 97.0 631.0]/Border[0 0 0]/Dest[879 0 R/XYZ null 503 0]>>endobj
+470 0 obj[464 0 R
465 0 R
466 0 R
467 0 R
+468 0 R
+469 0 R
]endobj
-469 0 obj<</Dests 470 0 R>>endobj
-470 0 obj<</Kids[471 0 R]>>endobj
-471 0 obj<</Limits[(aen1054)(winbind)]/Names[(aen1054)472 0 R(aen1059)473 0 R(aen1092)474 0 R(aen1098)475 0 R(aen1137)476 0 R(aen117)477 0 R(aen1180)478 0 R(aen1199)479 0 R(aen1234)480 0 R(aen1243)481 0 R(aen1258)482 0 R(aen1306)483 0 R(aen133)484 0 R(aen1350)485 0 R(aen142)486 0 R(aen1464)487 0 R(aen1490)488 0 R(aen1509)489 0 R(aen1517)490 0 R(aen1525)491 0 R(aen1533)492 0 R(aen1540)493 0 R(aen1576)494 0 R(aen158)495 0 R(aen1589)496 0 R(aen1592)497 0 R(aen1602)498 0 R(aen1638)499 0 R(aen1642)500 0 R(aen1650)501 0 R(aen1653)502 0 R(aen1656)503 0 R(aen1659)504 0 R(aen1663)505 0 R(aen1679)506 0 R(aen1700)507 0 R(aen172)508 0 R(aen1720)509 0 R(aen1749)510 0 R(aen1754)511 0 R(aen1766)512 0 R(aen1768)513 0 R(aen177)514 0 R(aen1785)515 0 R(aen18)516 0 R(aen181)517 0 R(aen1813)518 0 R(aen1818)519 0 R(aen1838)520 0 R(aen184)521 0 R(aen1908)522 0 R(aen1916)523 0 R(aen193)524 0 R(aen1945)525 0 R(aen1949)526 0 R(aen1962)527 0 R(aen1969)528 0 R(aen197)529 0 R(aen1973)530 0 R(aen1978)531 0 R(aen1982)532 0 R(aen1998)533 0 R(aen2006)534 0 R(aen2010)535 0 R(aen2013)536 0 R(aen2018)537 0 R(aen2031)538 0 R(aen2045)539 0 R(aen2056)540 0 R(aen207)541 0 R(aen2075)542 0 R(aen210)543 0 R(aen2100)544 0 R(aen2116)545 0 R(aen2127)546 0 R(aen2163)547 0 R(aen2185)548 0 R(aen2232)549 0 R(aen224)550 0 R(aen2242)551 0 R(aen2256)552 0 R(aen2258)553 0 R(aen2273)554 0 R(aen2282)555 0 R(aen2286)556 0 R(aen2302)557 0 R(aen2307)558 0 R(aen2310)559 0 R(aen2315)560 0 R(aen2343)561 0 R(aen246)562 0 R(aen26)563 0 R(aen262)564 0 R(aen278)565 0 R(aen289)566 0 R(aen297)567 0 R(aen309)568 0 R(aen321)569 0 R(aen326)570 0 R(aen334)571 0 R(aen339)572 0 R(aen342)573 0 R(aen354)574 0 R(aen364)575 0 R(aen392)576 0 R(aen4)577 0 R(aen400)578 0 R(aen417)579 0 R(aen424)580 0 R(aen429)581 0 R(aen434)582 0 R(aen455)583 0 R(aen499)584 0 R(aen506)585 0 R(aen526)586 0 R(aen54)587 0 R(aen561)588 0 R(aen58)589 0 R(aen581)590 0 R(aen590)591 0 R(aen601)592 0 R(aen621)593 0 R(aen636)594 0 R(aen650)595 0 R(aen657)596 0 R(aen679)597 0 R(aen72)598 0 R(aen743)599 0 R(aen764)600 0 R(aen78)601 0 R(aen786)602 0 R(aen797)603 0 R(aen8)604 0 R(aen832)605 0 R(aen849)606 0 R(aen860)607 0 R(aen88)608 0 R(aen885)609 0 R(aen893)610 0 R(aen897)611 0 R(aen907)612 0 R(aen910)613 0 R(aen914)614 0 R(aen936)615 0 R(aen990)616 0 R(body.html)617 0 R(cvs-access)618 0 R(domain-security)619 0 R(install)620 0 R(integrate-ms-networks)621 0 R(migration)622 0 R(msdfs)623 0 R(os2)624 0 R(pam)625 0 R(printing)626 0 R(samba-bdc)627 0 R(samba-ldap-howto)628 0 R(samba-pdc)629 0 R(samba-project-documentation)630 0 R(unix-permissions)631 0 R(winbind)632 0 R]>>endobj
-472 0 obj<</D[742 0 R/XYZ null 383 null]>>endobj
-473 0 obj<</D[742 0 R/XYZ null 166 null]>>endobj
-474 0 obj<</D[748 0 R/XYZ null 706 null]>>endobj
-475 0 obj<</D[748 0 R/XYZ null 608 null]>>endobj
-476 0 obj<</D[751 0 R/XYZ null 726 null]>>endobj
-477 0 obj<</D[640 0 R/XYZ null 266 null]>>endobj
-478 0 obj<</D[754 0 R/XYZ null 607 null]>>endobj
-479 0 obj<</D[754 0 R/XYZ null 232 null]>>endobj
-480 0 obj<</D[757 0 R/XYZ null 359 null]>>endobj
-481 0 obj<</D[760 0 R/XYZ null 768 null]>>endobj
-482 0 obj<</D[760 0 R/XYZ null 392 null]>>endobj
-483 0 obj<</D[766 0 R/XYZ null 739 null]>>endobj
-484 0 obj<</D[643 0 R/XYZ null 686 null]>>endobj
-485 0 obj<</D[769 0 R/XYZ null 686 null]>>endobj
-486 0 obj<</D[643 0 R/XYZ null 509 null]>>endobj
-487 0 obj<</D[775 0 R/XYZ null 303 null]>>endobj
-488 0 obj<</D[778 0 R/XYZ null 277 null]>>endobj
-489 0 obj<</D[781 0 R/XYZ null 482 null]>>endobj
-490 0 obj<</D[781 0 R/XYZ null 225 null]>>endobj
-491 0 obj<</D[784 0 R/XYZ null 684 null]>>endobj
-492 0 obj<</D[784 0 R/XYZ null 446 null]>>endobj
-493 0 obj<</D[784 0 R/XYZ null 289 null]>>endobj
-494 0 obj<</D[790 0 R/XYZ null 605 null]>>endobj
-495 0 obj<</D[643 0 R/XYZ null 332 null]>>endobj
-496 0 obj<</D[793 0 R/XYZ null 698 null]>>endobj
-497 0 obj<</D[793 0 R/XYZ null 603 null]>>endobj
-498 0 obj<</D[793 0 R/XYZ null 274 null]>>endobj
-499 0 obj<</D[802 0 R/XYZ null 706 null]>>endobj
-500 0 obj<</D[802 0 R/XYZ null 621 null]>>endobj
-501 0 obj<</D[802 0 R/XYZ null 239 null]>>endobj
-502 0 obj<</D[805 0 R/XYZ null 768 null]>>endobj
-503 0 obj<</D[805 0 R/XYZ null 630 null]>>endobj
-504 0 obj<</D[805 0 R/XYZ null 532 null]>>endobj
-505 0 obj<</D[805 0 R/XYZ null 381 null]>>endobj
-506 0 obj<</D[808 0 R/XYZ null 650 null]>>endobj
-507 0 obj<</D[811 0 R/XYZ null 706 null]>>endobj
-508 0 obj<</D[646 0 R/XYZ null 768 null]>>endobj
-509 0 obj<</D[811 0 R/XYZ null 437 null]>>endobj
-510 0 obj<</D[814 0 R/XYZ null 581 null]>>endobj
-511 0 obj<</D[814 0 R/XYZ null 469 null]>>endobj
-512 0 obj<</D[817 0 R/XYZ null 739 null]>>endobj
-513 0 obj<</D[817 0 R/XYZ null 709 null]>>endobj
-514 0 obj<</D[646 0 R/XYZ null 577 null]>>endobj
-515 0 obj<</D[820 0 R/XYZ null 768 null]>>endobj
-516 0 obj<</D[634 0 R/XYZ null 730 null]>>endobj
-517 0 obj<</D[646 0 R/XYZ null 505 null]>>endobj
-518 0 obj<</D[820 0 R/XYZ null 180 null]>>endobj
-519 0 obj<</D[823 0 R/XYZ null 633 null]>>endobj
-520 0 obj<</D[823 0 R/XYZ null 240 null]>>endobj
-521 0 obj<</D[646 0 R/XYZ null 394 null]>>endobj
-522 0 obj<</D[826 0 R/XYZ null 211 null]>>endobj
-523 0 obj<</D[829 0 R/XYZ null 362 null]>>endobj
-524 0 obj<</D[649 0 R/XYZ null 739 null]>>endobj
-525 0 obj<</D[832 0 R/XYZ null 706 null]>>endobj
-526 0 obj<</D[832 0 R/XYZ null 569 null]>>endobj
-527 0 obj<</D[832 0 R/XYZ null 246 null]>>endobj
-528 0 obj<</D[835 0 R/XYZ null 581 null]>>endobj
-529 0 obj<</D[649 0 R/XYZ null 615 null]>>endobj
-530 0 obj<</D[835 0 R/XYZ null 417 null]>>endobj
-531 0 obj<</D[835 0 R/XYZ null 292 null]>>endobj
-532 0 obj<</D[838 0 R/XYZ null 768 null]>>endobj
-533 0 obj<</D[838 0 R/XYZ null 313 null]>>endobj
-534 0 obj<</D[841 0 R/XYZ null 673 null]>>endobj
-535 0 obj<</D[841 0 R/XYZ null 483 null]>>endobj
-536 0 obj<</D[841 0 R/XYZ null 332 null]>>endobj
-537 0 obj<</D[841 0 R/XYZ null 221 null]>>endobj
-538 0 obj<</D[844 0 R/XYZ null 581 null]>>endobj
-539 0 obj<</D[844 0 R/XYZ null 298 null]>>endobj
-540 0 obj<</D[844 0 R/XYZ null 132 null]>>endobj
-541 0 obj<</D[652 0 R/XYZ null 768 null]>>endobj
-542 0 obj<</D[847 0 R/XYZ null 619 null]>>endobj
-543 0 obj<</D[652 0 R/XYZ null 683 null]>>endobj
-544 0 obj<</D[847 0 R/XYZ null 279 null]>>endobj
-545 0 obj<</D[850 0 R/XYZ null 691 null]>>endobj
-546 0 obj<</D[850 0 R/XYZ null 530 null]>>endobj
-547 0 obj<</D[853 0 R/XYZ null 467 null]>>endobj
-548 0 obj<</D[856 0 R/XYZ null 511 null]>>endobj
-549 0 obj<</D[859 0 R/XYZ null 355 null]>>endobj
-550 0 obj<</D[655 0 R/XYZ null 706 null]>>endobj
-551 0 obj<</D[862 0 R/XYZ null 768 null]>>endobj
-552 0 obj<</D[865 0 R/XYZ null 730 null]>>endobj
-553 0 obj<</D[865 0 R/XYZ null 700 null]>>endobj
-554 0 obj<</D[865 0 R/XYZ null 348 null]>>endobj
-555 0 obj<</D[868 0 R/XYZ null 768 null]>>endobj
-556 0 obj<</D[868 0 R/XYZ null 639 null]>>endobj
-557 0 obj<</D[871 0 R/XYZ null 706 null]>>endobj
-558 0 obj<</D[871 0 R/XYZ null 582 null]>>endobj
-559 0 obj<</D[871 0 R/XYZ null 484 null]>>endobj
-560 0 obj<</D[871 0 R/XYZ null 359 null]>>endobj
-561 0 obj<</D[874 0 R/XYZ null 503 null]>>endobj
-562 0 obj<</D[655 0 R/XYZ null 463 null]>>endobj
-563 0 obj<</D[634 0 R/XYZ null 593 null]>>endobj
-564 0 obj<</D[655 0 R/XYZ null 325 null]>>endobj
-565 0 obj<</D[658 0 R/XYZ null 435 null]>>endobj
-566 0 obj<</D[658 0 R/XYZ null 285 null]>>endobj
-567 0 obj<</D[661 0 R/XYZ null 768 null]>>endobj
-568 0 obj<</D[661 0 R/XYZ null 268 null]>>endobj
-569 0 obj<</D[664 0 R/XYZ null 210 null]>>endobj
-570 0 obj<</D[667 0 R/XYZ null 660 null]>>endobj
-571 0 obj<</D[670 0 R/XYZ null 371 null]>>endobj
-572 0 obj<</D[670 0 R/XYZ null 260 null]>>endobj
-573 0 obj<</D[673 0 R/XYZ null 768 null]>>endobj
-574 0 obj<</D[673 0 R/XYZ null 529 null]>>endobj
-575 0 obj<</D[676 0 R/XYZ null 633 null]>>endobj
-576 0 obj<</D[679 0 R/XYZ null 581 null]>>endobj
-577 0 obj<</D[631 0 R/XYZ null 647 null]>>endobj
-578 0 obj<</D[679 0 R/XYZ null 304 null]>>endobj
-579 0 obj<</D[682 0 R/XYZ null 594 null]>>endobj
-580 0 obj<</D[682 0 R/XYZ null 271 null]>>endobj
-581 0 obj<</D[685 0 R/XYZ null 753 null]>>endobj
-582 0 obj<</D[685 0 R/XYZ null 639 null]>>endobj
-583 0 obj<</D[688 0 R/XYZ null 706 null]>>endobj
-584 0 obj<</D[691 0 R/XYZ null 179 null]>>endobj
-585 0 obj<</D[694 0 R/XYZ null 726 null]>>endobj
-586 0 obj<</D[697 0 R/XYZ null 706 null]>>endobj
-587 0 obj<</D[634 0 R/XYZ null 178 null]>>endobj
-588 0 obj<</D[700 0 R/XYZ null 673 null]>>endobj
-589 0 obj<</D[637 0 R/XYZ null 739 null]>>endobj
-590 0 obj<</D[703 0 R/XYZ null 706 null]>>endobj
-591 0 obj<</D[703 0 R/XYZ null 525 null]>>endobj
-592 0 obj<</D[703 0 R/XYZ null 348 null]>>endobj
-593 0 obj<</D[706 0 R/XYZ null 686 null]>>endobj
-594 0 obj<</D[706 0 R/XYZ null 443 null]>>endobj
-595 0 obj<</D[706 0 R/XYZ null 187 null]>>endobj
-596 0 obj<</D[709 0 R/XYZ null 673 null]>>endobj
-597 0 obj<</D[709 0 R/XYZ null 232 null]>>endobj
-598 0 obj<</D[637 0 R/XYZ null 379 null]>>endobj
-599 0 obj<</D[715 0 R/XYZ null 594 null]>>endobj
-600 0 obj<</D[718 0 R/XYZ null 730 null]>>endobj
-601 0 obj<</D[637 0 R/XYZ null 268 null]>>endobj
-602 0 obj<</D[718 0 R/XYZ null 302 null]>>endobj
-603 0 obj<</D[721 0 R/XYZ null 693 null]>>endobj
-604 0 obj<</D[631 0 R/XYZ null 616 null]>>endobj
-605 0 obj<</D[724 0 R/XYZ null 463 null]>>endobj
-606 0 obj<</D[727 0 R/XYZ null 686 null]>>endobj
-607 0 obj<</D[727 0 R/XYZ null 302 null]>>endobj
-608 0 obj<</D[640 0 R/XYZ null 768 null]>>endobj
-609 0 obj<</D[730 0 R/XYZ null 686 null]>>endobj
-610 0 obj<</D[730 0 R/XYZ null 496 null]>>endobj
-611 0 obj<</D[730 0 R/XYZ null 385 null]>>endobj
-612 0 obj<</D[730 0 R/XYZ null 247 null]>>endobj
-613 0 obj<</D[730 0 R/XYZ null 149 null]>>endobj
-614 0 obj<</D[733 0 R/XYZ null 713 null]>>endobj
-615 0 obj<</D[736 0 R/XYZ null 768 null]>>endobj
-616 0 obj<</D[739 0 R/XYZ null 730 null]>>endobj
-617 0 obj<</D[637 0 R/XYZ null 698 null]>>endobj
-618 0 obj<</D[871 0 R/XYZ null 798 null]>>endobj
-619 0 obj<</D[739 0 R/XYZ null 798 null]>>endobj
-620 0 obj<</D[634 0 R/XYZ null 798 null]>>endobj
-621 0 obj<</D[655 0 R/XYZ null 798 null]>>endobj
-622 0 obj<</D[736 0 R/XYZ null 768 null]>>endobj
-623 0 obj<</D[697 0 R/XYZ null 798 null]>>endobj
-624 0 obj<</D[865 0 R/XYZ null 798 null]>>endobj
-625 0 obj<</D[688 0 R/XYZ null 798 null]>>endobj
-626 0 obj<</D[718 0 R/XYZ null 798 null]>>endobj
-627 0 obj<</D[802 0 R/XYZ null 798 null]>>endobj
-628 0 obj<</D[811 0 R/XYZ null 798 null]>>endobj
-629 0 obj<</D[748 0 R/XYZ null 798 null]>>endobj
-630 0 obj<</D[631 0 R/XYZ null 753 null]>>endobj
-631 0 obj<</D[703 0 R/XYZ null 798 null]>>endobj
-632 0 obj<</D[832 0 R/XYZ null 798 null]>>endobj
-633 0 obj<</Type/Pages/MediaBox[0 0 595 792]/Count 86/Kids[634 0 R
-880 0 R
-883 0 R
-886 0 R
-889 0 R
-637 0 R
-640 0 R
-643 0 R
-646 0 R
-649 0 R
-652 0 R
-655 0 R
-658 0 R
-661 0 R
-664 0 R
-667 0 R
-670 0 R
-673 0 R
-676 0 R
-679 0 R
-682 0 R
-685 0 R
-688 0 R
-691 0 R
-694 0 R
-697 0 R
-700 0 R
-703 0 R
-706 0 R
-709 0 R
-712 0 R
-715 0 R
-718 0 R
-721 0 R
-724 0 R
-727 0 R
-730 0 R
-733 0 R
-736 0 R
-739 0 R
-742 0 R
-745 0 R
-748 0 R
-751 0 R
-754 0 R
-757 0 R
-760 0 R
-763 0 R
-766 0 R
-769 0 R
-772 0 R
-775 0 R
-778 0 R
-781 0 R
-784 0 R
-787 0 R
-790 0 R
-793 0 R
-796 0 R
-799 0 R
-802 0 R
-805 0 R
-808 0 R
-811 0 R
-814 0 R
-817 0 R
-820 0 R
-823 0 R
-826 0 R
-829 0 R
-832 0 R
-835 0 R
-838 0 R
-841 0 R
-844 0 R
-847 0 R
-850 0 R
-853 0 R
-856 0 R
-859 0 R
-862 0 R
-865 0 R
-868 0 R
-871 0 R
-874 0 R
-877 0 R
+471 0 obj<</Dests 472 0 R>>endobj
+472 0 obj<</Kids[473 0 R]>>endobj
+473 0 obj<</Limits[(aen1056)(winbind)]/Names[(aen1056)474 0 R(aen1061)475 0 R(aen1094)476 0 R(aen1100)477 0 R(aen1139)478 0 R(aen1182)479 0 R(aen119)480 0 R(aen1201)481 0 R(aen1236)482 0 R(aen1245)483 0 R(aen1260)484 0 R(aen1308)485 0 R(aen135)486 0 R(aen1352)487 0 R(aen144)488 0 R(aen1466)489 0 R(aen1492)490 0 R(aen1511)491 0 R(aen1519)492 0 R(aen1527)493 0 R(aen1535)494 0 R(aen1542)495 0 R(aen1578)496 0 R(aen1591)497 0 R(aen1594)498 0 R(aen160)499 0 R(aen1604)500 0 R(aen1640)501 0 R(aen1644)502 0 R(aen1652)503 0 R(aen1655)504 0 R(aen1658)505 0 R(aen1661)506 0 R(aen1665)507 0 R(aen1681)508 0 R(aen1702)509 0 R(aen1722)510 0 R(aen174)511 0 R(aen1751)512 0 R(aen1756)513 0 R(aen1768)514 0 R(aen1770)515 0 R(aen1787)516 0 R(aen179)517 0 R(aen1815)518 0 R(aen1820)519 0 R(aen183)520 0 R(aen1840)521 0 R(aen186)522 0 R(aen1910)523 0 R(aen1918)524 0 R(aen1947)525 0 R(aen195)526 0 R(aen1951)527 0 R(aen1964)528 0 R(aen1971)529 0 R(aen1975)530 0 R(aen1980)531 0 R(aen1984)532 0 R(aen199)533 0 R(aen20)534 0 R(aen2000)535 0 R(aen2008)536 0 R(aen2012)537 0 R(aen2015)538 0 R(aen2020)539 0 R(aen2033)540 0 R(aen2047)541 0 R(aen2058)542 0 R(aen2077)543 0 R(aen209)544 0 R(aen2102)545 0 R(aen2118)546 0 R(aen212)547 0 R(aen2129)548 0 R(aen2165)549 0 R(aen2187)550 0 R(aen2234)551 0 R(aen2244)552 0 R(aen2258)553 0 R(aen226)554 0 R(aen2260)555 0 R(aen2275)556 0 R(aen2284)557 0 R(aen2288)558 0 R(aen2304)559 0 R(aen2309)560 0 R(aen2312)561 0 R(aen2317)562 0 R(aen2345)563 0 R(aen248)564 0 R(aen264)565 0 R(aen28)566 0 R(aen280)567 0 R(aen291)568 0 R(aen299)569 0 R(aen311)570 0 R(aen323)571 0 R(aen328)572 0 R(aen336)573 0 R(aen341)574 0 R(aen344)575 0 R(aen356)576 0 R(aen366)577 0 R(aen394)578 0 R(aen4)579 0 R(aen402)580 0 R(aen419)581 0 R(aen426)582 0 R(aen431)583 0 R(aen436)584 0 R(aen457)585 0 R(aen501)586 0 R(aen508)587 0 R(aen528)588 0 R(aen56)589 0 R(aen563)590 0 R(aen583)591 0 R(aen592)592 0 R(aen60)593 0 R(aen603)594 0 R(aen623)595 0 R(aen638)596 0 R(aen652)597 0 R(aen659)598 0 R(aen681)599 0 R(aen74)600 0 R(aen745)601 0 R(aen766)602 0 R(aen788)603 0 R(aen799)604 0 R(aen8)605 0 R(aen80)606 0 R(aen834)607 0 R(aen851)608 0 R(aen862)609 0 R(aen887)610 0 R(aen895)611 0 R(aen899)612 0 R(aen90)613 0 R(aen909)614 0 R(aen912)615 0 R(aen916)616 0 R(aen938)617 0 R(aen992)618 0 R(body.html)619 0 R(cvs-access)620 0 R(domain-security)621 0 R(install)622 0 R(integrate-ms-networks)623 0 R(migration)624 0 R(msdfs)625 0 R(os2)626 0 R(pam)627 0 R(printing)628 0 R(samba-bdc)629 0 R(samba-ldap-howto)630 0 R(samba-pdc)631 0 R(samba-project-documentation)632 0 R(unix-permissions)633 0 R(winbind)634 0 R]>>endobj
+474 0 obj<</D[744 0 R/XYZ null 383 null]>>endobj
+475 0 obj<</D[744 0 R/XYZ null 166 null]>>endobj
+476 0 obj<</D[750 0 R/XYZ null 706 null]>>endobj
+477 0 obj<</D[750 0 R/XYZ null 608 null]>>endobj
+478 0 obj<</D[753 0 R/XYZ null 726 null]>>endobj
+479 0 obj<</D[756 0 R/XYZ null 607 null]>>endobj
+480 0 obj<</D[642 0 R/XYZ null 266 null]>>endobj
+481 0 obj<</D[756 0 R/XYZ null 232 null]>>endobj
+482 0 obj<</D[759 0 R/XYZ null 359 null]>>endobj
+483 0 obj<</D[762 0 R/XYZ null 768 null]>>endobj
+484 0 obj<</D[762 0 R/XYZ null 392 null]>>endobj
+485 0 obj<</D[768 0 R/XYZ null 739 null]>>endobj
+486 0 obj<</D[645 0 R/XYZ null 686 null]>>endobj
+487 0 obj<</D[771 0 R/XYZ null 686 null]>>endobj
+488 0 obj<</D[645 0 R/XYZ null 509 null]>>endobj
+489 0 obj<</D[777 0 R/XYZ null 303 null]>>endobj
+490 0 obj<</D[780 0 R/XYZ null 277 null]>>endobj
+491 0 obj<</D[783 0 R/XYZ null 482 null]>>endobj
+492 0 obj<</D[783 0 R/XYZ null 225 null]>>endobj
+493 0 obj<</D[786 0 R/XYZ null 684 null]>>endobj
+494 0 obj<</D[786 0 R/XYZ null 446 null]>>endobj
+495 0 obj<</D[786 0 R/XYZ null 289 null]>>endobj
+496 0 obj<</D[792 0 R/XYZ null 605 null]>>endobj
+497 0 obj<</D[795 0 R/XYZ null 698 null]>>endobj
+498 0 obj<</D[795 0 R/XYZ null 603 null]>>endobj
+499 0 obj<</D[645 0 R/XYZ null 332 null]>>endobj
+500 0 obj<</D[795 0 R/XYZ null 274 null]>>endobj
+501 0 obj<</D[804 0 R/XYZ null 706 null]>>endobj
+502 0 obj<</D[804 0 R/XYZ null 621 null]>>endobj
+503 0 obj<</D[804 0 R/XYZ null 239 null]>>endobj
+504 0 obj<</D[807 0 R/XYZ null 768 null]>>endobj
+505 0 obj<</D[807 0 R/XYZ null 630 null]>>endobj
+506 0 obj<</D[807 0 R/XYZ null 532 null]>>endobj
+507 0 obj<</D[807 0 R/XYZ null 381 null]>>endobj
+508 0 obj<</D[810 0 R/XYZ null 650 null]>>endobj
+509 0 obj<</D[813 0 R/XYZ null 706 null]>>endobj
+510 0 obj<</D[813 0 R/XYZ null 437 null]>>endobj
+511 0 obj<</D[648 0 R/XYZ null 768 null]>>endobj
+512 0 obj<</D[816 0 R/XYZ null 581 null]>>endobj
+513 0 obj<</D[816 0 R/XYZ null 469 null]>>endobj
+514 0 obj<</D[819 0 R/XYZ null 739 null]>>endobj
+515 0 obj<</D[819 0 R/XYZ null 709 null]>>endobj
+516 0 obj<</D[822 0 R/XYZ null 768 null]>>endobj
+517 0 obj<</D[648 0 R/XYZ null 577 null]>>endobj
+518 0 obj<</D[822 0 R/XYZ null 180 null]>>endobj
+519 0 obj<</D[825 0 R/XYZ null 633 null]>>endobj
+520 0 obj<</D[648 0 R/XYZ null 505 null]>>endobj
+521 0 obj<</D[825 0 R/XYZ null 240 null]>>endobj
+522 0 obj<</D[648 0 R/XYZ null 394 null]>>endobj
+523 0 obj<</D[828 0 R/XYZ null 211 null]>>endobj
+524 0 obj<</D[831 0 R/XYZ null 362 null]>>endobj
+525 0 obj<</D[834 0 R/XYZ null 706 null]>>endobj
+526 0 obj<</D[651 0 R/XYZ null 739 null]>>endobj
+527 0 obj<</D[834 0 R/XYZ null 569 null]>>endobj
+528 0 obj<</D[834 0 R/XYZ null 246 null]>>endobj
+529 0 obj<</D[837 0 R/XYZ null 581 null]>>endobj
+530 0 obj<</D[837 0 R/XYZ null 417 null]>>endobj
+531 0 obj<</D[837 0 R/XYZ null 292 null]>>endobj
+532 0 obj<</D[840 0 R/XYZ null 768 null]>>endobj
+533 0 obj<</D[651 0 R/XYZ null 615 null]>>endobj
+534 0 obj<</D[636 0 R/XYZ null 730 null]>>endobj
+535 0 obj<</D[840 0 R/XYZ null 313 null]>>endobj
+536 0 obj<</D[843 0 R/XYZ null 673 null]>>endobj
+537 0 obj<</D[843 0 R/XYZ null 483 null]>>endobj
+538 0 obj<</D[843 0 R/XYZ null 332 null]>>endobj
+539 0 obj<</D[843 0 R/XYZ null 221 null]>>endobj
+540 0 obj<</D[846 0 R/XYZ null 581 null]>>endobj
+541 0 obj<</D[846 0 R/XYZ null 298 null]>>endobj
+542 0 obj<</D[846 0 R/XYZ null 132 null]>>endobj
+543 0 obj<</D[849 0 R/XYZ null 619 null]>>endobj
+544 0 obj<</D[654 0 R/XYZ null 768 null]>>endobj
+545 0 obj<</D[849 0 R/XYZ null 279 null]>>endobj
+546 0 obj<</D[852 0 R/XYZ null 691 null]>>endobj
+547 0 obj<</D[654 0 R/XYZ null 683 null]>>endobj
+548 0 obj<</D[852 0 R/XYZ null 530 null]>>endobj
+549 0 obj<</D[855 0 R/XYZ null 467 null]>>endobj
+550 0 obj<</D[858 0 R/XYZ null 511 null]>>endobj
+551 0 obj<</D[861 0 R/XYZ null 355 null]>>endobj
+552 0 obj<</D[864 0 R/XYZ null 768 null]>>endobj
+553 0 obj<</D[867 0 R/XYZ null 730 null]>>endobj
+554 0 obj<</D[657 0 R/XYZ null 706 null]>>endobj
+555 0 obj<</D[867 0 R/XYZ null 700 null]>>endobj
+556 0 obj<</D[867 0 R/XYZ null 348 null]>>endobj
+557 0 obj<</D[870 0 R/XYZ null 768 null]>>endobj
+558 0 obj<</D[870 0 R/XYZ null 639 null]>>endobj
+559 0 obj<</D[873 0 R/XYZ null 706 null]>>endobj
+560 0 obj<</D[873 0 R/XYZ null 582 null]>>endobj
+561 0 obj<</D[873 0 R/XYZ null 484 null]>>endobj
+562 0 obj<</D[873 0 R/XYZ null 359 null]>>endobj
+563 0 obj<</D[876 0 R/XYZ null 503 null]>>endobj
+564 0 obj<</D[657 0 R/XYZ null 463 null]>>endobj
+565 0 obj<</D[657 0 R/XYZ null 325 null]>>endobj
+566 0 obj<</D[636 0 R/XYZ null 593 null]>>endobj
+567 0 obj<</D[660 0 R/XYZ null 435 null]>>endobj
+568 0 obj<</D[660 0 R/XYZ null 285 null]>>endobj
+569 0 obj<</D[663 0 R/XYZ null 768 null]>>endobj
+570 0 obj<</D[663 0 R/XYZ null 268 null]>>endobj
+571 0 obj<</D[666 0 R/XYZ null 210 null]>>endobj
+572 0 obj<</D[669 0 R/XYZ null 660 null]>>endobj
+573 0 obj<</D[672 0 R/XYZ null 371 null]>>endobj
+574 0 obj<</D[672 0 R/XYZ null 260 null]>>endobj
+575 0 obj<</D[675 0 R/XYZ null 768 null]>>endobj
+576 0 obj<</D[675 0 R/XYZ null 529 null]>>endobj
+577 0 obj<</D[678 0 R/XYZ null 633 null]>>endobj
+578 0 obj<</D[681 0 R/XYZ null 581 null]>>endobj
+579 0 obj<</D[633 0 R/XYZ null 647 null]>>endobj
+580 0 obj<</D[681 0 R/XYZ null 304 null]>>endobj
+581 0 obj<</D[684 0 R/XYZ null 594 null]>>endobj
+582 0 obj<</D[684 0 R/XYZ null 271 null]>>endobj
+583 0 obj<</D[687 0 R/XYZ null 753 null]>>endobj
+584 0 obj<</D[687 0 R/XYZ null 639 null]>>endobj
+585 0 obj<</D[690 0 R/XYZ null 706 null]>>endobj
+586 0 obj<</D[693 0 R/XYZ null 179 null]>>endobj
+587 0 obj<</D[696 0 R/XYZ null 726 null]>>endobj
+588 0 obj<</D[699 0 R/XYZ null 706 null]>>endobj
+589 0 obj<</D[636 0 R/XYZ null 178 null]>>endobj
+590 0 obj<</D[702 0 R/XYZ null 673 null]>>endobj
+591 0 obj<</D[705 0 R/XYZ null 706 null]>>endobj
+592 0 obj<</D[705 0 R/XYZ null 525 null]>>endobj
+593 0 obj<</D[639 0 R/XYZ null 739 null]>>endobj
+594 0 obj<</D[705 0 R/XYZ null 348 null]>>endobj
+595 0 obj<</D[708 0 R/XYZ null 686 null]>>endobj
+596 0 obj<</D[708 0 R/XYZ null 443 null]>>endobj
+597 0 obj<</D[708 0 R/XYZ null 187 null]>>endobj
+598 0 obj<</D[711 0 R/XYZ null 673 null]>>endobj
+599 0 obj<</D[711 0 R/XYZ null 232 null]>>endobj
+600 0 obj<</D[639 0 R/XYZ null 379 null]>>endobj
+601 0 obj<</D[717 0 R/XYZ null 594 null]>>endobj
+602 0 obj<</D[720 0 R/XYZ null 730 null]>>endobj
+603 0 obj<</D[720 0 R/XYZ null 302 null]>>endobj
+604 0 obj<</D[723 0 R/XYZ null 693 null]>>endobj
+605 0 obj<</D[633 0 R/XYZ null 616 null]>>endobj
+606 0 obj<</D[639 0 R/XYZ null 268 null]>>endobj
+607 0 obj<</D[726 0 R/XYZ null 450 null]>>endobj
+608 0 obj<</D[729 0 R/XYZ null 686 null]>>endobj
+609 0 obj<</D[729 0 R/XYZ null 302 null]>>endobj
+610 0 obj<</D[732 0 R/XYZ null 686 null]>>endobj
+611 0 obj<</D[732 0 R/XYZ null 496 null]>>endobj
+612 0 obj<</D[732 0 R/XYZ null 385 null]>>endobj
+613 0 obj<</D[642 0 R/XYZ null 768 null]>>endobj
+614 0 obj<</D[732 0 R/XYZ null 247 null]>>endobj
+615 0 obj<</D[732 0 R/XYZ null 149 null]>>endobj
+616 0 obj<</D[735 0 R/XYZ null 713 null]>>endobj
+617 0 obj<</D[738 0 R/XYZ null 768 null]>>endobj
+618 0 obj<</D[741 0 R/XYZ null 730 null]>>endobj
+619 0 obj<</D[639 0 R/XYZ null 698 null]>>endobj
+620 0 obj<</D[873 0 R/XYZ null 798 null]>>endobj
+621 0 obj<</D[741 0 R/XYZ null 798 null]>>endobj
+622 0 obj<</D[636 0 R/XYZ null 798 null]>>endobj
+623 0 obj<</D[657 0 R/XYZ null 798 null]>>endobj
+624 0 obj<</D[738 0 R/XYZ null 768 null]>>endobj
+625 0 obj<</D[699 0 R/XYZ null 798 null]>>endobj
+626 0 obj<</D[867 0 R/XYZ null 798 null]>>endobj
+627 0 obj<</D[690 0 R/XYZ null 798 null]>>endobj
+628 0 obj<</D[720 0 R/XYZ null 798 null]>>endobj
+629 0 obj<</D[804 0 R/XYZ null 798 null]>>endobj
+630 0 obj<</D[813 0 R/XYZ null 798 null]>>endobj
+631 0 obj<</D[750 0 R/XYZ null 798 null]>>endobj
+632 0 obj<</D[633 0 R/XYZ null 753 null]>>endobj
+633 0 obj<</D[705 0 R/XYZ null 798 null]>>endobj
+634 0 obj<</D[834 0 R/XYZ null 798 null]>>endobj
+635 0 obj<</Type/Pages/MediaBox[0 0 595 792]/Count 86/Kids[636 0 R
+882 0 R
+885 0 R
+888 0 R
+891 0 R
+639 0 R
+642 0 R
+645 0 R
+648 0 R
+651 0 R
+654 0 R
+657 0 R
+660 0 R
+663 0 R
+666 0 R
+669 0 R
+672 0 R
+675 0 R
+678 0 R
+681 0 R
+684 0 R
+687 0 R
+690 0 R
+693 0 R
+696 0 R
+699 0 R
+702 0 R
+705 0 R
+708 0 R
+711 0 R
+714 0 R
+717 0 R
+720 0 R
+723 0 R
+726 0 R
+729 0 R
+732 0 R
+735 0 R
+738 0 R
+741 0 R
+744 0 R
+747 0 R
+750 0 R
+753 0 R
+756 0 R
+759 0 R
+762 0 R
+765 0 R
+768 0 R
+771 0 R
+774 0 R
+777 0 R
+780 0 R
+783 0 R
+786 0 R
+789 0 R
+792 0 R
+795 0 R
+798 0 R
+801 0 R
+804 0 R
+807 0 R
+810 0 R
+813 0 R
+816 0 R
+819 0 R
+822 0 R
+825 0 R
+828 0 R
+831 0 R
+834 0 R
+837 0 R
+840 0 R
+843 0 R
+846 0 R
+849 0 R
+852 0 R
+855 0 R
+858 0 R
+861 0 R
+864 0 R
+867 0 R
+870 0 R
+873 0 R
+876 0 R
+879 0 R
]>>endobj
-634 0 obj<</Type/Page/Parent 633 0 R/Contents 635 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 17 0 R>>endobj
-635 0 obj<</Length 636 0 R/Filter/FlateDecode>>stream
-xuSÉnÛ0½ë+rrT&%Yv|ª“tE‹¤µŠž)i¼U]’ªá¿ïVêÄE!hÎöޛѯHBð%1Mæ¨Ú趈Æïn+öäi†¢†ˆ…à“j´\|¹]àÑèU÷ºê[êœr[ݽ*v!Ur†O}=ñŒ“‡œ‚TëCÞWÃd"ٛͦüðm«“#ÍãüÒq*»ÉCé3®EiQ•;È!å
-~|\×TÃi,U[*ÔÏU‚þMnC8’26ÆG8sôÁÔÙžUpå šfè+Ó~Å®ª7†Õ¾FÙ;XÝ’Û¶dC±
-endobj
-636 0 obj
-501
-endobj
-637 0 obj<</Type/Page/Parent 633 0 R/Contents 638 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 20 0 R>>endobj
-638 0 obj<</Length 639 0 R/Filter/FlateDecode>>stream
+636 0 obj<</Type/Page/Parent 635 0 R/Contents 637 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 19 0 R>>endobj
+637 0 obj<</Length 638 0 R/Filter/FlateDecode>>stream
+x}SMsÚ0½ó+vr"3‰±lÇN%iK;“4´8ÓK.²-ÀÔ¶\I.åß÷I6Ði‡Á kwõ¾ôsÀÈLJÑ8 0¦¬Ü%ƒÑÇ[
+|JV؉È’œ|Ï÷ñ&.gw3Z(¹™¡÷2k+Qn
+Y_&[×ÊÐa[¯Ç¾7Asß“^Ù’É
+Õ‚¡4ÀeXV¼€UEí%8¿’PD‰  ˜tÏÁ€ =»ó é€õÄìãÛ|À˜•!bä¯(`cë¡[•´´Ùñ±¼9óæÀßHá³lëœÀÒQ´“g¨5 7Æ4ÓÑh·ÛyÚ
+èIµ½­u ¶ÿ‹7Q¼ †¯x.JÁµ -p`ë̇\òH"Ÿ!m/·80ù ¸ùªOïÃV(µ÷
+ó(=÷þ,DYÜå±iÊ d¸€·êc2ÿòLsQ ÅKZ´iYdôPÀ4ÐzÎ/—ôj_
+endobj
+638 0 obj
+652
+endobj
+639 0 obj<</Type/Page/Parent 635 0 R/Contents 640 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 22 0 R>>endobj
+640 0 obj<</Length 641 0 R/Filter/FlateDecode>>stream
xV]sÛ6|ׯ¸¦‰:cS¢>,Éov§NóÐfë¥ Š¨H€À(šéïÞ‘´å4êÔeK{»{ þ5JiŠŸ”V3šßPVî·£ÉÆfSÚøæfµ¦mNÓd:Å'Ùø§R5Q{JúÅ):zoCTUEÊæ´Õ!Òãݯ÷w?nÿ”:颫s=O“*Ó[£nhzKµÊ)–šje©Q{º} JÓ~ßlÅ»¶çk(7!z³k£ÎéhbÙI™³QKT¹ÈÔ]´[8œ¢"h©«†ïu¤“k ð=*%Dï þ€!Lé:w€sgßF:Xt[v{Fý„˜ñ[ŠþD\­ciìž*sз]/`÷©—›täã¨û*í¿[®¹f¨wy²¦¿©v^˺Ÿ·#¦_4
&ê+¡é%.¿§1•16·“ÉñxLïHœßóÚmHCXŽ¿´\ÌñºX¯ð:Ã/N/öYN7¢Æ³a§ÞGé-Ý·¦Ê™wöÒ½±Ê›ËVr”³L¸¢ÂxÖ·Ðïö^Õ½8ËAœdcfßözLfÇ°–ì숄/½Î¢ó§„¶¨O¡tm•“j£cj3Œ \òTM|6ZÇ/d`zröØ„¦Â)D]'½=©TŸ4µ¶ ­ªˆ¬Öy`VÌ\«\J}u>ûŠ½sñû/mxÞéõµÌIW`hc1ë=ÜQ‡S‚Ötäá
Î ¹†]NGk«v•Æxm¤þ¬³–Ûz´ZôE,2ÖÆ2j‘c×; ¡6Ódâ[hÑf°z@tÔ©ào
w¢BLøïøØ.k)­‘šÿ¬›…ÜIçÁ:ïƒuvË#K|¹›ºq>*‹)ÇÕýoQå’¾‹(ŒÄ^wiÔ"^ ³’ßú «P‘€EÔ€Äìyʽ±Ù …h궒ìK莂L³çÇ ¶
endobj
-639 0 obj
+641 0 obj
1091
endobj
-640 0 obj<</Type/Page/Parent 633 0 R/Contents 641 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-641 0 obj<</Length 642 0 R/Filter/FlateDecode>>stream
+642 0 obj<</Type/Page/Parent 635 0 R/Contents 643 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+643 0 obj<</Length 644 0 R/Filter/FlateDecode>>stream
xV]oÓH}ï¯¸Ë A¢ÎG“4©´ÀªÛ¦ÚEtµÛc{¨=fÆ-ù÷{îŒÝÓò° BZ_ßÏsνߎ¦4Áß)ÎèdIYsôrsôzs4IV+ÚØ?Lh¾^&+š¯Nñý”¿ZIl'ðqÿÑÙ.WëdÞÙÎ`Lá|üfMÓ9m
„].É’6yx{B›l4Mæ ]z¹¥“3ze¥ð’|%É5)eFªl­ðÊh*T-“g›¯p8§é4:<žÂÝhSI„øçD³­å¯:R:x–߃‰#rmš++3o쮚+ç­J[™Ð9lÊR:O;Ó¢"‘³‹†³˜Ðñô$™qô ‹¶®wäL0Ì„&'%Uæ.„4[vç¨4äM)áÂr<ÚZ‘y•It
¿»Æ N¥á¹‰B'RƒŠÌZ«<4Ez๠œ%u$"W±âÿÂIp¡`XBa¸“µÔCd\}8ÿûßËׯ®.Î7Ÿ9!Ÿ þ:™­ïµþ1ýž­‡ê½èÔ{~F›N'm§BqNUäñ ø ʹç(<PôÜ?…>7[c½
v°:6hU#à\ä·>¥ !
endobj
-642 0 obj
+644 0 obj
1435
endobj
-643 0 obj<</Type/Page/Parent 633 0 R/Contents 644 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-644 0 obj<</Length 645 0 R/Filter/FlateDecode>>stream
+645 0 obj<</Type/Page/Parent 635 0 R/Contents 646 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+646 0 obj<</Length 647 0 R/Filter/FlateDecode>>stream
x•WaOã8ýί¸×ÕÒ´iK[¸O¬v¹Cºe9èiµÒJ'7qZC÷l‡¶ÿþÞØM[²ôX@
E±Çã÷Þ¼™þ{S¿1zÔRR}˜}šu£ñ˜v3Ã?]÷¢1 Æ#| ¢I–â¿áîM¿ ÄÂKÄß>§suNñ€&ŽŽñ!õï»4IZq4Œâˆî\Й¸Àaœ*g”]*¥K£D—Ù»ÉÃQçj@qâ´{#ÄiÝ|™|ú&sd¥ó\/yçRå9M%¥*ˤ‘¥#•­uE••ts}OÚðŸ÷ä4YgÔ´r2%+Í“J¤¥B,lÄ'v©ÝâÖ8éO­I8Žc(d}6­ŽtI§Þý<ÓVDôuŽ}ÊR*3\(å( mÅýóŽK]gTj7çä÷–‘›Ë’DŠ ”c#r“UÜzœ6Ù‹pb¼‡Í&g 7UÚ¶­-©>íyz{´ªP¹0ùP¬uªtáa³s]å)ÍÅ“$Q5kŸÌë'—¶Žtðܹr$Sõ?Ð’A é
á…) ‚³Y®ý2P_J,.×à‹
@@ -1033,11 +1040,11 @@ E±Çã÷Þ¼™þ{S¿1zÔRR}˜}šu£ñ˜v3Ã?]÷¢1 Æ#| ¢I–â¿áîM¿ ÄÂKÄß>§suNñ€&Ž
sWÓ–»0\íR±ŸÍšÃT¯¦¦]æM)œz’ä¡ò2…ºÀ!¥Bº|ž9Ï¡§À0jÖü` övíóÀÀá͈¸áó… m£k
Ð=1Ð̘€p|íÞ{ùÓá_ÏókmŒáõ^þËqhÍóù-ùpCoôÂâœÞ²×SºÙ»›XwÝÚK÷
endobj
-645 0 obj
+647 0 obj
1365
endobj
-646 0 obj<</Type/Page/Parent 633 0 R/Contents 647 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-647 0 obj<</Length 648 0 R/Filter/FlateDecode>>stream
+648 0 obj<</Type/Page/Parent 635 0 R/Contents 649 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+649 0 obj<</Length 650 0 R/Filter/FlateDecode>>stream
x­V]OëF}çWL¥V q’‡J÷SºÒ½Ð6iQÕôaco’%ö®ïîÈ¿¿gvíKH€>´ ÀÁöÌ™3çÌìדõñ= qJç#ÊÊ“·ó“ÞÇ! 4_áÎh2¦yNý¤ßïÓ<ëÌ mUQòä¤ÎIÄN­µ(ÈòI•5™tN::ß"ÜE®Cº\æñmŠ „9xÎ?–ð#}ꦣdD«ëù‡)}ZÑÎÔT;Ïþü}HÎï
IJ3Äó²ä[šÂƒ¥ØQ¡¶xÚPaÌ–„ç»1=xhªîΓ”³ÈQV…t=wg‡]ç…õuuX€Ë¬ªÇP)z&Ê¥ Ò+AŽ$Ôða~6it>JF4œŒqâÇJZEò/i€
ùý4™<¡ŒšyYÑhJsËÅ8¯ô:Tï6‚sq'T!–àÀh.ÚZeï¤=ª2åÞv~lØ´]ûY¡¤öÔýÜÜ;oï…€ã¼eC[ÛɽæüÅYÝÆÔENkéi)2PÀ’YáÎ1Ј4MÚ¾æFÿ¤É™Rú —ªˆÍŒµ2óÅ®‘EÛ0'Ñ „èÊx–Dh/^àwMN™Ð$
@@ -1045,11 +1052,11 @@ gh)Y39÷ÌII÷ü`ƒŠ€í)‡
±ôYè/B‹5.#;î õ¢ãêlCÂÑÍêf½8=Tl£Õlc äŠô–
y' Èj«ü.ê”õÌ2])ø"–eå×Z:S%œ»76G+¸ÐÚ=»’ÕÀQÅÊÀÊ µâö3v‹%E…´ í
endobj
-648 0 obj
+650 0 obj
1189
endobj
-649 0 obj<</Type/Page/Parent 633 0 R/Contents 650 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-650 0 obj<</Length 651 0 R/Filter/FlateDecode>>stream
+651 0 obj<</Type/Page/Parent 635 0 R/Contents 652 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+652 0 obj<</Length 653 0 R/Filter/FlateDecode>>stream
xWÙnã8|ÏW4ò²`+¶ã\ƒ=à\‰'3öÂX /´DÙœP¤G¤âøï·š”r(³‚ŠE²««««é{êãg@§C::¡´Ø»˜ïÞœÓ`DóoNÎðQ?é÷û4O;ƒdÐOh±ž&9Í×ʬ]Y󋧅-ÿ8˜Çþ qoxŠý¬5ÖójÚb™#a2ÚÙŠœ¥'o‰_>Òþvmi[Z/‰?q´QZ’Íɗ­÷ñ™44!W­VÒùpBfqˆÜÐÄJ(CœÍ0úÔ%CÞ<WZ‡M©Ðevk’zåð$áD;sÀÀ
µZ{*¥È8(åŒãj2þ<ý2›ÌÿìC
üŠnÆ_fƒ·‰R‡q¾J#`_îÂ!…Pš)Ð
@@ -1061,11 +1068,11 @@ i¼ðʲ\À«³U™J
™¤Öäïsî„©ÂÚ•/"GÁG=\+øÁ‡–<ü¸ÄLë“À?…ønKåw/ßÎdbÈêL–·v0¾à³qˆ°háúÑAr[Õ–f$ €eÌ”2™±V…ŠÊ”Y÷¶¥æ Á ÑÂ:®X˜V°m™A‘!=c·ØëÆâ£ÄŠpcŠ:ÛxaÞ›¦œŠ5z׊[J [à ²'´®XÁ»0ÿš"¯@Í,†1a—.­àÑèw¶÷E¾X¡ÄÒÉò æ˜NXÀ!áz*kÒ0°Q°F»]FòyNA}£AªŸ†¸„jc‚@Á£
I[vÜ’Œ(ÃVùu#8˜Ã •«O¯–ÖnÄEíÕÓ9êTþ=?æ{Nps?›ÉxŸh:ꡃU€k*Á¤¡ÊŒ¦`ÆêËR;½).—ŸhþÚ³›RÁÚT²ââ³4TrS„ ÿªÉè¶ÑÖç—÷‡“{By¹ ›1Õ¿U©¨€ «„n€1 ›Š—G-y†O¥_ÊJµÏåkZbO¸WBf?nM+räv¸$ðκéXÙU!–è7µ¾¬VªÃ›³úv089Mønð³ñÝŘ-ü;<7þ7w(Ž×‹‹{§C|MÈþ×ׄÑY?9ÇW ,?æ#p›øº÷7¡‚ñ¡endstream
endobj
-651 0 obj
+653 0 obj
1513
endobj
-652 0 obj<</Type/Page/Parent 633 0 R/Contents 653 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-653 0 obj<</Length 654 0 R/Filter/FlateDecode>>stream
+654 0 obj<</Type/Page/Parent 635 0 R/Contents 655 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+655 0 obj<</Length 656 0 R/Filter/FlateDecode>>stream
x•WßoÓH~ï_1êË©õ%iš–RZtèhË5©mì5Y°½fwÝÿþ¾™]‡`¸“N)µ½óã›ï›™ýz0¦þé|B§3ÊëƒËåÁõò`”hvñ4›Òôâ¿'øï4•üú÷Oi<¥e‰ƒ³³³lFË‚p`4¢e~4ÎÆ£lšÑkgš`šOT:[Ó›Û—S°¤èyetèõó'ËÏ05¥ñ8š:™œÃÐÑÒRç5>lÙ€vÖ*ñ¤•©ÔªÒôhÞûzu²R^D^»G|)žuùFkëmmGSUÔh|÷¹­[ a­ÙýˆNƧلÝÂZ#kýäTÑ{œÆ‡Íî´i|P°†‡äsgÚ@tˆƒéaF÷ZÁ ^ò‡®Ëƒ± ~s¤ò •ÖQmÝÐw¡Ró¥˜&3àÎP¬50çÔ+ÏÐ-Þ/Þ’[$Ü 6…Õžê._SŒLÕœ CŸ#Z$ÞûÏüÖ?fô2
KaÛâ”-û¯“ݾæ+MÔjìk`±Ú27—‰3d*[àïÐéܺ¢·t8 I  Ú ŠB‰0àljN5Ÿ4G²Ú„„Ò+²-T‚t‰/MÁΘ)‡…n¶àD¡ý!€éœ•ounJ£‹ŸüÖkÄØö›û2@šµ‚sYÐÈŽB/[¢Â”%8=Šv~Ì>xgšùfôV;F{B†ƒÀª^)Zi€¬Ñ+&´V(ŽC
,;4gÛ¨`ðœÊ¼ ÕÃÑÓ¨UÐ2èZØÊ_›º­tÍAAŠ¨¥¯ÊÀ÷J‡.ßs‰ÑÄê îåùæ
@@ -1076,27 +1083,27 @@ x•WßoÓH~ï_1êË©õ%iš–RZtèhË5©mì5Y°½fwÝÿþ¾™]‡`¸“N)µ½óã›ï›™ýz0¦þé|B§3Êëƒ
ÛüúN·KDŽ/dì#ч#Ï+3¡ÀꞀIMbŽ½1£”:ˆzuè\ƒŽ‚a¼·N 0f-ˆô ä¯v4“n!ÐâH9Ýý9Tä²Hó?¯¨¾·´à
=4êQ¢*¨Ö˜Ù[h&¶‡…£WÖØ
endobj
-654 0 obj
+656 0 obj
1764
endobj
-655 0 obj<</Type/Page/Parent 633 0 R/Contents 656 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-656 0 obj<</Length 657 0 R/Filter/FlateDecode>>stream
+657 0 obj<</Type/Page/Parent 635 0 R/Contents 658 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+658 0 obj<</Length 659 0 R/Filter/FlateDecode>>stream
x“_OÛ0Åßû)ŽúT¤ÕKš6i‰4¦fo¼熘&vf»|û]'tƒJC(Še+÷ïïœüš¤HøIQ,åPÝ䢜|¾Ú ]¢¬ùK¾æM…D$I‚RÍR‘&"¸‘}¯Í~zrFväÏÊGN\"MÇÄù¢àÄÙug»G#„J×592ûc¬Ah·—ÒT{£ŸÀrñÌrGh­ÝA†!fz,NöÓØ<Á<ÍÄ"6µ}ÐÖ`K4Dûî^(kj6è塶©[/bö×rÂ3"Ï2^—ë‚׿Ž#O‘¬6›¡Í ”Bà;ßÖᲑNªÀ»-…pé½o©óŒ%"­uKRüÖ¡TŠ‘³QÇÂzÀÖánÖjf~#ÇÓ}ÂV ¬;²U XyÐÌà_-üÝÙúšV¶ëˆ¥ˆ²½!~­®†D?FÆñ"áFeëí ×I÷·ê ¥â8,‡ÚEEÆ‘@O²ë[òì¾K°îùµ>«lõ}Ö/ÎKóBD;³[_Ùv{~sqŽ[g¹&¾XµçƒŒ6‰Yó1í}“/׉ØðŸÁ>+^œócòp›ûendstream
endobj
-657 0 obj
+659 0 obj
452
endobj
-658 0 obj<</Type/Page/Parent 633 0 R/Contents 659 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-659 0 obj<</Length 660 0 R/Filter/FlateDecode>>stream
+660 0 obj<</Type/Page/Parent 635 0 R/Contents 661 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+661 0 obj<</Length 662 0 R/Filter/FlateDecode>>stream
x¥V]sê6}çWì#™)66ÞhÚLïL“¹í¥s_ò"ljlɵdÿ¾gå0é¶sÃLléh÷œÝ³úkÑŸˆ1Í攣7£Ÿ7£i°\Òå_µÇ,[̃%%˾Ç1¾V’v¼/ÓÿÃòðéâ)mv@Ÿ/–´Éü{<IÇQ:YQÐ'íä¾Né==¡¯JgæÝ’–îÝTo–Þ•;ÜmþMi'
8]|ßX,µQŒ‘‡OÔþÎM*ræ“úoÿÖ4ËÄþÊÚ£<`>Í—˜Q ÎVí·æ
ùÀ#r©÷ý½¥¿ â8Mw.9/l)Q‹Ø *1Aw¦®èuœ¼ÞaÎ¥ª@æ¤köãE¥Àm ;¶g¨–AŠ×1‚,e¥Lözç‹™|q­Q›w%àd.=
endobj
-660 0 obj
+662 0 obj
1213
endobj
-661 0 obj<</Type/Page/Parent 633 0 R/Contents 662 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-662 0 obj<</Length 663 0 R/Filter/FlateDecode>>stream
+663 0 obj<</Type/Page/Parent 635 0 R/Contents 664 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+664 0 obj<</Length 665 0 R/Filter/FlateDecode>>stream
xWÉrÛ8½û+ºr¥Ê¢Û’œ99[Uª&‰'Qj.¾@$("&
ñ$Ihúx÷†D–Yé\BwΙT /3:*_‰ásò…„+•8ÑN’Ñø±/·ß/æ4]\%KŸT >Ü·'Jœ¹ ›”£OŸ ‘”Â+£]¡8Ä¥ÔìE¿WÙ¹ÙKeI®N Ω½®¤öndXÀ®°;åb6–2åR+ÙßPš´ðµ•ÑsTä`'œJ©”O² 6ºd¥¦ªj­Òè+yñ(JN^í”ÞŒrˆ‡ }U+ùnŸˆ˜uäm_š: ü¨%¢CÀ{©¥ w­¬„ÒŽrõ r„‚§‘Áƒ°^¥u)lƒ+<» qõ"“2[…0œÔNåÖTÈsKJh±—œY:Hë2õêI&#»^_
f „sH¬€q“‚øt`yC=ð2V€ÐGZ>-B°Í›Ô”¤ªC’ˆBÈ,86¦fð•ýzÑ¢E%_°/
@@ -1105,11 +1112,11 @@ f „sH¬€q“‚øt`yC=ð2V€ÐGZ>-B°Í›Ô”¤ªC’ˆBÈ,86¦fð•ýzÑ¢E%_°/
8‹)
íbY£.Íc’ø?14]^Ý€–ÿMÐå|FísŠ^ýš¢œÞAÛæ4"A;A,jéú|(ãfB«$‚cÉðÏI~¾çÉk\àfxOyŽaRf }S˸{¦V&Æ”0X ¦™[b›¡‘ö¾Œ«Šm£—¥2CgnûÓéÊ` ¸è¼­S~/€v‡úc±¿e%X E7qj¤æ+Ú ÑåNé¬= ïo\aí²ª.½B?Œ¸·Ùœò«ø’„¤jÚAËÚvÁê««fº/¥À¨neÎC_(âýqé¸Òá®òÚâh¼ûH4ŽÒ…†Ö0k}Ý¿Qž)ߦQŠÅjðë)‹EO­¯w_ßñ˜ò¢\Òš‡‹Ð¶8¼iÜ5Û&VŽ‰À+¯7óä6*Ñ-_í¿/þ0WÈendstream
endobj
-663 0 obj
+665 0 obj
1684
endobj
-664 0 obj<</Type/Page/Parent 633 0 R/Contents 665 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-665 0 obj<</Length 666 0 R/Filter/FlateDecode>>stream
+666 0 obj<</Type/Page/Parent 635 0 R/Contents 667 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+667 0 obj<</Length 668 0 R/Filter/FlateDecode>>stream
xWÛnã6}ÏW ܇zÑD¶¼Þ8»oIÛè^ŠèK€‚’h‹‰TIÊŽÿ¾gHÉV”¸ÛHli8sævføÏEJsü¦´ZÐÛkÊë‹»õÅïë‹yrsC§?v‹/sZ¦i² åÍ
Ÿé
Ÿ­¤ Á[è9þüìã{J—´Þ@ýõ >áýœÖùt‘,’eBoÖß/fÓNl:“>ŸiçöÊçe’½‰KJÓ¨çj±‚žéºTŽ6ª’!oMåÈ—’Dî[Q‘µ.gªÖ+£É »•Þ%´†L<æÊEU¨.Êî¤%“}—¹'×È\m ÀÇ Ç0æt•¾…Ã0¿1UeöîCD7§÷ .¥«Å»„ÝœR÷ó½î«BhŸ‰ö&ÆÏé {s/íNåøBÃ^oÔ¶µ`ð(9w¾{¾H“롽F ÌŇ)4Öðç”Ðmå¥Õ0·“$q%c)¨1¶ Ñ"Úw1#aeˆÎkžÆCGÛÑrp‘F^«B4´W:Sº8È•¢0ûÿ‰~kMÛœdŸ»:ŽKiœwa.²«ÐÇ2x‘£sáam/Êñ?cóÜ~´Ë!0Î/T¢®UAEÖùq ×9tZú½±G§8ÄG½gªC"™öx‚‚õpæL>k¼Éц]äŽ6ÎÈÛ&ÄøÇú],ÿ^ýs<³=?\q^ÇýºA€Zëä%I‘—d6LNR-óR
@@ -1118,11 +1125,11 @@ M°/È)3¨~éBGõj8¶ütP¸ý«L²áÐaY‹ëØM¿š¡ûÅl¸†¥/Ö°·I\0ëœiò=ïè ñz^˜òq/
99îvL­­/#ÚôÚ—#WÂ\(R,l…0Jñ Ô)âä@E Ì,nYÌî¨ZNzŒ*ÏõÓ&w²"¼À[w+tŒàÈøÐNƒØr‘¡ áìqôÑ8–,Bd% p€ûq
ò6Ò<ÜC"Ì‘eø†Ed§˜'ÁA!»qØÍBìx¯‘‘x- l³Ýçˆ3ó="ØÀâ%¢¿ÌÜt¬Ÿ^¯’׶4^Sîo?ßÝÒ7kÂýè7“‡9bÇȯ¢øÕjÛ]Ñßî^¿ü,WKè r霃¿þ¼ø&wÂendstream
endobj
-666 0 obj
+668 0 obj
1574
endobj
-667 0 obj<</Type/Page/Parent 633 0 R/Contents 668 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-668 0 obj<</Length 669 0 R/Filter/FlateDecode>>stream
+669 0 obj<</Type/Page/Parent 635 0 R/Contents 670 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+670 0 obj<</Length 671 0 R/Filter/FlateDecode>>stream
x¥X]S7}çWÜÉéÔÆëP ´3@œÔS ›Ix‘we[aWÚHZ ÿ¾çJ«µ³™iši°¥ûqî¹çÞåËAF#üÏètLoN(¯.“ÅÁhxvF»»Æ/#úåô ¯Çg§xÍÆüŽ•´â+øvºœ?ú0¢·´XÁö l-Šðñˆù!µÿîµúÒHº–þbz3§kQI÷ëëÅçƒ 28Ç¥îlº3;¿ücz=¹>ŸMÞF¿Óo4—öIÚðMå’”#Ûh­ôšŒ¦½ã?bø þ(µ´*§™È7J#NÄG‡)\_^ÿ€Õq÷Jè™Ð)j‡àÿOÔŸnîþüxwsû.[rÌïM%ÒΓ k¶ðÐÆ8Ά'û~´¦©ÿê;7£¯  X¹VìN´|!Q–TÉj)­#³¢îæw€êνËò½D.öÖ”%[;b¦”f²Æš»ÿn³`›W&e›°!ÙÆT#S-}dÃt¦û‚•£Ç”eLùAFƒñÉpÌhO=¹iJ€#I”üFø€S¢Ræ¶PâˆT–ÌV1Ï G5*Š÷I,Í“Òbªó—¦'”;añ&ºÍ8¼MÞÐâòöhzK8é<Ê#¼2ÚÑvƒ’ŠßÀ/Á¼{A1+E¥4êj…7–¶
e¥B"y¼.Óáì‘ôùÑÆ8ßÁغǕöÈûë9‹¥p>‘yLˆ¼ çL®ƒ²U~C@BEa¥sÃÄÜ“á1cyÏ«ÆKµQÚ3ÃòRXµRyH«õÏ!L6Ãz«søuÔ»²ÒJ•Js‰$qäVæÆŽ
õ£Úš'UÈÖ|8•’“#ÿR3D+c«ì!ñÙœ>)] '´’Úî¬%ÜÒ¨S ~z܆¹`É%}àû=¯•x¡À)) Y é\“|U pÑ·ìˆoD 7¡äé}ÑVp8» Rf)é9íÇQI;$p{…„¢³j‚×Ö‘!—@a@Ñ öz P›ÁbÑ€Á<B˜Ÿ” Ñ á¼´F9þðšp•¤n* ®‚ÉÁ«Pêª
@@ -1133,11 +1140,11 @@ tÝã+>En<¤o Ej‚Þ)ÑSáŽåÒ éÓFù$kÏw›€¶¸he æ´a€9Ž€T“ÁcêìJ„ÁòM -p"dýjkìãšGÀ+
Êêßp7~i”å<ÀX]Î&6ë•€XxÞòÖ”`ìÏž=ñÞ&0.jl?i8v¥J­Û<&
hÆP²åKÏõ5 ‚ó#ª†b«¿ì1ºl—¸„‰£>(ßäï÷bÁºÏ@-â–Ä?òsXÈ0ºû—&èši¡rüz†–[ì%©0dP#S6a(W’AQ®Â´£y&[\„HF}VeKλv»¶
endobj
-669 0 obj
+671 0 obj
1999
endobj
-670 0 obj<</Type/Page/Parent 633 0 R/Contents 671 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-671 0 obj<</Length 672 0 R/Filter/FlateDecode>>stream
+672 0 obj<</Type/Page/Parent 635 0 R/Contents 673 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+673 0 obj<</Length 674 0 R/Filter/FlateDecode>>stream
x•WïOã8ýÎ_1*Ž•hi»,¿´:©”rW ºÍÞj¥J'7q[‰ ÷×ß;i §À-H¥$¶gæÍ{3ã{=êâ·G§}úxBq¶wí¢½nç쌶Åÿt©ßÇÇñÙ)~:ïô©´àx‰c6X~t}L½E œ~rvJQâßw)Š„Nh‘–v%ñ·0¹•¤XÄ+yÈ_5‘Ð$œ“YîÈ’ÏñJè¥$A™´VàÛ“r+¬Ž2ìSšŸ¤)Í%Ùrþ·Œaã‡èï½.µ{ái”8•É¶)%2kÛ!%/hì~±¤E&IYRz×k`п*¤5ié”k©1eÌÙ2Ž¥LiŽS9ˆÚ™XèWƵq@ËæF'ŠV0†5ì/(­+„SzI SPiea©íÏTŽÝ„ø ;Y(ëTLfá­å…q&6i§²Õ?és <¹Ò7¥ód Ž§Ê­\"Mù™|™Ò0ŠªÓ&Ò]Ž¿L)„ìÓÁÆcì@žZzÅÞKšŠl.^…(”êQ¤R»p$6¿8 ›ìZÞ_O2p£×Ev§˜]5£Ž®Ï©‡h˜?ŸNC`[õ;Èiðäæö÷/ÓhJ •Jvh—xí>xÀ~ÏDDkä1!ç;XM":†Hõ»à´òy<º†D*2oè4¼˜Í¾'“h6›~ŸF£ÛýÙìê~üçè~:›¢áKo@ê„b£PÈ0]Æw4HÐ9ÆË]Jj0ÊAÉ+¨s¡
˜3¬ÔþP…Çkã>ü\`Xf©Îµ·Âƒ'¢ò$yÎ\4…B*eòš]cP}+æ£h,¥êA^ÔŽœsÒzÔî
l¤êgŸ†&_j¹r4;ˆg¨w~~F·*.Œ5 ‡×E^+Î8u›Í5
@@ -1149,11 +1156,11 @@ h Rž–“„6CákÕ3Ž—²ße|7©‘ðsnú„¹¼vH‰Ô¡]-WlÑÏ÷`K£ÿ<û@MO|…xÉK>ýQIt¡ŸgÊÔ'nÍÅ­µÿßzR‰
Í¡»NÙ–õFL‘ HF'mu 屑 ]ŸU——ÞÉI§G'ç½Î ÏÖÓÁíå€î
ãïËW&.¹Xø;!ïk÷NN±¼}ÚÇ¥=9xãÊu|zŒiݯêõy+îvìý Ì£Åîendstream
endobj
-672 0 obj
+674 0 obj
1741
endobj
-673 0 obj<</Type/Page/Parent 633 0 R/Contents 674 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-674 0 obj<</Length 675 0 R/Filter/FlateDecode>>stream
+675 0 obj<</Type/Page/Parent 635 0 R/Contents 676 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+676 0 obj<</Length 677 0 R/Filter/FlateDecode>>stream
x•W]OÛH}çW\%›• $!å£o@Ân$HYânµ’¥jbÉ´öŒ;cù÷{îØqZïBiilïç¹çžü8Ò
;Í/œ?¾Ð lŸÂVûÇ
¢Õº´”$–©¤ÂÀ’ˆ©XIJ³•q…£Dá+£H:—”iºîS°RŽ¾Ë5á¿RÇÒþ|;ÐÑ‘ÂÃŽá0ÌD´RZ†¡[»Bfa•ÖJ]DFÖ¤Nx$í“‚ý0L…΄ækiÃ0Vd²O4\;„ Œv+a¥kõ©´ßÊGå
@@ -1167,11 +1174,11 @@ lÈ2*Jn¯ÞÉ÷b™£1~áì
šG ßcùy¥@+ÊUý\y›5=Õð•ç¹‰Ñúu{›¯ û†Îƒf¦í98P&ñ}ƒ!H´\Z샨£°
²ôyòMÍ‘ðwŸŽ—ªÇ5uWŠÈ3*Òå,]¹ü&#!¨J†yE›ü>óUõ-¤nN¢?÷*ÏŒ+}¼õœïhÆÅaÍ'<‘·w· ·Pã2úÎXGïÐq–¼;…8¯¥³Ø”à•KàýU9xøV•¾ãÙ¨”´² …—a|Ï,yÁÝël—Ooc=ÜÚìzbAcM™ió:ŠÅeÞ¥ß-ì{^óÞðô¬Ï߬ñ¥wçÛïâòîê’î­ñ]™˜¨dnðXçôª·Žª×z¿dëñÙ3Ìf{Ã~ ᯃ§Ç•Ìendstream
endobj
-675 0 obj
+677 0 obj
1654
endobj
-676 0 obj<</Type/Page/Parent 633 0 R/Contents 677 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-677 0 obj<</Length 678 0 R/Filter/FlateDecode>>stream
+678 0 obj<</Type/Page/Parent 635 0 R/Contents 679 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+679 0 obj<</Length 680 0 R/Filter/FlateDecode>>stream
xWËnÛ8Ýç+.ºrD¶\ÇN t‘ôhÓ ìA1@6´DGlhR©8þû9—¤YMÁ4¨a‹ä}žs.õë$§ þrZLéÍœŠíÉÕêäÓêd’]\ÐóGs:ÏgÙŒf |ŸN³ j$m°+‹9~Æ•|Ša¶°‡~KùŒVø_àKÖ'´*FÓìMvžÑë›%}µö¡­_¯~žŒ?Ï(Ï㉳é'F—qÏÝè‡2¥Ý9º6^6Fzº[IKÙ<Êæî59|Q…$åÈW’ä¯V=
i<ÙMx@ͦÈ'“|Œ)¹Zj£dI7W7Kv=¡³üM6e—w£鯮¿/]d”baW²!çm#ë±8¦¤ë[e‰‡¾ž*ÔÈ{å7®÷$(%3p\hÅ“Š!¯>ÜŽaÎIßÖT Gk) Ý«G|®–Â!=#c…b%ØÿeôŸ%ëÓ9Z‰´V–
k6ê¾E@K±] ò69nCJ‹«·±ZÛ2÷T‹©!r2R–œm<R–Hßywì°:7rÛuÆŽâ㮡#Ú(-ßu{ßr“s:›žÇà(ýƒSG®­kÛxzOÿHwlæŒÏÌcŸ^N¨uÿ1#ô …y!eB.]ðÿ+ÚËÁ2’@(.ùqV6ïééé)ëýÿs‚»
@@ -1184,11 +1191,11 @@ $„*†ˆ1:²ÞZ/û C²;Û<€B‘©ŒíWi›0ÆBä«çÉq÷zØß¡›Çc'UëôeøÒN¡›,íèˆf·‰æÀòòL¦8 yÆŠd
zJë–™éÂM×\ÆbâQ(-ÖJ3ðL›R0HõùaŸ˜¤xñxàë~÷¾1î d§»ú_šýáîæ J7ˆ5ãáw‘ÆǨíºÐ0§
žª\Kù='Ûð;I!8mĵ«ƒ*(Aø…€öÒs×’eWáæ«€MÉP‡ÞðJ‚—º(ªãÏéœÏYNóyß–—ß®.鶱<Ìè£-Ú-Øòä`Îâö³ÅožåÞ<g‹n¡aC>ãS¸ÿuò/9šë©endstream
endobj
-678 0 obj
+680 0 obj
1693
endobj
-679 0 obj<</Type/Page/Parent 633 0 R/Contents 680 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 27 0 R>>endobj
-680 0 obj<</Length 681 0 R/Filter/FlateDecode>>stream
+681 0 obj<</Type/Page/Parent 635 0 R/Contents 682 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 29 0 R>>endobj
+682 0 obj<</Length 683 0 R/Filter/FlateDecode>>stream
x¥XÛnãF}÷WæI,Ú”us€}¯g’Æž$V0»À¼´È¦Ô1ÉVºIy”¯Ï©ê&E3Ùd± ‚l6ëzΩjÿz‘Ò5~RZÍèfIYuq·¹x·¹¸NÖk:¸~¹Æ!|Ì×+|ÎfÉšœ¦‚_À3Xé?púêýœÒ”6Œ/×+Úäòüš6ÙäIU[E¾=¬k<)*´jZØjöª!U–öÅSa]¦sò§:ÛÛÚxÕ[Ù‚¶Ï5•ÆóË™³Þ“³mƒÓµn^¬{öÔzSï`O³ùå⚦éM2C “7NW¶ÑÔaóoè œªt£™š_"_m“ÌÖ¦Ô möÆS¦Z¯=…ੱ„Êy¡´™*©Rž„
³cˆC¡»ô–ð òz­«’dêFï
äÌÖú’¿f¥VŽýÐo0""GÞT‡ÁD‚&ôaH§Ui~Óù(Ó +šôôpG ˜Æf–6ð ²?ÔÀÁn~ÖIR$<ÿP*ÖCáë®nÀàìÈûDé”õa” •k¼ Š;µL€›|ò…=[ï t
@@ -1199,21 +1206,21 @@ HÑá·F-S°\³Í"¼ÊÉ?þüñ#óÀaÀiˆê%ä >X+)ëbI[üíþÝ=ëja»Ò“¹zS©Á¬]‹:ª²Åd•’µ%ô
ü“9 qâ ΋®™˜^Sejì¶h_?ã¼ ñ&$úÉdõSM£«æ•ëÈOØXž;,Ž¼·Ö#¯ÕTâcÁ<<ºÙ1ª«¯®%'zÙ›, ñ ÄÅÊÀ`µU[,µ{›9 d*ãß3{À>Ô·«ó¸¶’áƒáµË C
qÆnœÑÁx¹äÐ)®7Îuå‚Š[îA粟q£,ûX‚ŽVZa_‘z½°úrœÞat'ÆfÀE¡ ×ê©®‘ºô†]Fjç
endobj
-681 0 obj
+683 0 obj
2036
endobj
-682 0 obj<</Type/Page/Parent 633 0 R/Contents 683 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-683 0 obj<</Length 684 0 R/Filter/FlateDecode>>stream
+684 0 obj<</Type/Page/Parent 635 0 R/Contents 685 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+685 0 obj<</Length 686 0 R/Filter/FlateDecode>>stream
x½WMoÛ8½çW |r‹F±ÇNÈ¡Ý6ØštÝ´DÙLDQ%©8þ÷û†”äXMŶ-RÙ"çãÍ›7“G)Mð7¥Å”Nç”é£Ë£OË£Ir~Nûv8vzšÌiv¾Àól–ÌÈJ*pŸ¦i2mß„Cá lá%ô?`èäjJiJË~çç Zæáý„–Ù¸qÒVBK*å“,ß,ŽN®fíé1ÕÂâ—–”#+¬,w„sURæ2Oøü„Ž§sD¶Ìǘ-ÞÚw¸çÜÖØœLEwןÿ"·s^jG¦ð¸­Å£$xÆGÒêYæ” |Ê6p—Á›Kˆ–¸ÔRTŽüFxRÁ ")Œmݦ§@
Ö—.ÑV®@+kŒU¬h&umÍ|£«`ƒí±óåE/;¶F]¬Éð!j´ ²7¢]ŽPZûSÏe&—¯5¦FuìAô‹ÞÐ8äï€ÿÜsH À ÂSl®hV
g0³â” ÚYËùÎ
¯è(öÔǵ5M Áq¿@¼ôó•[}÷´ÝwIo!(-s$*‹¤ÑÛ†íºÑíz:Efg‚︰®2câ"cãÉì-æhƒî¬áâ ¬s d¸8ÒvÈšóÞ²U îå®—ÃîùübùŽ<Ço<Ca•ñ ¦#©Z<ø„àôÁÀ8{~IêŸùÅKˆNŠ.DL„H"×ÎÚóv'Nç‹$¥ùü4ÜÛ÷_>¼§¯Öýûh²
endobj
-684 0 obj
+686 0 obj
1525
endobj
-685 0 obj<</Type/Page/Parent 633 0 R/Contents 686 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 32 0 R>>endobj
-686 0 obj<</Length 687 0 R/Filter/FlateDecode>>stream
+687 0 obj<</Type/Page/Parent 635 0 R/Contents 688 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 34 0 R>>endobj
+688 0 obj<</Length 689 0 R/Filter/FlateDecode>>stream
xVïoÛ6ýî¿âÐ|ñ€Z²äŸí–I“t»›C7 ´DÛl%Ñi;þï÷Ž”,ÇHV` àXy¼{÷Þ;~oEÔÅoD£˜zCJòÖõ¼u;ouƒñ˜šr…‡.ûAŸú㾇ø(%-±´KñÉ›¨‡}þbá-8~ Pxק(¢ù’ŽG4OÝ‚.Í“ö´ »–t?£ÏªHõÞÐdN©Î…*(Ñ…-u–É’¶F+rKg²Üá?÷¢+üiJ‚r‘¬U!I$‰Þ––ºäÅ?Í¿¶ºÔ‰zAŒSÛ3‘/ ~Þ%UnŠ¨þGÕû:w~݉‡À&òѾ&ísÿ¨Ší#™ƒ±2'ù(“­•o«Ýƒ*z›L¾Øcö)uJútóîŸÉÕý-u¾ÒÍôþêÃÄ=>“@JÛϤӉǨé˜Ðƒ‘¤—(YÊuêÄV%Â*¤šjiÐ¥ï[….â jZH|ÆŠ"eJ…z<àgôC—)¾X}†*ªR«Q¶*&‰‹~ ²‡H¼oÒ‘)-®™¥Ìµ•ÇÞß¼ ˆæ\DÝÈDØ~vâ"ÓÉ7Aþ›RîP$ez¥ œt Ò\¢cç ­’La[”Š•!³Mք쌴–Ù…õªØ‰ U˜µÌ2.¹âPxÉ8
Ÿ°)”6 }O}ãjª´ '•‡€ÿë¤U+"bYüñ¾Õï ƒ74ŽÐÂœú£XåŸ2š± »xäþž*å
fV–Ú¹s½óÀsên £Qkˆ;f˜Ÿ‚È“>—ù¨xî
@@ -1221,18 +1228,18 @@ xVïoÛ6ýî¿âÐ|ñ€Z²äŸí–I“t»›C7 ´DÛl%Ñi;þï÷Ž”,ÇHV` àXy¼{÷Þ;~oEÔÅoD£˜zCJòÖõ
èMŸÓk`:Qà•+é8WSåâ€9 w
Akô‡RÜ«Ëf ÞfÔÐ{…ÎyAO,)Äx†ÚMö°Á%ÄÏ©G&2e T¼š¿•c9PxæžË»æã…+†¯~C!æS¸fM”B®"|ŲQé+êäT¯;£6 Ã_Ë~°ŽèÓW7^ 7|K¿lö¿VAk-4ù\÷ÄRx9´¿=.ãgn¬Ž®|¥çÛbÃŒÙÕýõ}*õW´”nt²…È­» rÞ¿«ã·µÿß ìúÈÍÝR£GEÊ¿·þj¥µendstream
endobj
-687 0 obj
+689 0 obj
1424
endobj
-688 0 obj<</Type/Page/Parent 633 0 R/Contents 689 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-689 0 obj<</Length 690 0 R/Filter/FlateDecode>>stream
+690 0 obj<</Type/Page/Parent 635 0 R/Contents 691 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+691 0 obj<</Length 692 0 R/Filter/FlateDecode>>stream
x•Tßo›0~Ï_qêöÐIÃByLÛU{é-H}©49Æ$nÁN±IÖÿ~w’(ê4 $ØwßÝ÷Ýç·Qc¼#˜Å0IAÔ£«|ô-Y–ÁñѬñc ÓyÆH²¾O&,…FBI¸ˆiÜÞÎ!Š /1{šÍ /ºõ1äâ2fS6a1ƒ»%<)]˜½…ûî¸Ø(-a!„iµ³_ò—Qx›ÒqŠèyq™o¤•À¼‘o­jdFWï°ßH K^¯8( ­Åÿ܇ÂÔ\i
endobj
-690 0 obj
+692 0 obj
736
endobj
-691 0 obj<</Type/Page/Parent 633 0 R/Contents 692 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-692 0 obj<</Length 693 0 R/Filter/FlateDecode>>stream
+693 0 obj<</Type/Page/Parent 635 0 R/Contents 694 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+694 0 obj<</Length 695 0 R/Filter/FlateDecode>>stream
xW[oÛ6~ϯ8@6ÌùçÒ{h»õi:Ä{ Ñmq•H—¤â¸¿~ß!EKV4,›
(5ÅsûÎw¿Íi†sº]ÐÕ åõÙ‡ÕÙ¯«³YvwGÝËnñcF7 ¼–w·xÏ—ó솬¤ öÎh±¼ÊéÓõ"[ÆOP†¯°p|AÓôÓ[ZÌhµá›Û;Zá;VòÉÇRì¼´t•ÑG£7jÛX¥·ôåýgÚK…rÞªuãeAx¿Yýu6£ËÅ:&¹ÔÞŠª:ÕB‹-¶ˆÆ—XU¹ðÊhÞͶçØζ/¯æð’WÙ<£{Q¯ ]°±¸uIóy»uqËß“nê5Ü3úC«grçeíèa"·ïè¾Ñto*a•{xsAÂÑ^Vÿ…DÏx>ÜÿBQ+xɦ~Sºy¾ möÔxU©ï’·¶aÍRXýR5Û­XW’ÞŸÄCôÙM%Ù<|~xÍ9”øyC;kžT! ˆ p¸ °`¬úp žXéLcó¡íÜ
˜fíÒâÌÌCÙ…(
@@ -1241,11 +1248,11 @@ xW[oÛ6~ϯ8@6ÌùçÒ{h»õi:Ä{ Ñmq•H—¤â¸¿~ß!EKV4,›
â|µŽ3ŽPV“i<"ÏåÎæPÜ™ST{¡ïDý¸Ûë̵{ŽôIcR½åSaŽƒç:ÖÉùàåå<›¥`prrýœw8›Û%%´ŽöÏîO©ÅU ~syPïiÛB{ÊPzhCààZ^#®Mðè¥ðy87’%J-öÄv<5»—ÜC-õü®…ª^J¾Æå6_ä@mœ¥uq=€ ®ç¹i´oÍØœò8–ÃðyUËó'rãA÷èÒÃÚ½|¦g,Uã’ç C_v ¬
myzéðùñ<†ÇÌæE[)æ8²èíáç«`éL~…óÔ»Óø’Kä¦bиQyfïÂ@€sØÊ]%òÐJê8Çd(ÃÓˆ>
endobj
-693 0 obj
+695 0 obj
1567
endobj
-694 0 obj<</Type/Page/Parent 633 0 R/Contents 695 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 35 0 R>>endobj
-695 0 obj<</Length 696 0 R/Filter/FlateDecode>>stream
+696 0 obj<</Type/Page/Parent 635 0 R/Contents 697 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 37 0 R>>endobj
+697 0 obj<</Length 698 0 R/Filter/FlateDecode>>stream
xÕXÛnÛF}÷W PQ
K£v¢’aãÍÞ©ê9sy*¡gD(«¨òäeÒ†9•+ŽWƒøiÍËR±*¶¤ IÊA0T^f2—ˆf¥p.ʃ® ý^¨ÇðgUÔd¶’9ÇKžÙò|*s×™$„¶4z§bws &¥;i,T왳`ÊŽgˆ« è}E‘(h#)Òy©2/–2RÉcŒø-Ž÷Hà¸gœ?ÑL—쮚dA¦.
å öÊú³mÖ{9èµ­J³‘QeÝÁð BÚÉÜÇ´ ÿ©Ø~ Åù°]’•Ò¹ë¨îRDÀçSi=#-²Éðßced¨H'N~Sbþ&ÅÊVFmjPЪ¹æJžÒx¶æ\Cß}ÿáæ~< &|€µ£¿¸ÏJð éòÁjp…Ì9pqºþÌôV¯àŸÙ©È¹Ò1)ê*¥Þ‘_jx·õ<E7¡BÇ2‡¡(ÒuQµwÐì¾AZ#öŸ i›R+åå–t}eÌ™XúnÆU™è,Ó{†0J#üLÚ¢©TTgÂWx,Qg¨:æáz·âmK?6SŽ~¹7çü_ÂŽk¼ß€“8‡™Ú„VFµQÕÁÕJã5Bù¹EÙTÄzO¢F,ž†Ô e;)­è´¶^(íë@ïÁë…róxá“Ü6É>ÈÞû ÒáL>
@@ -1256,21 +1263,21 @@ K£v¢’aãÍÞ©ê9sy*¡gD(«¨òäeÒ†9•+ŽWƒøiÍËR±*¶¤ IÊA0T^f2—ˆf¥p.ʃ® ý^¨ÇðgUÔd¶
‚×Å–àœ[9÷”GrûÖ7X&öàj8ÚH‚(ˬ!ÍWαNµ0†‰€3Þ­¦©Ø1Ýh95œ(QÃpMÄ;ܱnw…*p®B æFè‰Ýw7Q¥ é¶ÝÎXoxwÕ,µÓå
{ñòzê÷¯‡›ûw7ôÁèOXå趿 ò½±?>^Íð…K<zAqÌWslpîôÌ-u@Õ¯©®*endstream
endobj
-696 0 obj
+698 0 obj
1701
endobj
-697 0 obj<</Type/Page/Parent 633 0 R/Contents 698 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 40 0 R>>endobj
-698 0 obj<</Length 699 0 R/Filter/FlateDecode>>stream
+699 0 obj<</Type/Page/Parent 635 0 R/Contents 700 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 42 0 R>>endobj
+700 0 obj<</Length 701 0 R/Filter/FlateDecode>>stream
xUÁnã6¼û+Þ­°b$Ù–=8ÍîžRlk{É…–(‹[ŠtI*^ÿý)9¼Z1DÓä̼7óôï,£­sZTu³ÇrvÿiIYFeƒb³¦²¦”¥iJe5ß û*+A/óíÓî厤&g¨á–¸#²¢î+/&ÓÐIÖ‚¸œ´ð'cÿ!ÞûVh/+ã-oY±»òÛìc9ë‚å´Ü¬ñœãß
jJ”-GJËœáqBjÁŒ¾lŸé£yèípàÖíY…/¯ -”…¿?ϲ"
÷U8‹X‹†÷ÊÓ^´üU{ƒ
ÝPÛ»Aj(g¥’ãÅw› £Õ9ÂâɃ6(×øj¤„Ã?bô§ñ(iË}€F¦òu(øj±ÂgG‹,eëq5Ú;Å2$`§¡S\ø™À]lOà|bØ=8¥â…иS$஫EÀ®±[lÞ8ÆÝÉ»›A¸ž}7™·J`­Êž¶p#¨vô;Åd#Ë¡Ñ¡]c%“àÍîaÖt¦î•€•¹º87£ ¹×q
endobj
-699 0 obj
+701 0 obj
822
endobj
-700 0 obj<</Type/Page/Parent 633 0 R/Contents 701 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 47 0 R>>endobj
-701 0 obj<</Length 702 0 R/Filter/FlateDecode>>stream
+702 0 obj<</Type/Page/Parent 635 0 R/Contents 703 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 49 0 R>>endobj
+703 0 obj<</Length 704 0 R/Filter/FlateDecode>>stream
x¥WÛnÛF}÷W Ї*€D‹º;@
ØIÕä!(Z«ŠªKr%nBrU.)Eß3C.))M‹ à˜ÜÙ¹ž93üë.¤1þ…´œÐtAq~÷´¹ûqs7V+ê•{<Œi2›3š­–øûa…?KM;¾C¨é~Aü~ý@“1mvоX®h“È9Þăש:Tº¤Y@o­«L±'EïM\Zgw½1®*MTW:¡µÉô‹ÍÇ»1&3(<Ÿ]¥sªJ­Éô¬òH±
ó™(Wqj
@@ -1280,19 +1287,19 @@ P½¢çÇ÷O_•ÁÑ4AôÜmî6•ìÜ×ìXýÝcÙ²º‡$sÀW,õÝÙÛéÑ9B¦²½køìFi·³œé„äh0Í°nŒú
¡ÆèšO¤ïœKØæÆ2va]2›hv,v™ÉM³‚JðÑõœ“ª#,þ® u´&Ÿ%H°GÏ
°gå‘ÁD–,áÒ½pE ó¦%›U nd~Ú²Í7~ùoOjâ7[ÎÀMø¨J“ ¿ÀÖñËÝßgc!uendstream
endobj
-702 0 obj
+704 0 obj
1534
endobj
-703 0 obj<</Type/Page/Parent 633 0 R/Contents 704 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-704 0 obj<</Length 705 0 R/Filter/FlateDecode>>stream
+705 0 obj<</Type/Page/Parent 635 0 R/Contents 706 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+706 0 obj<</Length 707 0 R/Filter/FlateDecode>>stream
xuTËnÛ0¼û+æVˆUKvý8&MskÑ¢.zñ…&鈉Eª$eAß¡$'¨‘Z0 ˆ\ÎÎcùg’cÎ'ǺÀbYMîw“Kä9vG®¬6kìæÙ|>ÇNN§S‡ #š±Ô]up'#q2ö% :ÔÎؘ^Ò2¬Ž­ó/¥ð: s Zaã-„UQøˆŸ¢:ˆìf÷<™cV¬²%1§¿‚öÎâáf¢e1äÉh¤°°®ÅÁ»6膛½&+n&ûôgí!"öü…„³ß«cÈp'¥ÁØ' èù"+z"#à|¿xÀ~Ú–F–u­Ï PÆk7ä4RÚÛß
qáúªÅ˜íåvËD¿—mZÙßFùj¥›*Iùv#ý¼ûz‡ïÞ=sñàdSÑM‘¬K\gCÕl(›^ÏÂr½dzsŠEÚÏn~Lþ©pendstream
endobj
-705 0 obj
+707 0 obj
687
endobj
-706 0 obj<</Type/Page/Parent 633 0 R/Contents 707 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 50 0 R>>endobj
-707 0 obj<</Length 708 0 R/Filter/FlateDecode>>stream
+708 0 obj<</Type/Page/Parent 635 0 R/Contents 709 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 52 0 R>>endobj
+709 0 obj<</Length 710 0 R/Filter/FlateDecode>>stream
x•XMoÛF½ûW rb
Ñr®eÿªÅ?ÆÇLy½íJ²÷e®ª½Cç4‰X5r[¹–"®i)Ô|g-Çàì)GëÛçÑ´¦,Émônñ‰Û±5¥¦C§`¡Ô\I„§z»¤òÊX Á«UÍ”åBIZ·'Œ:ÍùÓ×'‹õ,]ÓòêºZÑâjÎû«’î»3\^I˘ýh{o¡« Qµqh™ë­êÊ–žUÙé˜>ÕÊ«J3Ð9O„2vUÑÅâ"½9_ãîêj2†uœ‰¢ó»E˜Ó4l²¨SVRÓÕµó­|0#¥3Ì ª¡Ö–„+:§-Z̯ßâ‚ø³àl€ßV•ì
É*²ÐµVm  .ˆ5§1ÒÁÖÕŒ&ÿp™dx?Rôó»¦)ÝH]¤,ˆ\¬ƒÚ{ׂëF3Å=þ‡ž5§SÓ_cä'É‹GéºË +ø‹YO&!ÞYí›ÂÔ“‡_–üE?â&ÂNËQž@£X{ U¯êIÓ5xô£Ó  G5Àˆâ[”ˆÅ¿ÐeŽÎ…Ñ`&qœ£n¨ºÖÊ“ Ã
@@ -1302,11 +1309,11 @@ x•XMoÛF½ûW rb
zö:|ñâ…]àµtß ð
1p6¦=’™6²é²d»Ìá]áÈíl¨ô$ÓJ󹕀 îh?)ÅÈÌGmúE»ZE¿÷ƒóè¦7÷·_ÿ¸ýúø(PzL~cub;o'±^‚LcP›qˆ'ÁÐ4_F ãQ·ï?~¾˃½D;Ÿµr3˜ãx~bLB•\£šË¶&_£hüÖˆÊC ¹³²¹M#?Êú'>sÝdÞÔa¥myFÉWì¨ü™sì+Fp¼ÅðËû­zÓ‡ÛckXŠú>…­^5ÍÎùœr5ÇæýøöHåcÑbÝ”B8¹ŸÐà¤#ìyèC Tà€AâŽ÷½Ãn–¼ÜÁÆ,†Y¬«ÌÆC\³’×÷ª8Þ$ p.èTè×
endobj
-708 0 obj
+710 0 obj
1797
endobj
-709 0 obj<</Type/Page/Parent 633 0 R/Contents 710 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-710 0 obj<</Length 711 0 R/Filter/FlateDecode>>stream
+711 0 obj<</Type/Page/Parent 635 0 R/Contents 712 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+712 0 obj<</Length 713 0 R/Filter/FlateDecode>>stream
x•XÁrÛ6½û+vx3£Ð’lËN/Û±;î$N«I¾@$h¡& €,«_ß·
ÚhóŒOnE¢\
ÂöŒDQè Z[iÂâeVªJYg„Ó†j£^T!Ÿä›ÅßGz;=If¸<NuUÉÔÉŒÈi|?9K&É)᨜&,­¯§+Q=IÄ" ±IcWª&å8Û’®h©— B§¢@·aik,I›ÁíF–ÚI*õºâü~ìj¢È³Lh±$ŒÊ‹P…X’#ª…q|3‡Â‡ßÎ\ã™jÙü¶E;fD­L×F¹-aݳ¥ ~rQoýŽJ”[º,
@@ -1321,11 +1328,11 @@ Np#PPF¡sÉ ¨¶o¿\ëºrwòî-÷s¹;9{IìA–»iB·|uG‘úuezì´Í:P\€C»¦8~2z]ƒX ¸[óÌ
¢!–èÔ0ð{6­É¯½À3èøö¢1ªÓùy2ÅŸ
ØKáùòpùñê’>ý7ƽ×éš †pà&‡ò6l{>Ã_²øÿ½OÏOñöô_œñix·þqô©B6¦endstream
endobj
-711 0 obj
+713 0 obj
1783
endobj
-712 0 obj<</Type/Page/Parent 633 0 R/Contents 713 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-713 0 obj<</Length 714 0 R/Filter/FlateDecode>>stream
+714 0 obj<</Type/Page/Parent 635 0 R/Contents 715 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+715 0 obj<</Length 716 0 R/Filter/FlateDecode>>stream
x•WÁrÛ6½û+vtRfÙRlÉéÍ©›i&Ý6ê´_ ”“¦õ÷}»€$
r:ÓñØÖˆÀâí¾·ËïgSºÄÏ”3z7§¬:û°<»øxEÓ)- <™ß,h™Óåäòò’–Ùx¹ÑäufëÿZ²åÆ鬵nKv•ñÞØÚÓFyª-9­Jª´ªM½&25µØÿ×ý§Ž÷Ö•9)ÄtºqÚëºõo–ßÎ.éíôÝd
SjÊ
@@ -1334,20 +1341,20 @@ SjÊ
N"“:G–¿]Ìð&›ÿïkÍÕâ
ÇÈÖÙœãð?Îþ²ãÓcendstream
endobj
-714 0 obj
+716 0 obj
1613
endobj
-715 0 obj<</Type/Page/Parent 633 0 R/Contents 716 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R>>>>/Annots 63 0 R>>endobj
-716 0 obj<</Length 717 0 R/Filter/FlateDecode>>stream
+717 0 obj<</Type/Page/Parent 635 0 R/Contents 718 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R>>>>/Annots 65 0 R>>endobj
+718 0 obj<</Length 719 0 R/Filter/FlateDecode>>stream
x¥XMÛ6½ï¯ä²°«•ü½zHФŠ4mãc.\™^3+‰Ž$¯×ùõ}3¤$Jv¢E€$’Èá|¼yóèoW Åø“ÐbL“9¥ùÕÛÕÕÝû1% ­6ø2_.hµ¦8Šã˜VéhcËTÓÚ”:­my¤J§ûÒÔGÊíZ¿^}Åæi»ùv<¦Ø>úT`“¢}¥KJ3“>UäÖÎüÚÑ«O¿½êoQmIívÙ‘ê­&Úé27UelQÑg•?(ÊÕ®’oæY½¦àÍl0¦ÛdÙ >þî±´ûÝÝÁ–Ùš¨¼;ܽP]š]¦J}CªX³É‚&Ë(ÝêôIŽH·ªxÔëÞ!È‚¢Áfõ¨LQÕ²öÁÔ[#S°ïVWœ>É!%ü¿¿~½Jæði>aÏrZŽÛ‡Œ>s øÉT¼îRÏYðö‚ 9%ñ2š{[Íöþyå#u5õ'­•TÕ“d®5"î‹‘¦¶#Ú©RåºÖeDoŠ#IÌõVÕD]jdÎåK^)¼(l-9A]®“k¤©2Ug†xQ¦75}+N¶…S™-€
IYká"*Ù×]iŸc¥[g¼ETjóªÍƒÉ˜»¦ÞzNG1(‹[±ChË;>Û´Q©ß‡ðÁ4¥]ïS½ŽhÎáú6TwRd¤ÙyQ[Ð!¨&[À sËË}¿[8¾x±Xø9ó³j>‹!”©ü랺ÊÇL3!™ÿ®_j·0cÓ¦uCgÕõ˜N"¨.ÄAx~NSÁcß›¶Š§8@(dè+¹ÉÓô«0@ÓåRà.ÃÆ=´1O—÷½ˆ›)ÕòE܆ð@n§Ü–Ú²ÔÕÎòÜðLã[å<Í ÏI,gH
"S¸SŠ7Ìd2]gW[ðS“UC‚¨j¾oŠzä¾å«*Kë–Y)¢8'r«0 \ãòh÷¾ÏNíw|‰awÀØ-çVþÔÍžo¾–um&—.GîžNN¼@€pΔ¢UÁNÅzP‘ÑFËW—ÕUq]{E§p{DçÔ&Ýgªôw*()‘B"nø
endobj
-717 0 obj
+719 0 obj
1658
endobj
-718 0 obj<</Type/Page/Parent 633 0 R/Contents 719 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-719 0 obj<</Length 720 0 R/Filter/FlateDecode>>stream
+720 0 obj<</Type/Page/Parent 635 0 R/Contents 721 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+721 0 obj<</Length 722 0 R/Filter/FlateDecode>>stream
x­•MSÛ0†ïù;œÂ qãHÚôc¦Óii3í‹"+X`K©$“É¿ï»ò®n.1’vß}ö]é÷$¥9þRZ-èü’d5¹Î&o>-)M)Ûbår½¢,§y2ŸÏ)“Ó+O¹òÒéÊÏHºÕFÐ"™'K
…¢p¢RA9OïN³G[ôÁf‹KìÊò©tJE•ðO¼gNýÊÖ:©¨[·¹­çÚ)¬;¼~x°¥=?,¨Ï´WNQíUŽ*|P"'»Wk/kÏ{
ìNXËÇlt±\& Z®Wøâ ±¶ »·”¢Ffw‘2”!½‹d•Ðg:Bm íu(bR„É…Ë[ž[]*!€s P(v·Óæ¡úÒÙ‚»3mz€=ž¼­TWȇ›ÛAŒžî§¾– O'hANdMy8¹?ƒ`£»oŸÑN¹J{…žƒ b= e…öm?Òs”Ô•؃Æ€†hÝ$­Ù–Z|…½R¦áÚ¥¨Å«@ÏZ4å+Y;D¹¥} Ð8vh”ClqãˆX ,¡öDç¼£h/øˆöQ°/ìžêáSw•R@ÆRd9 )•÷D°gÌf÷F9Ò ,KêbôX#U0Éåù虾ôÅCÕHèÎ Y¨ ¥lõ¶l 5Šð44PáCf¬Ü,µ<G4bòÐ
@@ -1356,22 +1363,22 @@ c¹eœ2šz0€?9VO‡ÛËhbðá
ÿËZO@눾êD2“C ã4„=í™<9îC´|‹æý‹®QpÚL(u3‰@b‹»†0&¡ÿ5×<a1¯4@{ÈÇŠ?ÂxèÞÖ›[ð`8ê2‡'0vž
ÌÌ8Ù{a¤*ÿiª¨”Ç 9îe|{(¢„GIIàßð<ÙgåœÎse†—ùyúÚe¾nm—^®~$ñÃÛ«¯×WôÝÙG¼IôÁʺRB¾ÙYð¬95kŽMÿÇå¿\-“5žܼ‹5çÀsôcòY.jµendstream
endobj
-720 0 obj
+722 0 obj
853
endobj
-721 0 obj<</Type/Page/Parent 633 0 R/Contents 722 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 70 0 R>>endobj
-722 0 obj<</Length 723 0 R/Filter/FlateDecode>>stream
+723 0 obj<</Type/Page/Parent 635 0 R/Contents 724 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 72 0 R>>endobj
+724 0 obj<</Length 725 0 R/Filter/FlateDecode>>stream
x•WËvÚHÝû+j‘9Ç$0†ìœ‡g2c;N '‹qÔ@g$µ¢–ÀÎ×Ï­~ð2™™ÛÇ GwÕ­[÷V?‹©Ÿ˜.Œ(-Î^ÏÎz×Jú4[àÎèrL³ŒúQ¿+içÍJT¬iÑ}­ÊF•Kš¶U¥ë†TISQÌ%Q=¾œ}³+ÅC·RwG Öꌢ8¢÷eSë¬M¥K÷äâØ?™\òs¯åR•%o°QÍŠš•´ ÷©–¹FžûÝŒÛÞ}¤ZKú¢ÊLo Ýͨ
q2]‰R™Â*ª\²ldÆ»÷©\tk%ˆn§ÝO÷oè¡£"Ùe§÷>ÜL§TŠBfT©J>¼Œȵҭ¡µ¬ R1¤äãÒeþD>8¼s#Ê[Qn£9Ú6yn"1E
Ü K‡š-tM
 w-IvíðЩå» [»ÃUë%uVMS½êõ@8¦¡‰ŒnëTö¥ŒJÎ.û‰ßbr€1ôgHžª.Ãà›ÂÓÚFÂÅ&Ë:p4]‘04mDݼÕé=G*ëszW¶ÅznÏ9É&"pþ¡3•¨ÖõXÆà ø:PL@7šD±ÿ¶ƒn8æRï+Éíôí¨—¶Ü†hZH4ÿba²2*TZk£M”ê¢wû@bbº–h|,Ü؃á€8 ’ŸuâÕý{ðçøÜŸ?˜D#¦ù~k1IÓTCo4+^N7Ê _@Ó77؆‘-8¤çßdŠ{'¶þ_íÃT×kBh~† ,þ½•­$ô§ªÚÜ(jÝ.²¶F²tA líYn2ш9tÖX,M…z¦–ßôœ>ü¿¶›ŒÑPÝ€Ül%Q°¨8—²$£ .äѤº\´,±$æºmh³[ šÈB*¤€öB}p]¢Ä@³¦RÓð‹ðŒï­ª­äs:–5;å (9Õ³z7ÅUilHy[/ë+m¬Õé:sඋp[-j]le*H$çŠæíòhgù>`ƒïì# …ž,D¶ïd‡’R
:‘ÖR°ºv^h=ÖjÖUÿš]߆rË$tj¸ï”Í0X{»Èш®©·Ø.'¥~Z6
endobj
-723 0 obj
+725 0 obj
1754
endobj
-724 0 obj<</Type/Page/Parent 633 0 R/Contents 725 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 82 0 R>>endobj
-725 0 obj<</Length 726 0 R/Filter/FlateDecode>>stream
+726 0 obj<</Type/Page/Parent 635 0 R/Contents 727 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 84 0 R>>endobj
+727 0 obj<</Length 728 0 R/Filter/FlateDecode>>stream
xXÛŽÛF}Ÿ¯¨##Hê#ÀÚÎÎÂv6™Y,™<´È–D›d+Ýä(úû=UݼH#g7<ÓÓ·ªS§ªN󛈦ø?¢eLÉ‚ÒòæÃÓÍߟn¦“ÕŠúìƒ)%Ód² Ùj‰ß£Õl²"«iË[0‹sº°þþaFQDO[Ši±šÓS&óSzJGO{í4”U¥®µuw”WiÑdyµ£·O_oîâ°wt°y…%”Ùü?¶y¡ýŠöôQÎ)سÑ|L¦V§¹ªuFªÊÈíMSdT™š°‚/[«#6ý×Ü$ëédM‹%\§’fÉr² £‚ÙQ8³Œ09t§q¸$¯¨ÒGüpµ*
Uç¦r¢c©40+¯¶Æ–òw2ÕûÜQºWÕNßLÓZhõ~Ö+´€;‡vÀªÅª³1XÕ#/Ž
FÙñ“óx2ÚÌæ` x¼ñÔ¹6ÓB0¿Š”¹YÔýLŒÓ[âÝ?¬)š1Ípcv h¶˜Ä“hB­†ÇàÄoB¦7¿³Ù==§4Ž—ìÛ§ŠŒÍ<ø®9Œ­%Í¡0J¸i¶tÁG!$øË,Wclñojªm¾k`¤’.S³߳Π··Ø"+d ÷ôð›ÀlÎpfæiö¨Êºu`£R…#gH,åó ë‘)'ÊKö@U5=û,zÃSÌ*§íKžJ ®oNDÿΫÌ}yòÞÊzd)“ò`ÍKžáˆ€8ý
@@ -1383,23 +1390,27 @@ tÕ4vP× s µ ÂÁÁ·¼nYˆúdHÿ 7®ž\þêô` -oîøb>õj+Öh\ñr…l*i¾žÌà ´Ìaˆ—kɹ3…Ò6ßÁÖ
].Z,‘ ´y{>¾ÿüá=ýÓš¯
Ÿ0äSˆ„Ù//cþ†0ú«O³%ù’eÉ”÷" ~¹ù/)¹¦endstream
endobj
-726 0 obj
+728 0 obj
2102
endobj
-727 0 obj<</Type/Page/Parent 633 0 R/Contents 728 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 85 0 R>>endobj
-728 0 obj<</Length 729 0 R/Filter/FlateDecode>>stream
-xWÛnÛF}÷WL…Q
-äZdaj;âŠ)/´þhTŠi§Ó[ŠJƒÄêÐßǾ$.-“؇=FcJä× 1ep*yTX.â
-‹ð+Cå™°dQÝsIY²Å®·’\ÊA,µ&„<Õp€RpYVÂ)üÉQâèÚ€X™¢'Ä"’´¦(&Õ ×¢&Mïi6ŸL—7sºžO>àcüa<¹_ÞÝÐíýœ–o&¶¥ñ‘3#_ŒOÓ£;Ð*!ÙØãoE¼±eoX/húþîŽL
-Âmì…0Ô{Ëô\pjpŒ!.y"@å¿DÂPbºluÑîsnÆi*£M"ì=*tÆ*Ûv‰ÞÉ$emâ„‹óýVù[¤ƒÉÉÈ9),RQ³nS¥‚1þÖ’LA ÅÆuÕÖm5(o¯×Ò*ä}5ä‹8FD¿ ”Ù…âIH0-gƒõ—C1;髵ª_à/ïU±I!¡28µB‰…Z‡2©ù\AÀº_³x­­îÚ>
-É3‹mÛ,Qî! ÐPT¾‰/\R,¡¶—Z7±Ìµ*Û4Ùmæ9Os5àJÇ@|§Èîx'ölšÿStTô³Òƒ r‹s£#bp…Goû×4ÑÊÃt»v—ËÚߺåË:ƒ¡‡ê!öÍÅøíå-HæB½Ö~ÆY
-ƒì»“
-endobj
-729 0 obj
-1803
-endobj
-730 0 obj<</Type/Page/Parent 633 0 R/Contents 731 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 94 0 R>>endobj
-731 0 obj<</Length 732 0 R/Filter/FlateDecode>>stream
+729 0 obj<</Type/Page/Parent 635 0 R/Contents 730 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 87 0 R>>endobj
+730 0 obj<</Length 731 0 R/Filter/FlateDecode>>stream
+xWmoâFþž_1E•Ž“ó 퇊¼õÂ÷R5UµØ ìÅör^;U|ŸÙµ 8½HmPx±wwfžyæ™ñד5ñjQ¿MùÑÉåüäf~ÒôÚ¿%+ühR¯ÓÆ{wÐçï=¼%’–¼7qLù†åÛ&]Ð|‰£{8jØÛMšûõß7‰ŠÓÿ8ã¿·ó/'M:kÁÕ)ÿûûìS§ýyÐ+~ãógª}Rq ·†Æsú6èÕ¾¿w4î6¶î½8o\ ^ÙÚiï&ï†åîc³Ãp³?O^=á~4™•‡ãÓn³Ù|u÷drµß\Ù=Ñ[™L®ìþÆí9µZãNßëÒY{àµÄá|~3žÆ?MoÞMo®ir3½Íf¸:cÜlŽ’6ý•ÓHç^/Ïqë"Ç3Îq㶛›kÓy¿ƒ‡IŤ“@&”jò³$‘qîH Šå–‚D=»»;ÑLD AkmÒS"KÒKJ·Ø©ã@¥Jdž¢Ì¤X”&™ü‰}AÏÚ=k¸>_K¾¯³8¥ÌH¬²»cé§ü5Åí½ÊOÏØD™
+Ø^“ëÊ“®$Z§Åio‰m5ný<Ú³>¨ âõÇv¯oo×bÚ¼N¯……ç(‘EÔmu£ûVìðºŽeü¾,þOD Ž'’ÑÐ2„ˆ:Oî¡}xsÞE&¼ÙW« À–l;¹¥ê¢-\˜B^#³¥ý)ö›=¥ IBeR¯
+g§Óòú@÷Ür$.Óü°'²ÄÈSøÁFº‹Ü[š˜T…!m´1Ò¾Å`Óo©Bi08&[*Á :Q¸º±éš
+EòlHP£Ž+¤©Ì±M× >ÌZ$Ø72ÒÒíM"H‡»7´ØQ —" S{ÜW,Hy¡uƒRL[­ØRT$¶W…þ!ö%q鬙Ä>ì1
+S"¿fˆ)(£€SɳÂrH•1ÚWvõqô§dT´A‘†z׋¦Ÿ‡¬gFÅ+èÊå±®“<µmê?JzìóZG]9[&:Â1jÞõšöù¡‚nxDSm,¡ ÉSÅ›±T«õ¤XkÔ :T»ßQ¾–&¡@ök6öE‚f…% Ô^Øž¡öK<]´§«±xV+¬)Ä¥6á&&ãy^ &BhŸG¿!Af­3¨–‘œ
+>
+vQõr¬Óø&ÓÑx~3¥ëéè#>†‡£»áåÝ Ý>Liþndû(Ï.¹Zäëñ©{tÚ$„
+2¶±ùk¯líÂ)¸»#“‚P+{! õÖ‚…Ɔ N×™¢! ¡hy"P?‰„ùPb<o´1cäÕd<¦©Œ66‰°÷¬ÐŽÙ¶IôF&) "—Š(1ß®•¿F:˜œŒœSµÁ"ë6…Gèão-É$ÁÁTY¬\+oÜP3òž~-­lASÙWC¾ˆc4f4¹@™M(v2@‚™h9¬¿ŠÙH_-P-øy¯ŠM
+Ý–Á©Ug,Ô:”IÅç¬û‹×Ú*ïV`Ö
+“ar[Ykn’('*K¶ãYØyåP¡Ñ\Šb (ÒZîò€þźÉüu%¨ ¯î06îA¥ÒÝháTÆÅB{á<-Á6?Ôvñu¡Jæv§u °}Ô½±ã bg¹cMÖa;%q:´k8yÆ’ìEòºäM¿ìWV!yd±±m›%ÊM†¢òõH<qI±„Ú^jÝÄ2תlÓd·™ç<BV€+ñ"»ãqœØ²iþOñ,…~Vº³Dnqn^E |4?™»Çƺ‰Fꥻ\ÎíøÆí _Öêõ=~ŠçG4úÙðþrˆ&¤¿p©^k?ã<€é®¹ågý¶}fú¯“E·ß… Ø­û…¹æýÉ?n<üendstream
+endobj
+731 0 obj
+1856
+endobj
+732 0 obj<</Type/Page/Parent 635 0 R/Contents 733 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 96 0 R>>endobj
+733 0 obj<</Length 734 0 R/Filter/FlateDecode>>stream
xµXïoÛ6ýž¿âl˜ ÄŠ$;¶ œ5m3´I»í
³gÐÒE!cº{l”=wgÑ"½·à%Þp4ÛçqØðáŽԪ‡´–YÖýZ¨uA ­V¥Ç6-ipÕ½7pMAŽ_ŸRÐoèà‡Þh‡/ôzMVe©th™Ð h•ß&tã¶õ®Í¬nÈÌê\L³bZ€9`¡S# ŠWð¨],ïe¦ÊL¢K$<ù ü°´ãKA°à³i°ÄÑÑ`޺Ȕˆ÷ã›(MïÿféàPâv>XÂpàZTß|b3FårÍ8I¬¿®…®í‰Gç,5ö_&”+þà„¥Tâ&ÏN¶Û7Á`ètÒ!3s
ƒ‘7lFMljbxŠÉv6@$ÙP›‘’98e>²`š‹mŸ
@@ -1409,11 +1420,11 @@ xµXïoÛ6ýž¿âl˜ ÄŠ$;¶ œ5m3´I»í
mž¿€Y.8qžð Í+ŽKw·su ⼓zÒ³åÐ|Ô ]`mú“=n/ºó^³<j–w‡à‘ëŽçá`hçÑg ‹Ã]…}|æ48Ý ¸¢·†9zŸpg²=ÆìIŸ Øsxk{ŒFÂG?Кm¹•é£+Ûîm1ÛclÛÙ7ȶÍpqÁ áÉNBØKFœâ k×5)^Ò£¬Û¼ÿm1æfjÓ?Z¼vâÎN\G}”ÛÓ!>rêì¿4R;ßNG¶0o_M—h5yÆÝEC9÷bï3½Ûöù˜MÎB˜|;]^ °¡Éí`Û¾îžoíÖ>b6ï¢Ë\lÞX̽j’Dö÷Æ{ŸFuS´õù›¾|…WÚRÜ#.Ù¹Ù
™‚׿›ÔB‹*õ•ìbÓ–cFÊ×éÒ¡â¡y4•Ì©N¹:›œ„µ’óXVѱ݉r/ç8EE ë˜GÃI žy9.v_éYQL¶OE[`ÛÉѧ%9õë”3 ­rD¡nŸ aÖ.õ[ªÛ×25èÄì‹ÚŠêQƒÈõæ¬Ò¶CÞÒ²Sk¤66Y;ì­ƒHò7­ð¸˜B67Ý{ûD…–¥à—t÷ÝP?[-˜Ð.¨Dw¯(SG˜1(oάu,À‹Ê^)ÿ
endobj
-732 0 obj
+734 0 obj
1839
endobj
-733 0 obj<</Type/Page/Parent 633 0 R/Contents 734 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 103 0 R>>endobj
-734 0 obj<</Length 735 0 R/Filter/FlateDecode>>stream
+735 0 obj<</Type/Page/Parent 635 0 R/Contents 736 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 105 0 R>>endobj
+736 0 obj<</Length 737 0 R/Filter/FlateDecode>>stream
x¥WMsÛ6½ûWìø¤ÌØ´(Ê”•KÇùpë™ÄueÒC. IHHB@Ûʯï[€ h%v;ÓIb‡Âî¾÷öíêûQJcüIi6¡,§¢>zµ8:»šRšÒb…'ùÅŒ%“ñxL‹bdª*j´£R®T#Ë Ic´!½¢ãË¢ÖÒÙ(Y“²d¤k ^$§Ém$•’Kˆn´“¸#œ¿ýbñ']à‰²¤­Q“†é4Í’ rm^Q‡ÄLGJ>È¢uÕ6¥4!šÆ ŽsóÁuÓÈ¿b¥9ñ…àRFU;d4jE¡[$É1Þ.Ž¸z¥ü¿¿¥é,É(ŸæÉ”jJó,9ï®*úÈ¹é ‡Ø-6ÒHÎSP¡ëm%k
qâË)ãëêÝí"}yâ1Û‹ôõŸïq“®®ß½Å/é
@A]îuk!±Êj²íÖ‡í¤YÈ­W*ß$W†´b€½Úqÿ‰¶r'¤›jw]7{Nù0]Ôè‹ã
@@ -1421,42 +1432,42 @@ lâ€)ãvi{gùöY<WÔ” +(¾Ã¾Ñø”I‚Sè‰DïáïýFr©•^«BT¿*€S÷¨uç\5 VhY/~D8!* Ò¢¤¥¨DS
âÒK'08—îÕdüæ­
½¿Ì(ô7€xˆëÌ/눲íA û,¥sÞŸ—$/¤ùO’œ$ô:âýçM ö¶£ö ….@<ÎC€({–žà……¼”; À<¶Ð[É-æxÇî§/£Þ—"Ó‰{ðÎ;€Íï[½Eì=¢Û0ÎàTk^Õ÷"ÿò†qÝÝøuŠ‡N v 'ß~ À øú‡Únyh ƒ5¡‚CõT›0ž°R•´Xž$D„·¯o®¨»Å¢áo ì=•¿I”lvKl¤€5Jj¨¾¡Íýfð¬åç¿ ûp¬…Íù~{T›ŒF¿;–‰%O’î™ß~¨;žêß[ ·-éNa u(–B,·TËb#eklŠôËùºQ>þ‹[“G¤¶Áð
endobj
-735 0 obj
+737 0 obj
1730
endobj
-736 0 obj<</Type/Page/Parent 633 0 R/Contents 737 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-737 0 obj<</Length 738 0 R/Filter/FlateDecode>>stream
+738 0 obj<</Type/Page/Parent 635 0 R/Contents 739 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+739 0 obj<</Length 740 0 R/Filter/FlateDecode>>stream
xW]s7}÷¯¸“'2 0œ—Žãĉ'qãÖtÒ‡}»/ÒFÒB˜Nÿ{Ï•´|¬=Ó™Ú Öê~œs ¨ïM†t1¦|}önvöavÖïM§tx±K|èÓÅàª7¤Ñt‚÷ƒ>¿·’|§°³Áóç·# h¶€ùñtB³"œ÷i–w”£B-•e¹#§–ZD%裮>Òv¥òåBÓ\Rípè m¤U‹ù•ðT‰üI,%f«K#
¾›"÷u0éW’Œ–¯gßÏúÔ\ ÐYѱr!­Å³JÃŒ¤»ue•öˆEx1Nöˆî<â‹ç·ã‡´ññOMJ$ž›õZjöbò+\t2¯­ò;ÊW2"Ž¿PNÌKYôØB@xŒ/€`Äqˆw Šç·W4%̆Œï1jãÞEoÔ£‡®ƒ'¼2šnJ%u+@¤=dÌ;÷Æ•^»ŽO[¹¶PzyŠ:¶˜‹ÓP%'P‹8€þDíÝÍn §ûéë·Ù×^åÚÀ-T°•—5C·U~Q ÎÔ6— Å5NfÜ.E'$ß<úRÌ`EºëÖgí‚ h{oC€&OfA̠ЕJKz¶$—[UA1è<eÙôP ì>Ž'é°‘ŸíA€‚gŸ!SAK+*(Y”ÇK»H B鞸®þ§ëîp
‰ìóbl^‚$ë@ðs Ùkª¬Ù¨8 ZK¡1?jiwÏtÑÔ0³(A6A‚á9*,(+_ñM é²O• 7!qZ›B–¤3#meYòïÆ9cÒT21)‰
rùm=§£
\¢Aâ
endobj
-738 0 obj
+740 0 obj
1527
endobj
-739 0 obj<</Type/Page/Parent 633 0 R/Contents 740 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 106 0 R>>endobj
-740 0 obj<</Length 741 0 R/Filter/FlateDecode>>stream
+741 0 obj<</Type/Page/Parent 635 0 R/Contents 742 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 108 0 R>>endobj
+742 0 obj<</Length 743 0 R/Filter/FlateDecode>>stream
x­WMoÛ8½çWÌÞ –-ÙñGo ºéöÐEwc  Z¢-¶’¨%é8ù÷û†mEIEP}‘œyïÍ›ñ¿W)Mñ/¥eF³åõÕÝæjr¿¦tN›=Þ,V¸(hšL§SÚä£E2OèzóýjôUŒpJ7ä4í®éAÔ;AY2MžùY–dÉ3:¹ŸSš†ýÆÙû>«'‰…¥pÔÕ8i¨0xf¨8ÈZ6ŽJa)/EsmG'I¥n%©º5úIÛkR ñ)„[ÃûhCFVRXi?Pãã¦4NgøGûPECòYY§šYéŽm0åxC{]Uú„ØWTÔ
WÚ„þF’ÀŸ+%µÚZµ«$Ù\6G[¬2t9õ# HÇ ãs¿ìéE©ÐÔhG…´ªÛª‘'zTM¡O–þÜP
Ë™Œ{¼ñI
Ú UYRŽè¤@Rat‹ìO¾dŽ–éì-öBè¼PTÕ0a­Îâ) ÈÈêöÑopbHì&&]ƒ“:ÞIÛi]…De5Š¦ˆœ“Ù‰üÇIH,×5„¯vªRî…y à3bb5×#W#gÓÈg‡*þ~)ÆwÅv“AR(‹Ÿ‰m±èj¬$`"ÊY'>jI&‚¡ÌLgF¥¶v¡y@uð³½f)/³žÊTêàk!C/ïÖÈ\²É¡ÐÃyºÒH¨½L>o{á¥#è¨C£70ÕäÕ±ÀwCfýúX(^spUf6úªF£›ü ¶Ù:é7¬±¾ï…ÝÏuÒ©å§e~ß/Áüh Ûµnª²º:rSˆEyË:ÚPª‘D6ŠÛo\j‘aFOCyÙ3Ø ;>ó‚Ç~ìÔÀ×æFµ(Š!¨¡¼BŽç²@‰ç•B°áùŘÔÁ·¦Íßýç?€x”¾ ”xhÐMX+áß\qóô”R¾úû3úB2¥ù|Ž¨)]fɺ»«è;ð`…9psžÏo|É\šqé\ûq2áŽÈQ$ÂÏ%|I#Ý„Ï¿l寰\µé• ê–ý/dþJgQG=EÓõ,™ÑxáË÷6/ݱ9üö&URÅÿ4OSôÞùj‰ëtKt>Ÿç¥Á`üXÝ â/Ém
+?òlï’w‡Uã°,ü¼øõ_ó%[¨/šÙMì_Wÿ ‚Ôendstream
endobj
-741 0 obj
+743 0 obj
1405
endobj
-742 0 obj<</Type/Page/Parent 633 0 R/Contents 743 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 113 0 R>>endobj
-743 0 obj<</Length 744 0 R/Filter/FlateDecode>>stream
+744 0 obj<</Type/Page/Parent 635 0 R/Contents 745 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 115 0 R>>endobj
+745 0 obj<</Length 746 0 R/Filter/FlateDecode>>stream
x•WÑnÛF|÷W,P`
škÜuÊ~£ŸhFWqxªå‹¨6è¢HÔ³ÜÓB}WÜýàýN°õØ[Gø
Ù€¸ý1g ¬xxS$JÕrSŠíï.:Ëë+‚^—l¹ðœëý‚°ÏqÛ²cnpyÓ²1a“%‡”¡=:Àc§×ÉSl-w$ì:µ­8Ù¯bû  Öø/ŠÌÎ4~õŽT¯©ÅD„tÛ°1ñ<ÉÝá6•ìRŒéýú믙¼R­»šiduj3šÜDã‘$–´3¶A&páÁ rc9 v@|…¸>LfáŽ?=›ÂñݧÎñ¡ØÉÙËß«í):Á‡J!%m-–Kr"ö¾¤Vì—$³¢qàmu¯6Àø¦ @ˆ+Ýê18{oì§6pÒà*ûûR9ZŽ˜¬Ázà ß뙸ÀÍœæ3ì¿Š¢ùÔèi˜ŸÙ ÞÁ»
endobj
-744 0 obj
+746 0 obj
1500
endobj
-745 0 obj<</Type/Page/Parent 633 0 R/Contents 746 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 120 0 R>>endobj
-746 0 obj<</Length 747 0 R/Filter/FlateDecode>>stream
+747 0 obj<</Type/Page/Parent 635 0 R/Contents 748 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 122 0 R>>endobj
+748 0 obj<</Length 749 0 R/Filter/FlateDecode>>stream
xW]oÛF|÷¯Øú%jaÓ"eKr€ ðG]¨´VuNäIbBò˜»£eýûÎÞiŠ6š¢HàYÜ]};ˆiŒ1ÍšL)-.¿,Æѯ󗘿üñëÁì4Jh:ŸFc*)>Fóð[A÷üÐÉÍ)Å1-V7Ïh‘¹çÇ´HGwòÉRºÕZ’ÝHúqñ…“ô£ æÙ$:Ý9@¡×tr“„,Ï~"Ú*ýu­USÓ;NòÀýä´0GT䕤¼rþZj)Š¿ÉÈÔæ
/*ÒRdoØ“›³öØå=N¦ÀºÈF½|týá–sö‰èÞ' ²ä†ðŸ ¨D)I­ÜÏ™*@l% -é‹Ê«¼ZGGgI4£é˜ù.)‰“(¿ÞÁöx†?öùþS5T6Æ’(Œ¢xô´×B#¯•º Þ‡à³8:ß—Á^â€l˜œd•ê]m©Æ€ŸÌ|¿FZ&ÜÓÍ9vÒ„—ž{¦%¬”¦j45Fj°ªøácê8ž@¬hhÀveóTXP ßw úx}ñÛYƒñüžMgx
Qáe•Ñv“£E[xlÎòÈšTfL·WH£é,
@@ -1471,11 +1482,11 @@ bŒV~ûŸã(ðÛ?9?ø%̵1Fñ¥s+’1N /4·#ö7'oöÑ­¨vTKUÒï1a¾¢¹Z®…Ϋëœe{‡h]ÁoPê2/
_¡à1wßÉA•ÎQBJ7hN@m,c_O¯ˆ‚Œ•µñp3§yÑ9[B®,ÏÀNè Ÿ’œòÖÍ' ‹²düÒuº’̶'©ï±|JeíNetÝIÑe<¼÷·&W¬¥>¤•V¥ã l 3Q˺lÒËÝ€2Æ|x 'ë5dZ…mü (1zP2]©²n°±Ì!ÝÞ^áøºÍS­ŒZYò™h¼«2ª¸Çꢱ9Zƒ…ñí’|ÇÂpòyÿ|ñÍ¢IDŸ7;À£`L%Ò¨»‚x£¤wÁ~æª^q³«FkÀãÅúÔ=
I»Æ†©ÞXÐ&¥Û¤Ž?6?gw8p`à0³BaÓ§*ê.`æ €
endobj
-747 0 obj
+749 0 obj
1709
endobj
-748 0 obj<</Type/Page/Parent 633 0 R/Contents 749 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R>>>>/Annots 129 0 R>>endobj
-749 0 obj<</Length 750 0 R/Filter/FlateDecode>>stream
+750 0 obj<</Type/Page/Parent 635 0 R/Contents 751 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R>>>>/Annots 131 0 R>>endobj
+751 0 obj<</Length 752 0 R/Filter/FlateDecode>>stream
x}WMsÛ6½ûWìQ‘i}KîLNœt<Ó8n¬Œ{è"! 0iÙýõ} @$D7eÁ°oß¾ýà‹)Mð3¥õŒæ+JË‹wÛ‹Û‹I2ÁÿùcÊ_~¿˜M–É5­6«dB%Í«dV=ò©« šNi»Ç}«Íš¶™»`BÛtô,ëW²ªT…¨©1Ôä’L‘ÉšE¹deÚÖªy¥Òd’~Ù~c ± X\.Ï,Æk<ÝÌ’é9ž õN.œcëÿ†¯5 ²ýþ´û†Ó£1Ñ1—µ ˜¦-2ª„µp§6í!g·øì¥7t9ñ6‰t£RÑ(£©–?ZiæAГҙ9Z¢ûm°NJ;~¬(%Å+ í»^’©»S×›2u¶äDäfÊ‘›3š’¦³93åV!rˆ×|á ö{(¤°X÷RˆXˆK|î[N’ùà¾sñ€»€`hÎïà?Å꧴Ó+ÏÒó
¡˜WÛÈÒqØ6†Ÿ¤¢(^ lYuÐôõþî/jUî`àÀ_ã‚ã°tLøý·¸Ü·A8…¨V6!ÚæÊRÊÒÄ_ñ, ã]…¦L>ËÂT%ÂK»Zè4—–Œ
ÚñŽg™±#µôœw÷XctNÎVÉ‚µ´Å"{ºɧ2‡ú²` ½”³ÉèaÿìËh I=€ÌÎDa}yxOi.´†e\*_DÚÀsÞىס:’·Ï›ÌjÏ,•RhëÓj`Õ'¤%mŽI(«J4žz®¦n‘KàΉÃ檲 æ¿ÑtIfá"ý=R‰LÆôjZJQdÙÀü©:qUàkÁ7´WKkÚ:•F§°\<#çq²Bñm_›2>|:ýpû>HsÒ „Ѥ©i!++¶¡îdÅEe 95¹Kø«ËP‡G]Y+[_§GÑ 0{/)²NŸ^®RŽÚŸ¿KYzjêÔÕ0SIT)WÈ”EQúpªiœÃ¸«0øßÉÚ ö
@@ -1485,11 +1496,11 @@ a$™Ï1øÕœ…ŽËÈà‰sÎ.@ù¤ÒÚX³oÖ»
âø ¼qD¯Þ!ø®\Ä1CH`p-­àG´zq™;/¡:fÍT ``º÷@›¼u 8©86¬¼~C'k;ÔÙ *è^i®¯°à,BÔåyÉ%ÀÅ÷,ÑcÌ|„½p6}ºûÊ`]ZsPÞ‚|æTÀŠ°Ý81é –”t¥›Tƽvê¶qç°mšs‡è7?ÞÝú …*böú §ƒký‰ê½>pZŒI6iB7(ãxŒ€Å¦\uc¨[+¼G±—/ÔŠgàoß6-&ŠPYÖÝ0Ä~….Ã5sR ÿPf¹ß‘¨ªB¡ípÉdB( 
¯qmrØH_µz íÔw:y9 L{ÌnëA"¸\s݃žêŠCŒ}5o'Òï¾êñÆ'NÞ';°…[fc*ÅwV85Ê=|¯ŠO ˪À€Ädzå…Z)õ³ªæ΋¬ ¢Îùå˜á6>0ÜõÙ««n„½<uÜûÏÛ¿ò Œ¤óõ4YÒ|Ê͸¤Ål“¬ÂêÍ<Ÿ&<[»¶ÝÏUô‰5èåN äà¿C=™I[7G`è³È·‚¬Ú„™÷zy’;sÿ(íçä~Nuƒ:Ï©ô‡ÒíË“© ßκi¬›dO)àjáèð3?Í'~JœóPçìY´„ÛטûgѲ¤ ûÛ?‹–˜AF|)ÞÞ¢ŸàôpL¼5,—‚÷wWHʾʾuÎU¯àÎìz< À˜Ð ¿Hµ½WÙ„@OWkŒÃë^S¢÷•Ç›Oïnè¡6ßÐï0úȸ ƒ•péO]úc£u2K‚JY“§‘r6Á›Ó­›RœÔë$Á†FóMÔŸÿ8û|endstream
endobj
-750 0 obj
+752 0 obj
1490
endobj
-751 0 obj<</Type/Page/Parent 633 0 R/Contents 752 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 138 0 R>>endobj
-752 0 obj<</Length 753 0 R/Filter/FlateDecode>>stream
+753 0 obj<</Type/Page/Parent 635 0 R/Contents 754 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 140 0 R>>endobj
+754 0 obj<</Length 755 0 R/Filter/FlateDecode>>stream
xXMsÓH½çWtqY§*Vüm‡[>ÈB-„@̲‡Tm¥±= iÄHŠ×ÿ~_÷H²¬À!+ÒôÇëׯ{øq2¤þ i>¢ñŒÂääjyr~{A£-×x3›/hÑ  ð—°w½UY¡-zkwTXº¶éÚlJ§éA%+E£`D*'uºüv2 þh‚ó½{gåötceR>S8ÇÚñWìoˆÏØ_<ÄyœXÀîvúGirShú¬UdÒ?1¡á°:1šó÷WzmÃÞ–ºIKMΟ x,¶&§ÐFY¬U®)Qß5å:Þ«B+<…6±B­bM;SlÙ¢ä÷´R¹ «ä†cìÚÄ:§\»'âüåÉ*àS¤Òˆ¶)ŠEþ‹Š“šœ‘ÌTžï¬‹ˆtº}V›²A3 Znu›ÅβÓ7Ë®…„†üëóŸ'Ãá Ót¶&”Ðp1
.ª§˜¸¢<^àe»’…ÍLˆ:I¾OÀ9ò8i’䎸 ß‚'‚y¯Nî±7}<­¢Í^'Á´CcQ‹uë»1¢Bi¦6ZP,¶>4@Ð6g“Ù³„g‚œÕñu]¼9€^Ñã8ý:ØÙµgÑÛ_—AaÐ7äb‡ºÐtºf4Ỹa
èJ…ß7ΖiÄöÎo§Úh˾§ø-ôk©Îùí¬®ÅeYl­û#'yëÖ°ö@Ð>²a™è´ üVLî•I•ÐŒsºQO&‚÷4µ)̼:tñý͵`Aýšç’ú+©FõÝݲîéÛËO¯@×+‹~©=zzåe¦]®#0lµ÷ÚT l}Én&Ôìý¯€gÎQù(2g¬c‘qÚw,‹ËVEà…Û ‰˜B•©•‰Ma¸G,©°õ¡¯&ì°,i‚B P'­ƒ=ööã)2ùÊß  Îh"¢¢ª‰3`V¦¡FÀk„ƒT3(A>:ôóbëŽãÈËal7œöÚÙ¤sJ ®S(£ßÃØ –¹(Ô&„NÙ²ˆMÊ  M ,YN©†å,»§ã¹­h>GÖlBî0üN¨r8\·ê É„ê;‹ ?‚Ç
@@ -1497,30 +1508,30 @@ VWÉ$VfÂqT BÇŽfÜ“ÁD$j<BüS#Q“Á´#Qk€Ë<U¨ïžãZ‹DK,©e”ãØî@«CÎ ¢e’ò3!èÑ—»wÿüûîîa
Êù5F i«?¶µæ2ƨú€séãŽ"UÅõ‘ŸñØ4Â5àV%*ÜbY"iaìŒ!Ö8´2§ûÍâbâUkò²Bð
˜#ØÚåy4=¤,2ø‰ ýD‘.”‰qE,Ã-sZfG-§g] <#]„A€¹;6Œ;ãpa­9V¯f&Þs
endobj
-753 0 obj
+755 0 obj
1781
endobj
-754 0 obj<</Type/Page/Parent 633 0 R/Contents 755 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 183 0 R>>endobj
-755 0 obj<</Length 756 0 R/Filter/FlateDecode>>stream
+756 0 obj<</Type/Page/Parent 635 0 R/Contents 757 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 185 0 R>>endobj
+757 0 obj<</Length 758 0 R/Filter/FlateDecode>>stream
x•XMsÚH½ûWôek‰kI 6•Úr’u’Ã:ÙØ·8‡A  D_ &Þ_¿¯{HÄ@bW µ43ýúuOw¾]øäáߧ8 QDI~ñòîâï» o0™Ðþb–<Šñ„ÂIŒÛ0Ž!M ž—XfwÁðáuH¾Ow ¬Mbº›Ë{î’^® ›–…žSYd43©^àw¥<»ûâôcTº
8 °ãd<™v©ÔRóÔ}xÊ4÷àƒëÒÀÈâA©.ýÇ4©M3­ ÊÒâ+˜Ø¤v%ƒTb×*Ûù“æºNLZqdK{Ôx  Þ2×Uþ®ò*ÓÂæð;OöHok'ÝGd€Ez˜Oˆ·?Ý`æ;·Œ–Oˬœ©ì³K}Ÿ¹rÂßsz©ê4¡Zø?–—¬y$6{ÀKc?Ä5'ìî°¶”îöõÖeÍ„1&tbOÛYZ"Þøb7qÇ8½h,üÞ‡÷oÞw`x#ÀÎ)樋pó'$8<^(ïó oÕ¥)×ÕÏ‚¹¹úxóîŠGï–î>¬t×™Mõª\gsöM³‰hî² ïÿ¬L¹Bú0Hoå¼· a]#£1;ᨑb[¦9Ðœé-Ùã‰ÈÏQØQyâ^ß›röéŒÎˆ-oû·2z¡ §gÚqZu'¶Âp*Nl¯gt]ðî}Ù°û«ŠGlmÔ¡g‡¨P­RÕöäYsŸŒ•Z'¨Cöq·éè¾—¯Q[Ö
<lÞ¾ùþYÇg^$>sa"ÂôçÛ6þíúDZ3 ~û$x¤DóXYx¼Ruý4GâºÂòmÍ¥Ü%)NMmð£8”ºå#¯„ä¤ÓèG1W¸6úFý^ùq3šˆ{ÒŠz]U¥±Ûš•Ë²èÄç(ô÷ñé„3PÑvprý!>÷k?½)OÁÜHIFÑ®-—b‰Ê”‹4Óõ_j±‡9} ?Šh$¸¨Ý.Ip‚W»:Né=þ~»¹¿ßb€´æÑOrìÀsà¿×´*sMsÄHsÐb /ºAMêL­¨>,T3îDÖÇœ²³ƒˆûAlfnpÚì ŠÊ™=7éÉõV*ì¶.c.¯ ÙN8£uìªþ>6œVæã4Ù<ÂUè“TוNÒ¥¥.´AYw
\ûávc–‰$Êшt{»‚ŸÄUFgèkÑá\^¾~{y)Á}#7‹Ÿ
meåϨvØõ ~ÇŠÏíZ“Xΰâžô…}œ0Hò99ˆ¼ç­ÎZŠíM¥@S×êò[ìÍjäG®R„œµœpÚ ?îVŠÓ{i¸®ÍPŠÉ°æ³È0KgÃ-¿h¨™Xé|ÎàOˆÅYŬŽ³zPŸý›¾&ÆpFi89H(Ô8¹v»ú':¿ÂªyžJW¬ÛzîOÜÊI‘ÛàNZ ÷áýi›ª¤ÞƪÆPNPâZÎXç¢3ÎÅ õeˆ&~XØCÛ©Ó‘£—{Z¹?­Ê³]\~£EÙVˆ)½<gJ¹?­p2:h伋D¬ê¯ÇƒÈ‹<¯­!Ëû”XîO+EK{PBwµâŒÞØéÝŸ“úÒ$óq‹û>¿s"}J‚öÇ­rAU™VŽê8¯púg2w,V3sù( ›#ÜðzÒÐ|”_$Ø‘Ðp{õÏË+ú`Ê/¨nø®¬¹’‰ÌHß ïÇçˆÞ¯~’Ñ:áë O · ÿ{ñ?DŠ†mendstream
endobj
-756 0 obj
+758 0 obj
1576
endobj
-757 0 obj<</Type/Page/Parent 633 0 R/Contents 758 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 190 0 R>>endobj
-758 0 obj<</Length 759 0 R/Filter/FlateDecode>>stream
+759 0 obj<</Type/Page/Parent 635 0 R/Contents 760 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 192 0 R>>endobj
+760 0 obj<</Length 761 0 R/Filter/FlateDecode>>stream
x­WÛnÛF}÷W Ü•‹º[vßd§nSÄIš¨(Šº(VäÊbBî*Ü¥eõë{f/4©(iŠ$ˆx›Ë™3gf?Œhˆ?#širAiyr½<ÜNi4¢åšo]\Îi™Ñ0‡´L{?¨´Úo­Ìh+ŒÙé*3TÖÆÒJ’TbUÈ,!ºÕ•º’”I+òÂV´Ñ;"«)Ód7¹9§J®e…;gË'?,OØ…óC#þõîÇ“ÉE2¤‹ù8¹¤’FãËḫ‚Þs _T.àùïwB~}óî÷·Ë—o^'[ìîùK÷ _öâƒÛ4äÞŸÃÌh’Œa«w?¾˜‡ç~Ü_$S~¾ÜH2²zD> So·º²Èµ¹¢B?heH¨ŒD0ÐÄ=úCIë^øÓôÈl <*ñå˜ḃ1¡@a†Ja,¢]Uz‡À A¢”ø±Få~ËU†ÛDi‘Ke¹h…N…õBžù8(©=¾¸AéßRÙ×ù|U®k|--(ó‘®Ùm®MZ—ð!lŠä*-ê ÜÚåvãXBYnl•¯j÷Á¸ ü:Z¼Xœ#ÅëƒLcêϘZ€raè½(W‚Ƹ›iiHiKzÍü”êr[HdŸóÿÏÑê5=TºÞR)¶[Nf…ì¤T ~¯—þWy,ŸŽg õìrâ”4]6W‘Ôx8r¬znº_UþMÝ÷¸{+)ŠbOŸê±¹ s.RÆõ’OÛ‚™‡¿<b.š­HåýÙ9íuÍ·ê"ëVÉAÛmBn O˜>Ú…fsÀTÒd˜LÂÇÞº,i6K®ZϸYqÉ ·;Sd%t v7]I¦\%©VkÈM%JTÁS4WàBéYƒ:¤ÀÂr N_øŽ[°esJÆî I"Mu­¬IÚYÌæ@yz9GFcüC§­½ú]ÑM½†.ÎÆhN;âËdšÐMôv'ÒM®$-+VÀEðâúüg+èƵášp÷ùð8Œg•BGXd{ 0É´Î`›k-Aã-»–ï×Æ×[Ô°®¬#
=æYìKìpà3FÚÁó"ÚXºzj `Cíàå'©RyŽ¢DwÍKÌ4XX aUR)Ë•<ÔbWÐÇJ¦¹PÎ30èéVÃÙ~¡êðŒÜìsbƒÚ+}PúüA¶Á!4"Vø€t‹&Ÿ·/n XK I4ZSÒP,™\­Â;ùÀ#h€¡ açœ×Fäü œ·ïì@4QYT©®ÁLÌÃïݨÇÎÕ¬Ña Â¹>‹!:ºÉÌ
endobj
-759 0 obj
+761 0 obj
1878
endobj
-760 0 obj<</Type/Page/Parent 633 0 R/Contents 761 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 195 0 R>>endobj
-761 0 obj<</Length 762 0 R/Filter/FlateDecode>>stream
+762 0 obj<</Type/Page/Parent 635 0 R/Contents 763 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F3 6 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 197 0 R>>endobj
+763 0 obj<</Length 764 0 R/Filter/FlateDecode>>stream
xWkoÛ6ýž_q—vˆ IJå·Óm@Ó.[‡¥Ýð -Ñ6[‰tE)Ž÷ëw.)Ê$0±-‘¼ÏsϽü|S1{ÔQ’Ÿ\ÎN¾Ÿt£É„vÅ]šö£ &cüìóÏBÒ[»4Âc¯^‰{xáV
‹ß|@Nçj@qL³ÔŽ&cš¥n½K³¤5[Iz1ûxÒ¹‚InO«#ˤ³ÖnR¿N·Hê²ØÒFeeÊ–Tât.’•Ò’´È%a­\‘ Óç§$Ök©S™žÓÆè³’VâNbÉI6¿f9ü–Õt©³G³´%HWX±+‰O¡SÒ†he >U…LJSl#º2É{‘¯3ºoDJg©Y¯·gÐ[ei­Wz¹§î?ýÍÔ' W•½2¦̘ڽa4`‹¾ç÷Ãîÿq½±Gnc«¶îo­’O¦1­‹N*ï:ìòEg®tg!2[o ‘o³®‘Ϋ¹¹“çuÒz!i«ç[”MsDJo)•6)ÔºTH‡KÚ¡äL&™B‚ÏIE2:§KaeŽç×&_W¥,"ouиÀFwãÚN¯˜[“áx¶¥¼b`«z'ËË·ïo¼~³ØSO¥áM 0•òoOM.”Žˆfx
ÅéB jؤ^ÙZëu„ˆ&f¶ùðƒã¥a<Må4áË?dt÷ã$·ßÓ°!¦aÌö©ÉæsÏB·­Éí çlÃjNÖµâ&Ï™-8uvÅήd!›š Ødª0¦|V×Q°£Õ(¥¶ v^/÷”Ù¨ïA`ÃzŸ,Ð'[.×HS]Ggö <jÔxû†êBÑrö6‰C®–RË‚¡t„‹Earƒß¼÷ûidÖu"FQðžxxÿ„ºôY„JóJ*Ïeª`C¶}
@@ -1528,11 +1539,11 @@ xWkoÛ6ýž_q—vˆ IJå·Óm@Ó.[‡¥Ýð -Ñ6[‰tE)Ž÷ëw.)Ê$0±-‘¼ÏsϽü|S1{ÔQ’Ÿ\Î
tš¯\½zV£~<ù©kÊÀwð€©ß6Àݺ:WSŠÁÿ<bõÆCשwCDD½ˆNßë6ÂԾʶ§ôšSÎÖÂ…ëz„šq›¡W¾±¸íêù…G77±Yô*¤û¶ÅIçÆ…ºãQëömÄö
ÄŽ}ýŒår‰aýY‚*_~!§ n`ð§H4|q×´öZð¥dD#ô{Ã-Áƒ>ÈôGÐ0Ó?+]Ý“ÝbÞÊ
endobj
-762 0 obj
+764 0 obj
1656
endobj
-763 0 obj<</Type/Page/Parent 633 0 R/Contents 764 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-764 0 obj<</Length 765 0 R/Filter/FlateDecode>>stream
+765 0 obj<</Type/Page/Parent 635 0 R/Contents 766 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+766 0 obj<</Length 767 0 R/Filter/FlateDecode>>stream
x¥WÛnÛF}÷WL
aç|ƾ¯¨?%CŽ§Ü¨’LÀ£æÉäz­³#oÑCBtKô Š¥"•(E(½*Í“>¸XôL¢“ RͱڵØߨÐqë+éÙi `̵>:€_œSQ…’–šPoíÚ‘ƒä¶šCÀs;“ç´R&'³â¬‘¤±Êï‰!ìømAÆk„o‘™p¤G+7¸Û WåÇ@A é
•nŒÕTz®TƒZ" ßk
@@ -1542,11 +1553,11 @@ b„Q
m«Hã†&\ÃF…u÷±ªÐ´¬J(›,+$ÝèôQê¹t_ét* AdS½‚&è¶ÖYÝî¤%§D3ŽDNU€ÍÆi˧ ÈUþv–xú9N ÖýG:b þèf­ú ‚øŸ1l¥SCHCîxÿ »6xõÌèHEV;•£³(©¥C[d54äq@Ô4Ƚ«b[ Õv›ïŸæQ_íø:ˆ‡§CÝæu¶8èßÏO0.i4&×4¾™àó¿<ðºÓutuƒas<__'̦ô£wË\Ü2zï½óÒ¶/ï† Öxe™¡Æ¦y•aÐÙ«3ü‡ K¸õ´üqÞÒYÛŽ˜^ôÊý‚Þ0¢¶ õ;ý´Ó«8®8ácÐj»Õ6ÓYB÷^ëwwl¹­ÎEq(¸'ÜÆ$؇8ý†(vΞ•u;@î2µe{8
•AÜh˜ìâÚ¯°0äû„\T7™VŒ†Mrå8CvVÃúº™SOf»‹H7ËU¬38m…£2ÌܸžÁZBú9µÛ¸¼]g‹-í²Þ¬Ü<"%I7ðÒÆ×8.…ð¬ùRiú›7£ÙýTÇÚ°³ìŒÖ2¬1¹Oÿfrl¯,”:k/G[d‚/´Nh÷té-kWTù…d‚Æ/ ^å¢6MDÐ-æW¹IQ^#eÆòÄb€0YÙÅŽu,3„/>K&ŽÑZíßÒN30^Z#GoÐdñŸ6ÂìÐ ‹¥‚Ó£ë%§´Â)™tlÊ sÞ¬²Ž*¶P]ôt²N`ÒÊ(Ãn©¡ö®(lʺèåÙÇé+\?Úý>ÞMë¥låòÜí ýIÊËCÇ«×7\4²ºdD­"‡·fÑbÊôíbñiöáÃ|±ø5òü@}¶'Ôû™.;;ZËÀ}å¡ï ÀËr½± ºX‚·èEJÔºö®Úžiìß,~SàÎ$í +_ˆÌëdÌŠ`›W™Eo©22™VÀ’oÊŠÀ@åP­5PˈXf $„è• ®ÐØ
endobj
-765 0 obj
+767 0 obj
1534
endobj
-766 0 obj<</Type/Page/Parent 633 0 R/Contents 767 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/Fc 12 0 R>>>>>>endobj
-767 0 obj<</Length 768 0 R/Filter/FlateDecode>>stream
+768 0 obj<</Type/Page/Parent 635 0 R/Contents 769 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/Fc 12 0 R>>>>>>endobj
+769 0 obj<</Length 770 0 R/Filter/FlateDecode>>stream
xW]OÛJ}çWŒªVM¥à|&—+(Л[¸Š¤jmoÛ›î® ù÷÷Ìî:qÝÒJ7­
Y¢ÒuÅ‘Ú¦÷¶€>ƒŽœ!îbTð($‘¡¼ÿ­ã{fõ̉èpòšPÒNŠ´ç¥WP§þûÜ[½áÄ_.äUD÷°½·àøF«rù—ÓH[\ž&¢2S €7ç2+ñÄ|ð¤Ì
@@ -1558,11 +1569,11 @@ Y¢ÒuÅ‘Ú¦÷¶€>ƒŽœ!îbTð($‘¡¼ÿ­ã{fõ̉èpòšPÒNŠ´ç¥WP§þûÜ[½áÄ_.äUD÷°½·àøF«rù—ÓH[\
ŸP5hý½Êxq&ÀZê"³‘q àþëaŽø«ÆûFÀ³
ÂÀZÍöÿÃÛ8ÆM­wö¦ÁÑ àE÷Ø·óîôóÙ)Ýhõ7ós•TØç½™2Eã n?œ Ýûç4EGýƒ…´žÉü
endobj
-768 0 obj
+770 0 obj
1802
endobj
-769 0 obj<</Type/Page/Parent 633 0 R/Contents 770 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 198 0 R>>endobj
-770 0 obj<</Length 771 0 R/Filter/FlateDecode>>stream
+771 0 obj<</Type/Page/Parent 635 0 R/Contents 772 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 200 0 R>>endobj
+772 0 obj<</Length 773 0 R/Filter/FlateDecode>>stream
xXMsÛ6½ûWìMJÇ¢õ-+—Œ“8§ušÆJ3í𑄘T‚´¬ß·
VÃg¬Ž'Ñ,\ ž±:YœEÅ 0X'ØŠ-Õ°u‘¹kxÁ¹jˆæY×P©>O—£CëÀyƒ>‰'¡2±ÎÀöÂät¯’ÂX³)#>0p ÆsT8ô^¢(~¬aú¤©bΊŒRYŠ}Ég®ÞÍk²£ÂÚ£_˜hbmª2ŒËUÌ‘naȯüé¤>=XD×(9¸Çó…Kü©Žx­µ½2”€,àˆ,a«Þ ú¹¢ëë21z£¶ÑÞdÞIS}:‚¼yeKªÀxG7ÐûAO\UŒfÞemuÖX…1vÉgÙ5
Æ¢¼Ql¼¡ÒIV¥2¥ƒ*w\Gµ£5`ñ6ìúÚ”¼á‹)mé´¡ã…·ÚqBPÒâ<T‚œF­›"Ø‹lbÄc+UúÜ9‡!3ªÉ[¯ ¨Û·a¼«
@@ -1570,11 +1581,11 @@ VÃg¬Ž'Ñ,\ ž±:YœEÅ 0X'ØŠ-Õ°u‘¹kxÁ¹jˆæY×P©>O—£CëÀyƒ>‰'¡2±ÎÀöÂät¯’ÂX³)#>0p ÆsT8
wõÜÛϽÐb+‹žËYÏ
ÔüÒë¿O•h n<L®Ss~ª#¼¼×æpI»0,‡ÙYl®°ü$e{n˜èàÔ ûU7­X õAo;f!%–ßýË$Ï=\i”øaJËçÊ:ç(O7ay¡Â633²îÖv…óå­Y`]·I߆ÂÙþðZÊZÀ1ƒ×SülX¯5UŽ¥öý4LdÖÿ4w‹I§¤ß”<Ô/Wïþ)¢ëz¨ù7ºë™áy¸¹}ÃoX_1kÐ[“Tü6ÞNãƒÑ|ÀÁbìnø¯þ0]L›÷šéŒ9€÷å_/þ“Ë÷endstream
endobj
-771 0 obj
+773 0 obj
1793
endobj
-772 0 obj<</Type/Page/Parent 633 0 R/Contents 773 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 207 0 R>>endobj
-773 0 obj<</Length 774 0 R/Filter/FlateDecode>>stream
+774 0 obj<</Type/Page/Parent 635 0 R/Contents 775 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 209 0 R>>endobj
+775 0 obj<</Length 776 0 R/Filter/FlateDecode>>stream
x•XÛrÛÈ}×Wôé*$Hš’ö%å‹”¸J²“^ïVée ȱ€.f ZµÉ¿çt HHI%å2%âÒ×Ó§Ï苘¦øÓåŒæKJŠ‹÷ë‹›õÅ4šâ:Äüñõ¯³ømtMË«e4¥‚Ë+ü¬¿å´â·&· ŠcZglhyuIëT,Li ?ä&y¤.5G©;ØÜ©”ÂN“*“yÒ)e&×ôfý£ï¼ÜÒ0 û_&|F…IJç]¢Ä“~ÉÍfr¿º»ýtw³š|¾ùíÛ*ºùíæܤCSϖѱ ×ðýÝXÄâéóšÈçI—Þ8K.“Èß¼.é^YµÅÏÌ•D]¡ŒõR6¥ÁJ—x¥}‘žzR&W›\s
äÐß]Ï÷”(KŸh«Ã_8ú+܆
·ƒ«‡ÿ…²Ïä]U&Ús+ŒEé ¸3Çêâªôˆo?…¾äÆn)7>ø}½ý0ðÒ¥Ô%U¡mIiÏ£»ÆÆ0 ¥‰&ìĸWÅFQ
@@ -1588,11 +1599,11 @@ _Í6mrk÷ó‰ŠoâƒaХߙ=¯$L¿/›Å×°âJÔÍòGr`!Š¼IVb
µÕKFˆ2è}«ñ2ÇÚ…íp¹XQ4iáR¯ºH}¤_qFóÅõ¨Q§|ñͤ›Ÿ—#‚÷D¼x¦ïgMg…Ã{ Û3Vg•¦ÀA¶>÷ÖÒñt°Nb˜ð#|XúÝU=²â­FóE¤¿Î0ÜÏ÷| o:p:ð§Ý>¤…Î(òLJ›'ÆßÞ
Wïîß¿ƒîr?08¾Ÿœ9Òq 2Ç"¼œ 6þ‡£ëâr<½X² ì‡\ü‡,b¯endstream
endobj
-774 0 obj
+776 0 obj
2019
endobj
-775 0 obj<</Type/Page/Parent 633 0 R/Contents 776 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/Fc 12 0 R>>>>/Annots 224 0 R>>endobj
-776 0 obj<</Length 777 0 R/Filter/FlateDecode>>stream
+777 0 obj<</Type/Page/Parent 635 0 R/Contents 778 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/Fc 12 0 R>>>>/Annots 226 0 R>>endobj
+778 0 obj<</Length 779 0 R/Filter/FlateDecode>>stream
xÕXMoã6½çWLEÜ"–-ÙñG/E7Û ›ÝíÚÅ¢€/´DÛj$QKRqréoïRòW’nºè¡E€À²¨!gæ½yOþ|R! #ê (ÎO.g'ë>…!Í–üÕ`4¤YBÝ ÛíÒ,nÝ©ME–=Ò£ªh“fR&d¥…±¸C§ï¤Ý(}G·
‹•¦™R™!Q$t±’…=%RÙµ¤w3šJ}/u@XD‰Â·©¡ïfœ`ëv4úؼõF!úÔ
m©¬M‹•ÁÇ+UX­2ú
@@ -1605,22 +1616,22 @@ $ ûAX_ÕHxÚS ":¥Ý!¢nóf³ Ì]Z–HßH«‡ŽÉmͪ`móìE
›àóW%uG¿á¨ïH×Ñõl£ó#²]Ï>ø¡Ë)¨Œóôö’L)ãZž²¶EK7ˆñ?ÈÓX+£–H )ÔIw½êpO¿"©Ýˆ=xaú ByC+x²æsUÉ,sæG.ã^矕±h4ùÂ^è[?`û«'Uƒ9{ÑQë½Sà™+¨¨òª¶•0-yJ&tpª€ÞàM^½„W*ÛÙîmÚ©Ëš4nüî¿ÔÕ¢ç^  ðÅî)_›óF¦UY*ýD¾Ø1þísµX?›©ßb«…^†x^DcèÁ˜%d;ï¡¢î¢.8Ê<îÐë€ü\!=gXÝ^ÜdÑ«éìÝL°¿)j㜰ghÛbžáP¶è†Ç¼²¡fZºÍùwÈ­ãæîµ™]¢ŠS‹÷whÃî˜b¡*ëØæâ´¨$1
‚S–"¯ïÀÔqå…úshæ…ß W’ƒ¨Â™$Žå¤2“Âà»…ûn“é[Ui hGãë
endobj
-777 0 obj
+779 0 obj
1869
endobj
-778 0 obj<</Type/Page/Parent 633 0 R/Contents 779 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 229 0 R>>endobj
-779 0 obj<</Length 780 0 R/Filter/FlateDecode>>stream
+780 0 obj<</Type/Page/Parent 635 0 R/Contents 781 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 231 0 R>>endobj
+781 0 obj<</Length 782 0 R/Filter/FlateDecode>>stream
x¥X]sÛº}÷¯Ø>YéH´$ȹ/wœÏúÁŽo¬ÛL§îH‚bÐA+ê¯ïÙiɬÛÉÌLñÀâìÙ³üãhFSü™ÑbN§TÔGï–G'ŸÎh6£eÅw/.´,išM§SZ£+»U»†‚®uë@q­"þÑTê'mýF‡†TÐôämë¢Æå˜ïä&9i£LIÊ•é¶Ã°ðfùýhJ“Ùi6Çb£U«‚âÁ=m‚/ÛB“ÂÀMÑZ¨Ò*¶Xk¿|M­3ºr;â_dÓ)žã\7‘V­nšc^nr°ƒÈÖÆ­¨öð'ŸŠ† И_dgÛÃü|Ú=îQÂÓÉéÛì‚wðÔÚEãml°á _Q£ê\ÑηGÛðŠ¼º¼GŒžŠ|¯Ù5Q×d"níD­+uÈ蘩YûÖ–ŒS®r»Ãž±QÎ’dõ€¤FNÃ!`ñ@Mg…wUÆê1ÃhµJÆàøMJÆÑ?W‹Øaz QU…yéîÃ{jÚÍƇø'€»v¤ÊÒjÈ:Çßá6&#Q“Ï£B>KºŸŒ"zÿ÷{êÁª¨¦v²Åž†û)ÖºxÄ$&’o_¸§áÿHuÏ„e
êd«B*n¦Ïk?Ÿg—ÿGÎ/DÌY]k³ZGh_aÛRwÂÑõ…‘t$e9ˆ}Ó¡ÊW"¬ p0Øb’ØGÞ‚„Ü'€B5T· þŸOÝË0zé+|h4RÂøskAÂx‘ÌÓη«53lÅIç7PQÿ€¾q¡!µ:ÎQ'¯Áñ“ð0º÷ ºÌúNU½VXU=k9kf^PhÚ#ª8Ëa »q#ã¨äzc6LFù"|x3d ²GI°ºÍÿ5{u'à2f[mÁýÿa³þÉíth ÷°LÐUk¡©ÜªU!ž
Iâ3’Õ{~Yâà—Ù7XS ßˆ¹ H-(‹æR©o–llÒíßJ(Ÿ÷juŸLZºÛ›×‘ÈïË/Çåd¼@p¸,6>m•Ç
‚•º"ÓJå  D²?ÃÀÌ"9ì»Zgù‡Xf˜ô‚/*@‡ñ(?î‹k“e4µCû
·ÙE`´j¸ZbîdòXht²“†“
endobj
-780 0 obj
+782 0 obj
2245
endobj
-781 0 obj<</Type/Page/Parent 633 0 R/Contents 782 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-782 0 obj<</Length 783 0 R/Filter/FlateDecode>>stream
+783 0 obj<</Type/Page/Parent 635 0 R/Contents 784 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+784 0 obj<</Length 785 0 R/Filter/FlateDecode>>stream
xW]oÓH}ﯸ+m‘Ó¤!iØÕJý (…. }™Øãf¨í13ã–üû=÷Ž¤¦íRMÆž{ï¹çÜoC:ÆϦ#:™PZœ/^^i8¤eŽ“Éé”–'ÇÇÇ´LçÞ7Ú“Ó…
:£`)¬5ySÝzPØ;[Q¥Ã£u÷TÚL¤œ¦Ìø´ñÏ›
ÏO^§ÁØ*!Z¨r¥È7um]ð”ÙR™êÅòëÁ1 †'ÉÖå^´½9Úñ©3uÀתʨñÚQíln
@@ -1635,11 +1646,11 @@ M·‡«&îÝMm²Ûrê4Ìí±Ö {+9„—j¥¼æ«*ȯÁ  è‡G­ûĈ°€&Ñ ß±¾é<g~=h`±Í;8Ç"ýþ FB
ŽÜ\^H8joÆh»a×óþèÂå]Fvº¸éFr]¥nSwó#ËšçH+y>c'20"öò*mW·Á:ÃÊ–ÞŽ&Si·»àøl»]u[ÒþpÄ‹˜Œß<Íó$S*ÈP˜\ƒÝC¥)
ðÿÉè`tŠunžÂ€ˆº„ ¥ÝLÙµTá-ŒÀäƒO‘•éñåÕ«6âáä8Áô
endobj
-783 0 obj
+785 0 obj
1909
endobj
-784 0 obj<</Type/Page/Parent 633 0 R/Contents 785 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-785 0 obj<</Length 786 0 R/Filter/FlateDecode>>stream
+786 0 obj<</Type/Page/Parent 635 0 R/Contents 787 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+787 0 obj<</Length 788 0 R/Filter/FlateDecode>>stream
x­WïoÛ6ýž¿â–!˜8Ší8N\`’&i,n»ë†z(h‰²ØH¢+Rqýßï)ɶ’}Û¤¶EÞwïî¾ô©‡ÿût1 ³…ÙÁõìàvvÐ ./iû§Xâ ŽõFø;¼¼àÏü)$Å|a¦ùƒã§w8Ò§YL]žÓ,rÏ{4 ;Ÿ¦·Ç³o§wÃêL' š%’tžnÈÈ°,”ÝP¦#I´NT˜à•¦”kKk]<QTJ²š¬ “\…"E$ÂèÜ2äM×î;Ó÷W·-wÞtí(Ø¿Ñ£“þY0@È›W÷“öe‘G/œÜ>þù"©}/¢L‘á·ÒXô,
%¬Ò9ò¦éÃ5•F”Êg™6 ¸ØÑ` 9¢«Ð–l£K6Ae À‘Maª„}«däऑ\ËÈHi8 ]8 §"[Ê8–Ðä³:*§L+ ÎzŠE¡×^ŒÛÊW†e¡ËÛE+Y —|IÁÐÍ[Tôs¢Rga1Õ¥B|p·Òƨ£Š¡Îcµ,A&Ñr
‡Ï𠓦 æ#2$›vÉä¢Uä©^2 LÙµ¦H„Z¸ŒTËBæ–â¿
@@ -1647,11 +1658,11 @@ x­WïoÛ6ýž¿â–!˜8Ší8N\`’&i,n»ë†z(h‰²ØH¢+Rqýßï)ɶ’}Û¤¶EÞwïî¾ô©‡ÿût1 ³…Ù
¡:¦zJcPÅeÊg”îZ+¤ZEZäTÙ*…žAÑ‘˜±blÚ«‡·V+‘‘ÈT°°q¥ÞI{ŸÇºžu{WÓ!-¹çÑð<M1TÇîÕ jÐ{½ÆæS¸ÒŠÁ¬ ؼ H¯Ö‰x–
²m?RdC›WÀÄœ{ æôêáw^bèñãÛÍnµó˜Æ~†HE¾ñiA„à6Lˈ¨|…ƒKúµI„¸ ­^ Z5©×“- ëyø4¥dÛà'-ºív@ÜkzòÅäp¯ Ø×ÏǯNŽþvÉd{cd¿]w'=š êTDµE½â‹ôe™ê…Hÿb^Ö!B&[ÜføÍ“5†&ê5#;ïp‚ò‡à^™¿ñŽ{„ãíédpî×s·€Bòl‚eŽÿj´Ü"»ýÊ´k¾ññùüèÓ|ÎB_Ýà÷Ó;a?#ÿb2C¡B¢L±Ð"2·´é•“$Ô…=M¼ÍÊ^×i-6a~fxõ÷Í9ŸsùY‡›x¤;89b#­~à‹*t¯!4‘{@”ï–_Åx¿Çº
endobj
-786 0 obj
+788 0 obj
1796
endobj
-787 0 obj<</Type/Page/Parent 633 0 R/Contents 788 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-788 0 obj<</Length 789 0 R/Filter/FlateDecode>>stream
+789 0 obj<</Type/Page/Parent 635 0 R/Contents 790 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+790 0 obj<</Length 791 0 R/Filter/FlateDecode>>stream
x¥WïO9ýÎ_1é•Â’„R?@9¤ê
åŽTí©©*gãM\víÔö6Ô?þÞØ»ÉfÛJÕY{~¼yófòù O=|÷é|@§#J‹ƒëÉÁ“ƒ^2Óî—]àŸöɘ†ãs¼ðK+)ÃÙõÉ°z‚—½ø¶ð¶¿`èäöŒú}šdìp4>§É<èÑ$=º7^^ҳɧƒ“Ûauìè}þ”æ4‰rq1¢cZKZŠ/’æʥ拴rN‚VÖÌrYÐz‰7è­Òs³v”æJj¿BS!”öø!Áö{tÜ?Mð~”­eê•Ñä ù¥¤÷KSH÷ÜRÀ®Ì¤_K©)7 ¥]B4ùîTQ:O÷¯'lÀÊÌXÉnŽ~f’J‡`9Ž7S¹¤•ðËä °÷h4¼ØÜ@òäö¢gú{°“q2À÷6ï‹wôÂèL-J+8±}DÓ`„z!÷‰!W®VÆz¾‹kb]Ú˜’BNˆ9€ÒAò€ˆ¡é l+
é¥MèQ3Š8Òf ¤
@@ -1662,11 +1673,11 @@ uç§ÓC8AIʲéäçÞª=@lõ
÷|Þ†@c8d„õw»†½Ž ƶ΀[ºTZvi{†•Ö[“ÓƒÐ2§oøë†Ù<RäXBêo:Uý¯b†ÌÃãVŒ“ß°ÈÌQ•/° ÈQðÌm   ‹£×Æù:7ôõ‘ñÆþÆ–RS`€kŽÖÊ™1> ‹ü1–ýzÓîÇ·ðÎÏ}ËSЋ°Ý‡1r§RkœÉ°‚Ç玾q¾Íý94Ø1¡ÃWf¶KC5½1LØCd<XuAÇËAØc9Í«
a7„[èX”ópD ßïCb³; £ÆÀ„Wèÿ_D²^z°ë³»“Ûqõ¡ ?$}Îã`z¼º»¾b|b^ܘ´, ÛÏÇ}DÎøØ5?Š’¾?Îé¥Æj\†ÏEîŠs¸\ÑßCö˜ÆÑ Ï‡ð,žõù lü ;†Mendstream
endobj
-789 0 obj
+791 0 obj
1681
endobj
-790 0 obj<</Type/Page/Parent 633 0 R/Contents 791 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F6 9 0 R/F8 10 0 R>>>>>>endobj
-791 0 obj<</Length 792 0 R/Filter/FlateDecode>>stream
+792 0 obj<</Type/Page/Parent 635 0 R/Contents 793 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F6 9 0 R/F8 10 0 R>>>>>>endobj
+793 0 obj<</Length 794 0 R/Filter/FlateDecode>>stream
x•W]sÛF|ׯ˜â å*’–d}ú%%Ëv¢:YñÅô¹RA*µäš
ò-´_»™H
~eÛªà¦V‹
@@ -1675,11 +1686,11 @@ x•W]sÛF|ׯ˜â å*’–d}ú%%Ëv¢:YñÅô¹RA*µäš
‰+ñˆ—y^cžƒñ.†5ï抲ã:Ž ¬ó*_cÁ`”½V“˜×À³ø%ªÑ/P<[S?½º™]rK½Ú7Â¥ücÎ(Ê$èߧtYòÊ5²_?%ž¢eÇûñ²2E‘ߦZ²É^ˆõÌÞÞÎÙC…A‚\÷4‹«mù½ “„•—u
O¯Î$™ëÙõ æwg›Ò,['Ñ=^»\›óÿv\7ÔõK÷bø™ßxºn“×éó«sD—/Î8Ì»ùÑ¿þ ÍÂK¢endstream
endobj
-792 0 obj
+794 0 obj
1803
endobj
-793 0 obj<</Type/Page/Parent 633 0 R/Contents 794 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-794 0 obj<</Length 795 0 R/Filter/FlateDecode>>stream
+795 0 obj<</Type/Page/Parent 635 0 R/Contents 796 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+796 0 obj<</Length 797 0 R/Filter/FlateDecode>>stream
x¥X]oÛH|÷¯h8œHŒäoûpÞu‚3°ñåÖ:‹Õ‘C‘ÉáÎ ­èß_uÏ’iìÓ%0 ÑätwuUuÓž,hŽÿ º>£ó+Jë“Ÿ–'?_ÐbAËœ/]Ý\Ó2£y2ŸÏi™ž¦…N·ä M©i¼n¼#“Ë÷Öš¼¬4µÊ´:uZÓ¤2ÓÈ• eÚ¥¶\ëŒH­Í«^}˜’j2\¯´×rDç´Mî—dì‡å÷“9ÍçÉâŸÊo¾Ü?‘„ÈîŸÕj[6R´Vé¶k©ÌÉê?»Òê,!>h†rú“®â¥³Kšß&W|úcNªªHWNS®ÊÊM©lR«¾;U¯ÕßÒ\wBATéWÜIÞÐZûÖ K!‹y(è#Ò'Û5H¨EBÚ“·*0Öl¬ªG•¹.-HḴͺºågíkÓ$ú‡VÆl‰kVÍž´µ|¼nõ.‰‡]%±½é¨P¯šTšj'iª†ž–l_µ2p `´Îã’'àeªÀØA'ÕHÈDZˆ&7‚øpN¹‡õ‹Ú"䛂§\‹þÁg‡öòçVr@ÅqÔ×2-v%ˆ3¥3‹v…„…—•y®­nP%)‹Ûøq&&·þUUàfh^€_þ´<“éòzŽÆ_Ü\ãó~ðt˜™{@Ž›7Ô¿In’³ä2¡oe“™ã\¿»u^ùø\$sNñ ð·oÌ7]Ó8b\XÆ4Rq¢ôªï
¢ ò(1;=ó›–(9vn„PeÒY
¬55fG®Õi™—€ÛÖt›
@@ -1693,11 +1704,11 @@ Wãa €1
ö®ÐFK*·5Ìw”t+ò¢ƒ‘ÏzåÎ@ð}øíª×I×TüÆ2q-ýžþ)a£— »oÇzi•s;c3‡›÷ÚM¢Ø5!ù§§ŸýíëòñßO‰ÿá1ñ ˆã
ûøù&¾',ÎÉ9XÈ Ôéóý—Ÿî £à;ûÖƒI1ͱŽ3$Rÿâê·Ï®Ïð†ì4¼e±ÛEó¶“åÛès|€#þ_]ÿËôDî¹ «‹ë D—/Ï9 ^ýþsò?B$“endstream
endobj
-795 0 obj
+797 0 obj
2000
endobj
-796 0 obj<</Type/Page/Parent 633 0 R/Contents 797 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-797 0 obj<</Length 798 0 R/Filter/FlateDecode>>stream
+798 0 obj<</Type/Page/Parent 635 0 R/Contents 799 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+799 0 obj<</Length 800 0 R/Filter/FlateDecode>>stream
x…W]O#G|çW´.á$¼ØÆŸHyàŽ\Bt‚}º‡8BãÝY<ÇîÌffãŸê™õ¾païzº»ºº«öŸ£µñÛ¡a—Δ–GfGgŸzÔéÐ,ç£!Í2j'ív›féÉ_ÅSZP·/êÇñZT+)5e)µwde*Õ³ÌH,Líi2£Êš\Ò]_âFá$™<¼o®¼Ÿ};jS«sžtèä¡ÞKë
wñ—顬 P8~2«´ÉÕ匌=¥ÜXT
oìzôtsßÍåäï„ý:;B%4œãµ7ⵋ?”ÇÊÇMå¸ç¼2Ú•>JFI7$ôUé̬—7•öYZ>z‡ªé’W3[Jœ­iã—J?’7伩hmjr•LU¾æ…FÒÂ/Q²ðáb¡žêbØ
@@ -1710,11 +1721,11 @@ P°—…–>‘/ß­¿QCGl*C¶Ö”[S†¢Ó‹ù|¥´ö`àÚ³çÝOƒú
 9"ñþ<€Œ°:g s)e3&a<öL
Ö »îÝnÑn·Ã"è1äíUﶉK—²~ÁŽsسO£} P|T;™^Þ|¸d+üê•Ik~6 Æ—¿Õê„›[Ã.žç²“è¡yÀsõXC]ø1ãZ¡:å÷PÞ©ô*HÓ½%£ìBÁáS{ÃØNì÷øLÊŸGÿVCendstream
endobj
-798 0 obj
+800 0 obj
1723
endobj
-799 0 obj<</Type/Page/Parent 633 0 R/Contents 800 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R>>>>>>endobj
-800 0 obj<</Length 801 0 R/Filter/FlateDecode>>stream
+801 0 obj<</Type/Page/Parent 635 0 R/Contents 802 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R>>>>>>endobj
+802 0 obj<</Length 803 0 R/Filter/FlateDecode>>stream
xW]OÛH}çWÜ—ª©(+Q +´"°ÄUÊËØ'SlwfœÔûë÷Ü;¸&ZU•hÏǽçžsîõ?3:¿ÓÉ%ÅÁ×è`úí”f3Š2<9»8§(¥£ÉÑÑEÉÈ­EIn-‰^T™ê­¥yD‹«ûɧèÇÁŸMN±aÔ*ÍFJ°1–¤JëDžË”„%©p”!AU.TI™Ê%‰2¥Ê¨Ò‘ —£—‡§¿þ|zx~¤­6¯Øï”.I›öÎÙÉä˜ï ë—Ÿð„݈ÙQ%ŒS‰ª„“AÐ.øÊk]:£sZŽnî¯îæTÈ"–fLFÂ4ݺ$¬Ëí»{¿Šäµ®Þ¯\~šP¨¬(·%gjI‚{XLéE˜Š>Å1ݨ•,ô(ÜÚçèaЫ
•‹a²•Ñi8;& I:£íZ%kr/Õ=™Š\—+Úù^ ‡å‹4¢l¨’ºBM‡Å_i
ÛÕ€dµUåjLVS.ÝGN°!§)É¥0ž$B™áÉ·àBÓ»™lc,P€_kÛÕ\ûZ¹R–/H…±°2`»û™ „‚‚S(¨B¹ê‚¤Ò&F„ÈÈ(§D®þ lR%*S„Ï\#F• ¥œµï%Éjµ9.`¼ŸKõ“n„,ti¥'™©K,ˆ… ƒÛ{’åF]8j†ÈæÞ\
@@ -1727,31 +1738,34 @@ $ô4S²Ý2«ƒf'}1,üúabžÅû‡ˆEG¦–àáȯmÊ^¡lkÖ=ˆÏîŠòâYͬã^£iþ *ÎQBha¾q›Íj¤ÑEþvIP%
½’ùYãMS~°ÍB;<dŠø‹Û—#5ÁüÙÈÒBí;Ô»‰ex;<œoõ‘ùyÊ`–AEÐÌÖ¨ã/=«Ê1u2uØñ¡Ä 
>>#V¾Â)|êéùéäïÀ8ñógþá6:øûà?Q$$¤endstream
endobj
-801 0 obj
+803 0 obj
1722
endobj
-802 0 obj<</Type/Page/Parent 633 0 R/Contents 803 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R>>>>>>endobj
-803 0 obj<</Length 804 0 R/Filter/FlateDecode>>stream
+804 0 obj<</Type/Page/Parent 635 0 R/Contents 805 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R>>>>>>endobj
+805 0 obj<</Length 806 0 R/Filter/FlateDecode>>stream
xmR»nÛ0Ýõgt³’¬HB7; C“´Q·, ue1¡H•¤äï{i…÷ò<õ'+óW )±©¡¦l×eßn+º'uÛ ë‘‹<ÏÑ©ÕÖL.DÐ;ùOôn’ÚâCƒQ¾îoðèõ$yx½ ¯œÞCÏ«Çë«ç »ÐSÐ^¾B%CJ5ž#^t¯YŽu±%+XñyÍd~g ;©ÞóyvGžBY‹*!t#@Ú¼˜–,fé£Vz–‘À^<ÍF+µ³pCZÁÓözå‹ „àÎÔ~±¨íþ‹èà6ž¥$-Xwt uWnšÙÒq+Ž,CÇÀRö:Dÿ)èM—q¨Ë ›©Ú†ï%O–ÊÚSeE݈T'·uV{Øm¹÷J*rdê01ÛÑfB_/¯Ö˳U+ZQ
puƒÞü’Æe1•’ ßñD1²ßdä—“SºþÜ1S ÚPH¨US‰–ÿ!Îþ²>™ø™ý³Á•endstream
endobj
-804 0 obj
+806 0 obj
383
endobj
-805 0 obj<</Type/Page/Parent 633 0 R/Contents 806 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 232 0 R>>endobj
-806 0 obj<</Length 807 0 R/Filter/FlateDecode>>stream
-xWÛnÛ8}÷W З°Ë—Ø.PqÒnûÐ6[Èmh‰¶¹‘D…”âúï÷ IÙŽÜî‹
-ª¶ÊRâCíR™Ia%åâQ’E¬ø,*wWà!Ñ9lUb•IÚ©jË×jSx'Áþ¦ H1#õíN<âÐÇÓPæ4£ixÊhápÅã
-Ÿr‘lU`æà -3¥°;P'Ó] ¦§ZÚÊÒÚèœvÚ<ÚJTJ–áp¸ƒñÐóã^©ÞYú² Ž#ºßÊB>Þ Úz³|Õ1òäøýÑr…G/¸Ô…LßrÀ]ž%ˆøSÔíÑÒV!â­„5ãL²ÿBäÒ(…µð‘¾Pµ/}‘™”ÚxŒˆ–[ùŸ,3%­ç¥
-m•z ÜQZ×YF.9xfüøuD×xëºì4˜ƒ†Ñ(§T ¿ÐƒÎp˻սD°^Ðâú³c1‹ÆUäd !pnÓj§é,°ŒÀym˜3ÌŽ÷s l˜sþغ†´¨\˜ýùÅV0?.Ðg?^»BjPhæ,4Üuy~ÝÒ‹9߈¸žÄÍz©§ð"–Õ2ÑåžãæW'YØÝP9|§-䔄‚€vZT”’Su°úïÌGK íbæ™»ÚZIJ‘N+Yt!;DШçoSôíþ¢§YÊ}ŽÂ©nOÐÿv’@Dµ©¶{R^&‚(0Å÷œlK\³Õˆêž OGÔ9a1spºB< •±ÎDtë•›Qhå[)´hÑÀên
-E3Z¤!Lc/¡™Æ£Ñq¸*7!¸.j9¬ …-蘳!ˆÕ/ƒð¶Ý9Þ*èU¼òˆ}€õÁHlÚ€Òò÷²ÆÇ!_„u
-µãѪ0™¹ãR–bïßaÕ‡c»ÁÆt”g4m—V~iùü¬£­^WMé/'L9¿Á¸•qŸŠLèÐ`èü€µåE«áÏɳ=Šá÷vÿnžþ«À¿6ÿïœ{MFP¶t1ž÷vþ$gMÒendstream
-endobj
-807 0 obj
-1542
-endobj
-808 0 obj<</Type/Page/Parent 633 0 R/Contents 809 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-809 0 obj<</Length 810 0 R/Filter/FlateDecode>>stream
+807 0 obj<</Type/Page/Parent 635 0 R/Contents 808 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 234 0 R>>endobj
+808 0 obj<</Length 809 0 R/Filter/FlateDecode>>stream
+xWÛnÛ8}÷W З°Ë—Ø.PqÒlóÐ6[Èmh‰¶¹‘DE”êúï{†¤dEIw‹A%‘s9sæÌø±ÒÿBšh|AQÚ[®{ï×½a0ŸÓéO±ÃÃFãYpA“ù ÿñßBÒ–oà#Ì4püüfA£!­·°~1›Ó:¶ßñ&:»Ú‹¼”-ú TjºŒJ†-EôPåt­S¡²×ë¿{CŒ&¸}v¥³²ÐI‚{*ÃÉ»ªÉ‘V"Ýj>Æ­«Bˆ»Â`#6³€î
+YÈÇJUJú"E¬²;;¿™Pú£Ÿ_Ê­F–G]Q„TVIdmopå^Š\>}Ê)Œ¤T<H2ˆŸEiï
+<D:…­RlIUîÙàVíªÞI° |dÈp~ù£N8ôé<Þ)&Ó`îŸZYðñ8ÂÇ6Ä–»ë+†5–&*ÔFÆ.bIئZÖJvf/ piðáóýúóÓS¶º|*8EJÓYˆh!F E͇6ôÓñÓê/‚Q`ë¼+t•ÅlíÜï9`+|AO%.ÞÑ­ÿ”Šh¯23fhA'‘™x’èÎÓc%Mih[蔺x0¥(•ÎŒ%’Í’áØñã^e±>ú´öŽºßËLþ€=A•qfù*û¡Öñû“å>
+Ÿ^p©3!¾ÕqéÈÞJñǨۃ¡½BÄ{ k…5Éþ3‘J{"ÆÀGÜ|¡ò˜»"3)uQÀc@´ÞËõXÈ<QÒ8^
+ W’Þ"I6µ`[]•«>á ÉŸ"çíÛ<rF¤î™C5¿y¡·
+çž)ÑV±Ê¥m•$d“ƒgÆ_t‰·¶ËÚÁ4jF£\|œbþBZÃïF"‰iuùѲ˜Åå"°ò8·iyÐô
+>Ž_yŽa…áaG± 
+žr QuÉÊFÿ® YiúèÇ(©êyŠþj˜çuu4ÄTcÈÿºc&ÕRþäáoªúÃ{€lbA° »¼ÄyûªQùzi
+#W¾rûi…†a=GI6(Z¡E Â4všhŒ0òF­r‚í¢ŽÃ*SØ‚šÀì˜õAl^ ÂÙ¶çx« WáÆI öÖ‡BÚ`㔎¿§ €48ù"¬ð¬S¨P…ÉÌk¿|dG÷ë=ÔÛ 6¦“<£iû´q›HÇçGÚèmY—Nñr”sŒ]ùw[d|‡ú
+endobj
+809 0 obj
+1563
+endobj
+810 0 obj<</Type/Page/Parent 635 0 R/Contents 811 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+811 0 obj<</Length 812 0 R/Filter/FlateDecode>>stream
x¥WÛnÛ8|ÏW`6lùÇv
,Š\ÔM»ˆÅy¡%Êf#‘®HÅõ~ýÎ!)[U’vEÑÄŽ¤s™33‡úv2¢!þh6¦³)¥åÉÕòäýòd˜ÌçtüQ­ñeHã1~Læ³æc%)çp Q?p÷àö‚FZæ>ãCæ¯i™ž^$gÉ(¡fG™‘–}1Õ£uÂ)£)W:#å,®•BiJv•)
Y½{³üz2¸Ðh÷Ç3>½¤»%íZ!ð”ÛÈ&ÀýåÇ«KüA8Ú À‚
@@ -1764,22 +1778,22 @@ d#ð­Q{¼Û”í #÷Û³å€9‹“(k<œuóËH¬á/L
<¥Ä¾jØ—Íâî´:.x{v@Õ'ï,õü2a›k'Q)t0èF qd–e)2Ù#(—‡EØЗåx·¸Ç=~_Dîp±|3›Žq¢“Ž°{c¸”`u¶£R"=ß
n +¬‹Ì*X%µ©×^g‡\þz'Yð<+𠀉4•–Ïi¶3C>åò,½›q—9 ©®ä‹|9ƒ8¾Æ—)Kß³%xÒaÇ(Ç?(Õ–«8í#™>ÝN¯žÞž\Þ'WP¬«Tú¸‡b$Ú¶Z~‡¤qĦz±µÆt_k­‘Ê¥Þ#˜ó‡U²&Ê­šym ÅIp(°°ÓÔ“HÔlZ©-¦Ç £±xr¢×v0¼L`ÇóË/\g°µpJ +Šq8`ÝÉv°_æ/BÔ@ðDýñ'•~Ã[¥9¿?¹y5!Ê ¶9¿p5­cœßš_»Üy8ø?W;¸Ò¿|àúçþÐsÊ‚3ül<Ü8&7šN“Þ=-ýI>Wæ+h€£PŠwœÛ˜üT4áæþlŒÅìÿ½(NfÅÇ9ŸspÉÿ<ù1M©5endstream
endobj
-810 0 obj
+812 0 obj
1589
endobj
-811 0 obj<</Type/Page/Parent 633 0 R/Contents 812 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-812 0 obj<</Length 813 0 R/Filter/FlateDecode>>stream
+813 0 obj<</Type/Page/Parent 635 0 R/Contents 814 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+814 0 obj<</Length 815 0 R/Filter/FlateDecode>>stream
x•TMoã6¼ûW< ‡¤‹Z‘GvE‘ìnкM==ÐÒ“Å­D*$Wÿ¾óhÉqÜöP,ê}ͼ¾Ì2JñËhµ ëœŠvv¿™}ÞÌÒd½¦·‡Ûá%¥|u“,h¹^áÿb‘¬É1U’(s| üê!¥[ÚT(£Ô¦ŒŸSÚ—¥m•6Ô*ØÑ÷dì·›¯³”æ"r
hì΀½D\=,)ˤæ<£ù"Ç(F¥P3ý¾kìV5Ì=A[C¶Šç¾Ý&…5Õô~ÿécB›Z{ôÿ“}ŒÁYÓ €³Óq(©hTËô|÷ÓýÝ7Y1Mx}hº×¡Ž©¿=~y&Ïî•ÝX•¥ÎÙmÃ-©C‡wµ!Š¾p¸üù™vÎöÝ¡Y¨U-+(i›nù8 —´¨µàI
î}[åáÅÔ
åò°}€`ÁŽwrZÄ':†Ý&‘œºfyÿ‡kÖã5™å«Dnvܺ'×o´3=9û7%ŒYô-6¡äÒ”!懬ù!íò»l¹Z¨ÒòòæV
Âä¿Ìþ¶þÄendstream
endobj
-813 0 obj
+815 0 obj
812
endobj
-814 0 obj<</Type/Page/Parent 633 0 R/Contents 815 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 245 0 R>>endobj
-815 0 obj<</Length 816 0 R/Filter/FlateDecode>>stream
+816 0 obj<</Type/Page/Parent 635 0 R/Contents 817 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 247 0 R>>endobj
+817 0 obj<</Length 818 0 R/Filter/FlateDecode>>stream
xXMs㸽ûWtíeå*‰’(É©ÊÁ¯7®šÝqÆÚtHHBL\€´Fÿ>¯B¤d;›¤¦ì1E
±ÑW5=ÎïÑ¢”CúüËxŽ>2ëìü´d
('òWØ‚¯ü gÉR¯ ê‚Xâ9N{Uï{¼bëµI!,bÑM¹†paÒd5åh5ðú¯s·Þ™Æ!V·ºô$
@@ -1788,11 +1802,11 @@ xXMs㸽ûWtíeå*‰’(É©ÊÁ¯7®šÝqÆÚtHHBL\€´Fÿ>¯B¤d;›¤¦ì1E
FŠæ~¸{zl5ŒBRÁ :Ðk89Ü2}çCЗFƒœüý©mXà
;QækT€ÞðÂjPYùª
endobj
-816 0 obj
+818 0 obj
2085
endobj
-817 0 obj<</Type/Page/Parent 633 0 R/Contents 818 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 254 0 R>>endobj
-818 0 obj<</Length 819 0 R/Filter/FlateDecode>>stream
+819 0 obj<</Type/Page/Parent 635 0 R/Contents 820 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 256 0 R>>endobj
+820 0 obj<</Length 821 0 R/Filter/FlateDecode>>stream
x•XasÚHýî_Ñ•J•I•H`ÀûéXg}g{}×ÞUùË 0±¤ÑjF&üû{=#„ Nv/¡Ñôë×ݯ{üçYH}ü„4Žh0¢8;ûuqöyqÖ&:¼•k\ô)öƒ! 'c|‚ •’Vünb›æ Ë{7C
CZ¬°ûh2¦Eâî÷iwb­tiÅ2•´UvC•QùšDN&[˜mB+•Ê 2*+ÒÌ©ˆ%}hîð~¸›M)Q¥Œ­.wHå$Ò”ìF~Z|=ëS7ŒwW™Ì­°JçA}3ÁÜ\l$<ü¢•ÜR¡Un YMÆ–ÒK]YÚn„å­‰ïÝDµƒn—½è¦‰(ŒÈüͽ÷J´4”kKE©ßT""Ø#‡ÜTE&N°–r%ËR&
ty9DYd4èO‚«ú*¥¹+\^•@ª–¥@HÌ£^Z¡ràsaxœÎîh®WvËIùÒq Ò”—³‹ël¬-~éõ¶ÛmPˆ$ àfïx©«I^úò ~ý¦·n]¸”J$,¦Î=0¶RëªD(NRÑ9N…ˆ_Å`ÍRî˜`ÎJëBr~¥§«.O]
@@ -1801,25 +1815,23 @@ CZ¬°ûh2¦Eâî÷iwb­tiÅ2•´UvC•QùšDN&[˜mB+•Ê 2*+ÒÌ©ˆ%}hîð~¸›M)Q¥Œ­.wHå$Ò”ìF
µX\²Øµ¥ÌTËLùùùP×-©ÂKÿO„ÿo©.Æþý üOäagf°9<¸Ãs•a>fc‡|l8¶:YQRÉbÃØ8Cæ€5Áë_§5ºú;û©·Cx®Üá£O¢ËKñ±9DàÓníóÃí€÷Fw$ÎôXÑ`Aãl…Ž…çÄ#!ä~m÷Ó©#ˆe4Q8ÂTµ¸:dÍá (Úó%å6<p"!!ãi↷’—Ž Ök×˧šrå©(|2Kížv'27M°¸£rtßñUƒúVëïÎz·9A÷pjâÎ#Çö=j!™Žzž—\(ì1°Æñ &
&[cC^uùv'píüGÞaú mK•û#k‹]$2—(`còû?;8P>GO¬zÞ9ò½)áž‚æå O_×ä§ÚŸâlPh-m±ÍEö‚cÄI`L ¸—.øXÊUÄíÇ'¶½l]Ä•2W)Rk# ÛÌ¢·ù¶7¬r ISˆs¾ªr@uÎn¬q(ŽmºÛ‡™“‘h˜‚O¬¶K9¯Ì&ÎßÚUä¾â9ò ZÑwb€Ñ]`P¶5Ó,ÿ|N#¦ôÄæ¶x¸sjó9
endobj
-819 0 obj
+821 0 obj
2114
endobj
-820 0 obj<</Type/Page/Parent 633 0 R/Contents 821 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-821 0 obj<</Length 822 0 R/Filter/FlateDecode>>stream
+822 0 obj<</Type/Page/Parent 635 0 R/Contents 823 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+823 0 obj<</Length 824 0 R/Filter/FlateDecode>>stream
xV]oâ8}çW\©¥R „ï>¶3ÛU¥Ýîì–yC™Ä€g“8µþýž›8Rf&•¢_ßsνö{'¤þBš i4¥(í<-:¿-:ƒ`>§ÓËlð1 ‡)^ãù ïp:
†d$­a; Ñp‚O¿4ããÜÿòn¦óTÆCl.½ nÿùÂ1-ÖÈh:™SZÄåî-¢n8&}ÒÙZm
£² ½‰t%h§Ü–þøüøånñ½3 ÞÖqeôW.3^¤ÈoNéŒMûÏc
Ã*Zo8ãM M*‹’"–d‹<×ÆÑZr[|s¬Ç(ÒEæH¯¾ËÈÁ–DvŠ+ƒ_µ9•æ?iîi­Œuˆœ؇Ï/dà¬ôØh+SËD’Ód‘Ç·ö<[:zªÄÿ1ñ) „7£µ»¡jyâ—»Q^å]GéKõ5Ib‘÷«ÐýXx—¯rïî€0çÑÏ*8÷Ò­
-@í-\_À\´6´¸‚2ŒP™%·Ó$œ3jU8iy?Ø®ÑÜmU´¥X¢¸˜Š\g¤‘±¡¾6 2Èm¡âÛ“'RûÖ*“13ÚJ8Ò+ÀVÎ`?¾@ìm¬lžˆÃ«Håõ8ðD Èg“Kcuv%$ u<UÕé5Ç·’ÒB[Éš­¸…ÎJBÇØÏsxTÜwJH=4z)¸›jÉéŒZP3 Ëî²É-»’©5 ô|/Ð;1­Ì„(·¼«+Àb}×}I§§¾l¤~õ÷ÐH#“2Fîéf?ÿr¨–4XŽ?™î5ÊÁUsž|,½È"¦ÃËmy‚À¤ÖtÐíÿŠÙãG«äŸçOÃÑ`®^_Þ–wžÀP ¶MËEN2ejn(#ÀÃ>O£¸Ç
-›Vò–ÅQ%ÎĹ­peÊ)²:eÑÇ*’–ÐôåwÕ”jôDaåºH’S»Û{ÿ/oâv¨+ò3y­“Dïøl‘{‘扼/É¡ Ìua 3K©ÀÁá>ž
-Q"¬…ɲËÓ!×ÖªUràÔÞŸ­ ÞNí7A„¥L’åÝõÖ£_1X«¡¨z‚›f[Aœ·-K '÷þH+“G‡ÉwoÔhžZùêÛF:Tžï2‘.»Z•bÈžZ•r#íýÑkÝ%<¼èò¸v»ùΨøªc¬5}62mj‡£×¹À´°Lo“ã-LXiQ1‚®1
-”V’9Æ5U6W×"]áâç˜è©øÊlócfQÖ¨úº·Trį£*hyŸîm—o]s_§³€o‚|:Ý»Þÿ|z¤/F—wžÏ:*xŒ¯Q½jW¯Úöc·´ñlŒ©^ÞÓ¦CFþÝù
+@í-\_À\´6´¸‚2ŒP™%·Ó$œ3jU8iy?Ø®ÑÜmU´¥X¢¸˜Š\g¤‘±¡¾6 2Èm¡âÛ“'RûÖ*“13ÚJ8Ò+ÀVÎ`?¾@ìm¬lžˆÃ«Håõ8ðD Èg“Kcuv%$ u<¡:ÒkŽn%¥d¶’5Wq ›•„Š!¯Ÿgð¨·î“zhóRn77ÔÓ± f–ýÛ…e“Zv#$S+Øù^ sbZ˜Q$nyWW€Äê®»’NO+|ÙFý†kï¡‘F&eŒ0ÜÑÍnþåP-a°2Ýk„ÿ‚«æ4ùXz‘E:M%F—ÛòI­é  Ú þ“Ç<VÉ?ÏŸ†£Á \½¾¼-ï<- @l›–‹œdÊ6´ÜPF€‡}žq6­Æã æ+‹£Jœ‰s[áÊ”SŒ duÊ¢U$-¡åËïª+(Õè‰ÂÊu‘$§f·÷(þ_ÞÄíPWä'òZ'‰ÞñÉ"÷"Íy_“C7)˜êÂ@f–R‚Ã}<¢DX “e—gC®­U«äÀÿ¨½?=ZA½Úÿn4‚K;™$Ë»ë­G/¾b°VCQ;õ7Ͷ:‚8m[–@OîýV&“ïÞ¨Ñ<µ<òÕ·t¨<ße"]v/´*;Ĉ=µ*åFÚû£×ºKx2xÑåqív%òQñUÇXk8>úldÚÔ:G¯s h1^™Þ&<Ä[˜ ±Ò¢b]c(­$s:‹kª>l® ¯EºÂÄÏ1ÑSñ•ÙæÇÌ¢¬Qõuo©äˆ_=FUÐò67 ÜÚ.ß¹æþ¶Ngßùútºu½=þùôH_Œ.o<ŸuTð9^¢zÕ®^µíÇîhãÙS½¼¥M‡Œ2ü»ó?
+endstream
endobj
-822 0 obj
+824 0 obj
1030
endobj
-823 0 obj<</Type/Page/Parent 633 0 R/Contents 824 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 269 0 R>>endobj
-824 0 obj<</Length 825 0 R/Filter/FlateDecode>>stream
+825 0 obj<</Type/Page/Parent 635 0 R/Contents 826 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 271 0 R>>endobj
+826 0 obj<</Length 827 0 R/Filter/FlateDecode>>stream
x¥WM“ÚF½ó+ºv+A[µć‡=à¬×v•í8^n!‡A@ö !3’1ÿÞoZÀZqœ¬]Å2ôL÷ëî×Ý3wà@ÑF!Ż΋Eçå¢3ð§S:}˜ Ø6šúSO#|M"?$#iíŽ@
=Íö÷fŒi±†úpŠ/ Ë´ˆ½`àOü¡O¿éln
“fz»•¸Y|êôÆåÁÞ0ÂAo±…­”>¸{aÄNæÒX°/¾ˆT‰•’”fdw+?†VÒ™:Ò!Í·TêV:½^ÏýÚS‰Ø[±»4èÑAX¨‰U‘È„» ê#èÄz·OUƒ×wbWí~àbðñUg"FaúcÚBU E³åŽÂ™?:“]Ä’•!–ÈLDPuDçY«ay·?®<îEÈžxËaq8€¸Ä7pnÕøxqÂWɦc¤9ld­øN)sHcŽÕ)Ý%Ri¾Hó °“™£`¶\4`k˜9£“ìl¹£ÙôBöïŽLf`ákÙ ‘ì@³${Ž#QˆŒÔŽðâäH%›ŽíI#û °‘Kówpm±^§_Ÿ6!ÿ5X^œÀV²hæ4id?6t¤úì:U¨êç€ Nõ6áÅ l%‹&.²ì'ÀN‚¶ÊÛk“ÿ?¨J9¤ÉpÌt¢ÀEW,
@@ -1827,11 +1839,11 @@ x¥WM“ÚF½ó+ºv+A[µć‡=à¬×v•í8^n!‡A@ö !3’1ÿÞoZÀZqœ¬]Å2ôL÷ëî×Ý3wà@ÑF!Ż΋
„ÌÑ!/ÑԽë[âÒ›,o.÷ÔÍ£ÈÐW7Ðœ%d5ZŸR”éœV=~/E;[i¤OôZ$Jù–¡ƒî•d¥§Y$äÓõmC s/†•·÷ó”¤Fƹ6GŠu¡{˜0$¬SÕÐÌõÿ€zC—-´®ëkêÖô•Ž…êÃìJôUºê׶jYnûŸ¥WBýõägrÿ¬Œ1qò#Ý9\%Ý
à(÷_¶‘™4Bá"Í ¤dRÙžJ® 0±]oПÛ
endobj
-825 0 obj
+827 0 obj
1429
endobj
-826 0 obj<</Type/Page/Parent 633 0 R/Contents 827 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 272 0 R>>endobj
-827 0 obj<</Length 828 0 R/Filter/FlateDecode>>stream
+828 0 obj<</Type/Page/Parent 635 0 R/Contents 829 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 274 0 R>>endobj
+829 0 obj<</Length 830 0 R/Filter/FlateDecode>>stream
x­W[sÛ6~÷¯8ã>¬²#Ñ’,Krfü ¦u›[ñVšéìŒ_ ”% 
KHï>ËØÅ™°vHŸ+ë(Sÿ•TYi.ûDô«>É£4CRîöÝöóÕ˜F“[½MUINÓYWüa68Ì´í¢
”¨4•FŽœ‘’têzúiõB…È¥-E,ßûßìAWYÂQôκÖÕÃ/FW¥&ñC™ U|Ö’¿k³¿n ½_C¢Hˆy‘ºÌü²o?âSŽè_¨AïÐX©ÚW¨%’4´ÞlüÆ/«g_i“¨bŸéuPÙJdÙU*|¥o¤‹o²D”oAÍ>Â)]Pª2ùú.ªÏšÎÑvócAî Ia%M£it;ôÛù¤ê~æ\F{¶Næ¤,í°4!ìZj«¾ÔéG´=à^.¹ î \غ—].|¿îÄïá«Ü…GDÚP¡O>[šÖÛ‘GL®Ž(`ÎÇø:Øgz'²Þ©R¦c‘Õ±Ö•ðÓÝò6ZÖ„˜‚ nïi‚:1úïî
@@ -1842,11 +1854,11 @@ Q²ùï¤;It=Î Oï`–¡ÐkÛ/Å1aOíWÔV瓯ü¾(º€Ž<´
në_­><qGBƒ1çúÁu`3Q&ž°áFK¨÷ÍÂ{¶ø „ü.LE?ü@ÁS8Š@üà,IqÍ3\lH0< ¡8;ç™C’Ùe€ÄÐÍ~s‘Ø$íÃÅD‡jR¯Ÿ!þ·;SR<\ÇÅC˜ÏVìlCÌ–å·gË&‘v‚ímöOîNG½ñ0Žæ3óLîæ>‹cêYFµ——2VÆÑÚ¿%†ew.ñHûúôf]wðc†½1Èxiñå°¶{¡ÍÝaæRå~Ç£WëçÕú‚ÂÉ|´;ƒòlØÍ…@^ì3Z
†Ár ”×Þ™’hÚV¿—äP4V9L88ïWg‰æ5¦3é4Hõ“NãKoáq©áà½Ï¡ïÓÔ$Q¿}GüÔ‰¸—Ëÿ!þò”< ë6Ò¿Þ¼‰ŸEã®Ü£°Nå|Q‹ N0ˆÉýb쌚ØTi@ßl/TowŒå›íøÄã9ÞNypßÛ¿e­4“ÛetOóù}P‘Íêùǽͯ¼ô“Ž+~Cñøá G“ù"‚è,¦~òýŽ÷‰Ù‚G'¿z>ã-0ˆýûêÅôqendstream
endobj
-828 0 obj
+830 0 obj
1781
endobj
-829 0 obj<</Type/Page/Parent 633 0 R/Contents 830 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 275 0 R>>endobj
-830 0 obj<</Length 831 0 R/Filter/FlateDecode>>stream
+831 0 obj<</Type/Page/Parent 635 0 R/Contents 832 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 277 0 R>>endobj
+832 0 obj<</Length 833 0 R/Filter/FlateDecode>>stream
xÅX]oÛÆ}÷¯¸¨XŒH}Ú@dKŽ 4Mo¢"¹¸ìÊ\I“\•KFñ¿¿gvIJ¢4)nÓ‘»3sfæÌÙýã§þú4¨?¢(½¸]\Ì=o2¡ýG¾ÆzøLÆøõ½€rI+^€gØ¥ùÀÛ/ﱩO‹ï:šŒiÛz´ˆ:"ŠŠûD¬Í‹Å§‹—÷ƒêÍÎ ™"WÙšôŠŠ6"Q!sC¦Ìs]f±ŒiùLæRÀôOŸdaè¿¿\ÙæÒȬàõ0€· ZÕFzÔõÙáEÜ1e´!aè7
;¥‘yøâŠ>„ΟL!
¥3þåcØÉ4m…1x“ü²UyóPd1Ñ,ìÄʈe"ãð…G.”¨
@@ -1861,11 +1873,11 @@ Ee(1´žÂÖ-¨‡Z´÷q"ïwµ°ó•2hÞ˜.—2zz¾t¢šÚé:×ÚW¶‚ÝNÁ©ßmÕtVm‡q
Àòœ É ƒ{i—®–gΠŠoÜQÉ­@˜5@ø®{â<‡s®Ý½¦ °#½µgsõæííª<Ù#wòG>n Ü}ßì€WíuÎËûkòq5±â›¡`l9ûÛ¿ç]{4wÍD?ÏïiNäc&Ÿ­Ä]:@ëV@ÒpØ1§X‡q<vÆzU%¥Á¥L=B·Ú¨/5ëå'K£ mÉ–o®Ùo††îv%Înˆ l]JSë‡%†l©ì“¶å†*«“€‹/ö2éÎ]
endobj
-831 0 obj
+833 0 obj
1836
endobj
-832 0 obj<</Type/Page/Parent 633 0 R/Contents 833 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 278 0 R>>endobj
-833 0 obj<</Length 834 0 R/Filter/FlateDecode>>stream
+834 0 obj<</Type/Page/Parent 635 0 R/Contents 835 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 280 0 R>>endobj
+835 0 obj<</Length 836 0 R/Filter/FlateDecode>>stream
xUYÛ6~÷¯˜Gˆe’’uX >·²É&VÑEh‰–å•D•¢°q‹þ÷%_a¶Ûµ ˜áßÌ|óç€Á‹BÀÀõ!)óx°ŠÄ C¸ÞT†\F^à;sC'%`‡Ê&Qäø'Q:^/Ac(D—Z¯ DïЫ^â´ˆ“aýœ~äÞ=Jð
"ʼwña@`D1Ô2“Uœ—b
ÄÉíA$zQð¦™BÃË-Ÿ%‰l+méµy:…¬f–ä)Ožän×›gÔ ¼Ðõ½ÀÒâI¢×ÏÐËï¿üçß–š‰ôm) ñ­ÓÆ‚W‹=¯²sªãµ”ìFFÌÇj ñ« ‹B>çUy¼‚Ëk•VG)h#ÚJ½ڷРv
@@ -1873,11 +1885,11 @@ xUYÛ6~÷¯˜Gˆe’’uX >·²É&VÑEh‰–å•D•¢°q‹þ÷%_a¶Ûµ ˜áßÌ|óç€Á‹BÀÀõ!)óx°Š
¯Ìòj³E1…ñ6¯Æ[Þì-oêï,OÏaТxÛ¸½@ ̵ºÌ‘-ØËR,s…Ä Õ“1ßcÙh‘Éñ©}­Ì^˜½BéCÛèóhþ'MTúZË0—!¡žOüÅrÆ"?fž‡­J݉»^t Ó/Ò,e.eÈ­É"•Ž×Pœ½26 ýÞr'Ò#þa!Ëç¾1 õöNôK ½0×Åfæ%¸$ÂgÿUÀÆÐÿ•dÐÍ„Zn Á%Ï àEÉÉF™q•šÑ{ä Ÿ?ÿ-¡CöÂÿ]¸†¡Ôñ§nbœ3A\´º}a´€ØXKeÒviÁ3o
:6F‡~ÇûXª/ƒµNXendstream
endobj
-834 0 obj
+836 0 obj
860
endobj
-835 0 obj<</Type/Page/Parent 633 0 R/Contents 836 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-836 0 obj<</Length 837 0 R/Filter/FlateDecode>>stream
+837 0 obj<</Type/Page/Parent 635 0 R/Contents 838 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+838 0 obj<</Length 839 0 R/Filter/FlateDecode>>stream
x¥WMoÛF½ûW zrP[¶dGrzK‚0Ð8n­ =ä²"—âÖä.Ã%Ũ¿¾ïí’M‚"Ž“»óñæÍ›áד¹\âß\V ¹ZJRž¼[Ÿ\ܾ‘Å¥¬3¼Y®ndÊåìòO’Ó÷¹ª]Ë|>“OÖdF§ò‡Û:ëe£›Nk+ŸM]çå~ýjýÏÉ¥œ/®aâTÙT>Ýßý-­7vËSäú›ã ý_Íg ‡¸x»ñM­’&»†ÛþØbÅCw¶ÑÛZ5ÆYqY4O?LR;ï²fŒ4yíÚm.¢¤í#/¹äŠÁ#òi˜T×ÈIÉ/¹+öë¦ø¥Od~c3¸£‚Ûj«]ë7˪m˜—¶;S;[jÛxÉ\ K…ÃóÆ”z&ŸµTµöx)1¥eŸÒ©tc@†LOÏpŸÆåäØäZU¹Q“˜|k-<Q!®Z•^–ï
†,î>Og7….Xô.¨ŽæµP)SVx ÇaŸ8=âü×Ã{ITQø3y(ÚíVÁ¬¼m­mLïpi[hœ`‰˜Ç½*ò£®w&AVi’œqÂŽë†ÒM\Þ¯%u¥B iíÃñªÒ
@ê«4è
@@ -1886,11 +1898,11 @@ x¥WMoÛF½ûW zrP[¶dGrzK‚0Ð8n­ =ä²"—âÖä.Ã%Ũ¿¾ïí’M‚"Ž“»óñæÍ›áד¹\âß\V ¹ZJRž¼
H¡<fâå¨Òª´Ä@âžC#`‘á|XÛŽ°Ì@‚ƒìh„ÆD{”ÔÃÜëŸ Vˆ ÂS¯0ˆNß*ªÊhLjˆ‘É#´€Ãù@ññØ›¿YΖ?{óå</¥{WXa8ÂÀ#®•òÐÏáÈþà‡ù7‹õ»1ñPE™æ@PÛ°Éó º.”)Örã¾Qm¢œsY[¬J]n€6PPØŠûýe&-¶
r}èPÈMü*Š[ê•Fù‰±ÍDÞéD! ss¶ÂxîE^€ŸŸæÜN"_NwF…ÈîÚ1ñòˆß
endobj
-837 0 obj
+839 0 obj
1670
endobj
-838 0 obj<</Type/Page/Parent 633 0 R/Contents 839 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-839 0 obj<</Length 840 0 R/Filter/FlateDecode>>stream
+840 0 obj<</Type/Page/Parent 635 0 R/Contents 841 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+841 0 obj<</Length 842 0 R/Filter/FlateDecode>>stream
x…WMsÓH½çWtíÉT%Æ_$áhÈn-‡„,1‡\ZÒX"͘ÉZí¯ß×3’?IJ@ÖLw¿~ïuûûÅœfø5§›-¯)­.Þm.^ÿ±¢ùœ6[|r}{C›ŒfÓÙlF›tòÙ+çɪ EŸ>|¥ŠÓBE)‡‡†¯èa#9b“Qîl³#2\)OìådG­mÊ,¼ú›áZïÕoñ¶ðÖôÕæÛÅŒ®æËéÑ'9!÷§…m mu‰›È[\Åu¼"|¦2J:‰žÙŠuÈEÒu¤öÊPis<«åœ¢óì%QטQ`Ž/}½ú¢Mf[òÊ{âQŸ†^\OW}ÂÀ¨ìÈ&{mO8®SÔ€Cθ/Á3Òž¥M.H„ÿÅ’FØEèj~Q!ó­uÕ(Ñ»÷ëÏχƒ4< èOiS ~•¢vÔ kâ²´­?äl2U+WIGc.NeÚ©4æn‰G‘{ SkjgË=G”–Mz(pÚ±«uÚ”ì°/ ƒ Ý:-¨v—Wûkx8µUN™Tecl×Y¦%dÞ]ß9»×™ ÝiÐ_ƒ˜pðp¯Ó¡œH?z<–MžsR*ZŸUyo³FH÷<y\ß?¿"ß!ë
Yê#£î5£ö#ñ&›Žpœ”‘€ïveŸ¥-…Mylj.uÝíå sç+²[äaÒÂY£ÿjï[ë2aUÝ*P>&êÉk`)Ý>yG4ãk‹‹9`AËzŸ'½ìhùó«Ð¤ß7ð z³œãçêö?øƒ(Ûh+oiyˆ­¬ÞÞie>Ÿ.§s À.W5}†ÔŒS/ºZˆMN´S‡—‘?$e]ÎÀ!ô\p£‚÷¨Ù©¿µ¯!ô#a‘ÚÀ7³uìA´ng EOLxΨ­öElyƒÅû€õ‹¯û »P þ8=вÕ@<hL:c§)zÛ•¶ ÷ãÞÞ꺰ˆ‹š¤Р΋|Åå¡2®QmšÚÆԨ䴰^ÿ¹S\ÕÀ†
ÌÛêH¨QXΠ~à…ûàËdQQ¡8ºÅ\%~(ÿ¼þ
@@ -1899,11 +1911,11 @@ MÛÁvPJʼn:e°à2w,œv À6f¢k¥1$€Þ¬ÿînP°Ì•`M;‡¼B3áà’¥{:ëí¶îéc /éQè0ò
bÉ¡AÖ3[ƒN ÙO+ytº’5ï.,£"ß·5l4w‚m–<ëøZv)Kb!f[bßî´*3Г)±¶Û-…þEËúàЂr°øQä]ãv³}¬”Á€˜ø@¡Ÿ¸´¶(ÓTA«Ãôx!pÑcXs£4ñ¦MÂ\Œ
B¾˜†Ø™6£|8‘¡*ë9ÖÇ£$ô,|eˆWNé#
endobj
-840 0 obj
+842 0 obj
1691
endobj
-841 0 obj<</Type/Page/Parent 633 0 R/Contents 842 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-842 0 obj<</Length 843 0 R/Filter/FlateDecode>>stream
+843 0 obj<</Type/Page/Parent 635 0 R/Contents 844 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+844 0 obj<</Length 845 0 R/Filter/FlateDecode>>stream
x…XMsÛ6½ûWìøäÎØ´%»²›ã439Øu+eÚ["A‰1H0
=/úâužý?Íy$ |pzö­*9°$¦òÜv7ÝtµÌ˜mú²öõU F$;KR3ÕÒ)·0Ó
Ncã+—ŸA­Â†gt©C~Ùx/T™a*Êx¢çË3ƒ'ÕeÞZ½2;Vß; vjañÔXûÚµ
@@ -1911,11 +1923,11 @@ Ncã+—ŸA­Â†gt©C~Ùx/T™a*Êx¢çË3ƒ'ÕeÞZ½2;Vß; vjañÔXûÚµ
qRm‹Îð܃¸£­ð€„Küöþ’]yÏ~UŸ¡C¼Bqy¹ø‰&M –+Ûëm¦-wl•„u7Š¼Ø¢™`ec¶1~ ˆÍÀÂO¹`¡x°1…|šcDv“£²krÞ¢èsÕŠá áÓ`—I63úµa#Ê~²€ÁÝ¢çïwÁ¹çè˜O!nð†ƒþï`p{í»É€eͳçùžyº±ñ¶¤•3ñ6øûÁ¦×˜c¾Œ…V;P!xn´.8óQÄÀu!ò!ÀHÛ…1RFå÷óG$Â8ˆ(éÁ{ÆE
‘ùýÈ:Òx‘Ì&ðÀOzwÅ1 #Õ±_* øQùàZ–x”ù r|¿Ó§q­¢ÿћžacG2µUuVñ:o¤Á²îÅ#利yŸ"£€Td7 t‡,1X¿µÂÛ ë.ðàŽaË©æÏÓ¸<Æèï’ÊšÌn³ ~±¸ç—ÀùÃÓÇ´Ó~ãò~²9Þk’øã[ñðÅí?kïý¬qs{“ÝáלœÝóu,ŠßNþÕ骛endstream
endobj
-843 0 obj
+845 0 obj
1820
endobj
-844 0 obj<</Type/Page/Parent 633 0 R/Contents 845 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 281 0 R>>endobj
-845 0 obj<</Length 846 0 R/Filter/FlateDecode>>stream
+846 0 obj<</Type/Page/Parent 635 0 R/Contents 847 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 283 0 R>>endobj
+847 0 obj<</Length 848 0 R/Filter/FlateDecode>>stream
xWÛrÛ6}÷W웕›–(Ù’ßêÄMⶹ4Q&}ÈL"! 6 (
M•£\WÚ—ÆjÚ­UE¥ËëBþ¦p*—W5‘ªñ­L¦*ã,ek=²9+w_ÌïO†t>')8ŸkŸÐœ½ 'K•i*Õ¬«<7v“dõ®o8h¿58ºtž¾»0p±ÕÈD«°?#Uˆ¡Z­s$„Hºç;wÈ~åÏß_¼|Ö`£Ê¿wÑt\ü²ErÐ`@l s£…ž… À{tV{Sí/úvûñæÝSÄgŧ;@y]è­²5‰¯Q°\UÑ52v»gøo¢6ú¬QÌÆaD¡b™ÆÒùgéJ™"$̯óІ®Òq2¡ÉlŠÿ§øƒ(–‘e×4šD–]ή“«'<’ ~è Â:¼ñl»»¥ÄÉòäž2W_Á'p æ›(öJ.2ê^Kîµ…˜¹Ûz?—’˜Š)À†„\=8Y Ü)oQøœiº4¸ûmðéîöÛ‹HÃîpD¡0«uUì)7Ë¥ö¸Ç|úòþî/PÚdkZ+”ƒ¼²+MnÉÞÚ7Äâ2qðÂÆé^²  iC Jï÷Ýs×° 8<\Ž„„î*¦_SßÓ@÷nÁѽh…Š•ô¨DjòC\앤{p,¨„ˆ1îyn¬F~Û¥YÕ9
ÉjÔ¨ebåà ì»çµEyg Xk^–°ÅœÅï½¼º™‹¢ è1chÜ%v,·ÐšMÄ’º¨B,0bO,°ÌP:§ ð5¡ÃÁv(6Œr¶'!6j¡‚¦µ.DÑUù‚Úÿ¥…´ àNÓ‘”ì²I´í$æ*<*foíÔ¾+=“ñ‚ósé__Ëd9Ž8‘žË„>IúôJekdÍuèÆFlnA&úöÀ¡¤ ¬´ÕJ‚à
@@ -1926,11 +1938,11 @@ y?u{"Óø.ÍuȼY@7×ØëæJW‡–ã°ýÊÆΰùÚZÙ•q®ioèXMøº³”cgä!Ú£+$eïjO[?ÒÂ=âT´‡ÐÛ>?8
EœAù±$BºÀQ ¢`å…8U¬˜X5– ¾ Õ^jó;îò±.4´d‡— ÖØüŠN#Hçk¥ÉNeaØ0—·X« ífI̤ø8
)ˆÕ éÁ•EÍõìËß(k/ PX:ÎMYÀ›88'/PZbåbcIˆäíz ¹q ºx=k^t£+.îÕô2™ñNÑøèÝ= Û+pŸOS¼”óÁÿ}ÁL¦˜—+ÓaÓ žü‘×ûŸendstream
endobj
-846 0 obj
+848 0 obj
1782
endobj
-847 0 obj<</Type/Page/Parent 633 0 R/Contents 848 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 284 0 R>>endobj
-848 0 obj<</Length 849 0 R/Filter/FlateDecode>>stream
+849 0 obj<</Type/Page/Parent 635 0 R/Contents 850 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 286 0 R>>endobj
+850 0 obj<</Length 851 0 R/Filter/FlateDecode>>stream
x¥XMsÛ6¼ûW¼žªÌH´HË’==tœ4i3Çn¢Ž/¾€$$"æ‡JVõï» ”Ìƹt2±%xxûvü÷Y(sü eÉÅR’âìíúìüÃRÂPÖ>Z^­dÊ<˜Ïç²N&ÙAlVµy*¥©¤ÉŒýõÍúv%Ý®Ù*¸‚Ñu:yŒ–+ñ/ÝK¾›EË`Á÷kl•çÕÞ–¯7·ooD¥…)mjÕT5Ϩu~ªtKDµXY6&QÁ³B'™ÂêÂö+>¯ÏL}â¹s™…Aijî{'ÚÃ9#Rm$­
eh®ˆum‘ÞŒ´¤¬$¯Ê­®¥Ô:¥W™zÖbõNÁOÍÃf'§©$©Ú²œò‘ÁÒ³®ƒ.%}–±­OÈCVõÙ5âV©)·.Çp0i þÿ’ýÇÝÃúNõT[³- sb¶ÑÅËÄ37r¨ZQµ1Å.×t€ùp~%“»èO‚÷aŠ*SÙ›1Y“25ʨ•5ùáñ –Þ2w¢ÿAµiv”óM]t ¯*ÜƇfvêS5ÉØ°‘¬3ÕˆU&¶ª`9?¯¯ïonìtÝLÅV.ÞB¼W# źi€
Zy._~? £Ep-—sèY!áe„ßþ[._ÙÝs| Ø{:Uº¨JÄsŸƒFHóT¢KãÃQ§¦`øz\œ>ý^H^¾8öô;Þ^,ƒðd/¢÷Ç8ê­ôqŒ]lP.ŸÎ½Ží­çßÁ‚3 |*€¡cȃ›Ä’ä él¦®©7ˆ
@@ -1939,11 +1951,11 @@ ní8øDñvuõlR@8>ø°ûx}×MÌ<Nvy»Ýº6M hÃ6ײX ØÌV7 FØ…2ñô² µg\rŠÀ}zQ‹<ÓƒV:³
¼Ìé„«Ä.òåþ–¬Dæy—„ŽlpAX¼Æ5nX›Ër,q8ÎÕ„¼ë®~äëSãªò 'óíèyy ¦ü^­.GG¨6þB€Ë»Ùf 0 ¦œa!ø¦v2SkÒ˜ÞYLÌ_„È(Ý%ÔÄZ…)?Õ;]º[p»Uí3 ì¸+7¼«õ³©ZK"t¨#¾º; èäÌaéüÃUÇ^áÒ$Ëë Þ<0ïëê.˜üUÛ…GÏf~ñl͹úµKÙbµèÿò±
¹Eûóì__ÝAendstream
endobj
-849 0 obj
+851 0 obj
1989
endobj
-850 0 obj<</Type/Page/Parent 633 0 R/Contents 851 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 297 0 R>>endobj
-851 0 obj<</Length 852 0 R/Filter/FlateDecode>>stream
+852 0 obj<</Type/Page/Parent 635 0 R/Contents 853 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 299 0 R>>endobj
+853 0 obj<</Length 854 0 R/Filter/FlateDecode>>stream
x¥WÛnÛF}÷W ‡(ˆEŠÔÕA[ ië"IÚZouQ¬È•Ä„äª\ÒŽ~|ÏÌrIÊ!`HíîÌ™9sÛÏ"šà_D˘¦ JŠ³7ë³_×g“`µ¢þQíð1¡8Æc¶ZâÅÓ`A•¦-öNh:›ãÓ-MVÓþÐb­rZp ª»T„—º õpP¿NeyBëdTS?{±þx^FnÄ΀|ŽTS›Ä”[·ÜŠËú8‚ ¼çÔùB}Ò”äZ•ß*¡*ˆd» QÉ^«˜ tR¸h<¾Íê=å&+Óo•È¦}ÏYÊJ[«<w2fELÏ Ïh/‚˜}»Þg–n³<?§Í¥z«š¼>÷Géêõ»7¯ñEˆ2
[…¹ITZUlÔ±ŽQ@WZS½×T(vRR“4….kUg¦¤lKw¦ásGS‡æV•5Õæžzk
}»×p¬Î­èm-ˆIåÖЦÉòTTµîNIÖIS«M®I•)åÙ¦RU¦m VH‚Lh¾š"º\ÐsûÈ//ZOaÏ|zÈQÌ@ èg‰æÚYµgF¥µà>Ù}P{y#AÃN|‰ŒÚ±ÿàð3süè~•Z§ÖªšRŒvç^½÷Á±¼¥Jp:ŽT¦ÙíÉÉ,oƒ,2‡Ì Ƭ¢CeºbI†˜sæÏž“5N ê‰DÖ
@@ -1951,11 +1963,11 @@ x¥WÛnÛF}÷W ‡(ˆEŠÔÕA[ ië"IÚZouQ¬È•Ä„äª\ÒŽ~|ÏÌrIÊ!`HíîÌ™9sÛÏ"šà_D˘¦ JŠ³7
Š/f: |åtÅchŸ5óXvΤÃ÷C!­÷Ú")`oªmReÉ*ŒüRƒDž;ºÌè‡MÁ€‰säɽ­®_0Ô~¼ñ[øw‡±á‘²Õ9×y¢O2©V·Êòïc± ›Q
“fÛ¶Qfe’7©›túnãkoKà_»ÜlTþ7Ypëìè~óÅ”{åì‡ ~zláÄrüÔð#Ê tr¤s7(SH€zOÏ_>?we÷—ï^¿}ÿÒ/³@„}¼âKÁ$2£H¨•¯–ÌÞ¯Þ÷1ÈŸ¸šÓSêë^ ȸ١»$ôœüH/űñòž•Ï85YŠ…Vøã˜åe‹8od „5AÖ„ûÍŒäýöU„ÍÃ+Š‡ÕâäGA š±@9÷ð¥ãáŸ_€ƒ¿¼ŸÂ¿à»ÓCÇCów¡w“„.1¦# xJGUé\Ãï'Œ#ðSö:èBÇÆU”?N¡Ÿ®¤¯?ÄÏš%tExuÃȹÓGš1'3íÑ”é—Sšã弋枔“ªÃK¿L¼ª ®»|›Å]Ê]s~¯ÌG$:ý2¼îH¼D‹%¶—±Ü|ÛŽAkmyúA=ÄÓÒ‡Fzúl9CÙ”K™&çœýТe„endstream
endobj
-852 0 obj
+854 0 obj
1521
endobj
-853 0 obj<</Type/Page/Parent 633 0 R/Contents 854 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 302 0 R>>endobj
-854 0 obj<</Length 855 0 R/Filter/FlateDecode>>stream
+855 0 obj<</Type/Page/Parent 635 0 R/Contents 856 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 304 0 R>>endobj
+856 0 obj<</Length 857 0 R/Filter/FlateDecode>>stream
x­VkoÛ6ýž_q×¢ˆ‹Ú²å‡ì†´IŠ hÓ­.ŠýBK´­TU’Šg`?~ç’”í¸I€bk
Á÷ÞsÎ=ä÷“˜ø‹i:¤QBiyòf~r9?D³íz…— ‡xŒgS<ãZÒSñ6Hv# ÿÜ$É8‡5£Q”øÁ2DÞ=¡5 3š/‘M‚èóÌ hžvˆÿ=§U~'i“W‹¼Ê¨1RØPdÖ²(èkGUÅ–*)3™Q¾$»–[Z ¬²²¨¤%‘¦Ò˜¯/_Îo}™m1gò结!וL“hH%Å1'ïß
úÄØì3v+öp†SÌ?LØʲ.„•´V¥ÌrÍñöKÝ/,íЯÔç}UÙþ‹‹þ‹Ï!5ŸH2AHdÀÐ%îíÉD
@@ -1964,48 +1976,48 @@ C· ~0™!fi›£òe®ˆæʧ „Žã?gƒÈáÎ] ?tþ®õÑ',ì×Æÿ$û—G¹>-I±EÕB‹J噣²ÈÙàA¦·8
¶E?Ù¤µ¡žô­´¬[H³GÓœ¯ò¨ÉЊY“J&§?>cÌë†c±U&'ë³ ´´ý<ÀÙ# ^»ÿ÷Ò8PíµA}ðhïÕî4f©wÉê-ƒ´Â±kpÆA‘˜Äå†X°jµpŽã›3WØöÿÁ,\m©¨×<Y0$™Â€"ý_.`Û¬~»h³ú,÷u—,¤}…Òåß¾ìÒµ«— ÛZØöiÝq§àpçé Ù€æYçíåÍ«<— ÷±v|Ñè 7žv냑w Ààû­í '¡£¾é…]=´`n®¹qkúŒÖ¼d/vÆÏwžÎÍâ.Wa׺öw-¶ÖŒÊmë짨èÔ5¾ùv§pëFr‡=|\ž¾:u t º¿à©¨Á‰G™„È`À Î®ùª”·Ò
.y(½¥V%¹UÐÚ£$ž±¿•Ž† ·Ñ¬óຠ’[ùgáÄqéRræzGý¨Õ­L-]¨´)áu®#xU/N¦Ýìp•¢9åŠÐæÕÊÐMãØOǃ›8ñjœcœü +>fïendstream
endobj
-855 0 obj
+857 0 obj
1279
endobj
-856 0 obj<</Type/Page/Parent 633 0 R/Contents 857 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-857 0 obj<</Length 858 0 R/Filter/FlateDecode>>stream
+858 0 obj<</Type/Page/Parent 635 0 R/Contents 859 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F1 4 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+859 0 obj<</Length 860 0 R/Filter/FlateDecode>>stream
x½VmoÛ6þî_qHÆÅbÉ’;)P ‰“Å–—-Ú†aÙY¢#6©T<cíß)ÙŽkeÃÞ@‰tGÞÝsÏsäc'€þ0 a8†¤èœFó¨3ðŽŽ`ýP÷ø2€0ÄÇèhBÏÀƒb0GW\?z¡µüe:<>FO·èøÈ9 FÁuzõÀþÅ
®¢Žè_Œ Ë~
endobj
-858 0 obj
+860 0 obj
1172
endobj
-859 0 obj<</Type/Page/Parent 633 0 R/Contents 860 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-860 0 obj<</Length 861 0 R/Filter/FlateDecode>>stream
+861 0 obj<</Type/Page/Parent 635 0 R/Contents 862 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+862 0 obj<</Length 863 0 R/Filter/FlateDecode>>stream
x­WkoÛ6ýž_q‘…Ø’åÄŠtmÐ`ëc­±aX†–èXµ$:¤Ïößw.IɲgºlŠ÷uôýIDCüG4Ñù„âüäõüäíüdÌf´è;|Òh\ÐÅlŠÑ-i‰­CšÎðxìE45&£Q0Û›ŒG{›)¶Þ‘Só@ìðzH/h¾Džä5Oìë!Íãù¿uše­b2ù"9›=Ò BØÜìùüvþëÕÏ—Ï^y/ã•:ò꧛o.O?¼}zdÛÒ  g§_VUY¦Å%j‹ïlIFê‡4–æ%³oò/þ+ÿÑwð[Z,Ò"9–ÄÿVÄÖÅyºçÇ ùƒž¹fÑ@ÞƒŸQ/Œ¾Y9÷+Òóç¤s,)|:ÌT¼Mµ0;‚Oõíô Z–•F]2ÿð÷ðú‚¢ˆ¹9ˆh€1ãn–´SmJ¡K*W’Üæ±ßÜ«iº·ïõ»{j*ì!Q$Ým¸[›)2W…!Á)¤†6*-ʾMͬT•%´$™¤RQ¬ŠBÆØ©8ߺÖsWùBXKMÁî\¤å2_`ékeJ^O]á[‰a„ˆŒ*°?`VW Ó1æÒ©E£"˜ûðú…G{.ÆcEÁ88¦ý¨ŠezWÁ¿'³äÓÕûÃn€3V­öÍX‰I¹H$¥Ž¥ÐŒu¡¶(0ÕHZ§®hP[¥×<Ò¥º“
Yb`gúö¸X–›D°üîtm‡ÄʲV¹ê=¦ßÉo ¹Øað4ÓZÜl^8:t
² Óºï²üwŠ”’o•ÙÖѱ°Ôtûùhqo¹»=C~B§AÄH›N¶J¹¥:(™RW1®K²ßœ;±@‡¸,[ #Ѫ&CôÇj±™Õ^C‡s'=†û°ž–êÚo«úÒµ·JZ{èÎŽïÖ%˜rh×æjéß5?LšÑkÌw³ðzæœh2–“Q0áýrõþõ}Òê+_»Þ¨¸ÊÑa+«wMúÁt„:IÏ߀hŽ;%_Eæ+< }¬ì!{_PøÁƧc¶Æ]ë—“mqü¶endstream
endobj
-861 0 obj
+863 0 obj
1385
endobj
-862 0 obj<</Type/Page/Parent 633 0 R/Contents 863 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
-863 0 obj<</Length 864 0 R/Filter/FlateDecode>>stream
+864 0 obj<</Type/Page/Parent 635 0 R/Contents 865 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>>>endobj
+865 0 obj<</Length 866 0 R/Filter/FlateDecode>>stream
x­X]oÛ6}ϯ¸ÈIlg@Òv¬E·xØ´DIl$R%©¸ú÷;—”l×q´‹±)òÞ{Îý8Ì—“)Mð3¥ÅŒÎç”Ö'oV'¿­N&ÉrI»7[àÄΗü~±\à}:¹Jfd%åxxB—³e² Kç´˜ãÏ°‚ð Û7œ4¾½ é”V9 Ï— Zea}B«ttk,å¾!'í£J¥#ohcì5Ö4ÒVÝ)u¦¥ª*•3¤¥Ìø!©|)-Q)%)©G•µ¢¢LY™zcÎÊq8ž¢ÌÔBijaÄý²ú|2¡³é9‚Ye#QY)²椓ړѶ°?ÒžNHK¡ ¾-MÓz yY7•ðX3$¨ZÚ=º`_ÀñhÿÀrð&!Z•°L©Ð´–$…SU4<¼UºˆÎðÎñ-( Ž\½NR£óøõ€íˆŠÊ¬aaØŽââå°gç+Ç€6'ü¸ÌæÉã¯ú#¶fÇÒ§ãFÔI6cû)WÕ6ŠˆXçKU™ øÓk¨)xvà ˜ÕB4rªV•
5ÏZB†ÀκõQÁlÍÅ‚¬í‰’-<[Kp߈XV?þ”'g¦\¶Ö^€–âëQiéYWq³ØwC<
»x‡æßK¥§Ñ?_•ûN2$rß;òmÔ£ï#ÈqCVedr‚Z0]E™iו<ðš±n|Ô}Cr» l‚Â…žðhzv;hÖñíM¡{X¡ÎÓdþFâ‹„~‡Fñ‚“/ô]„¬šXÔŽþîEN Öé¶^#dx]ív²êQðÚÁ†‘ne͇ôOa
ž<  îCü€6•ÖCwÃ`c0]a/!ÖûÐ<{çAõæ,{±|JyŸýÁ­·
õÂ"ŒnéÝf7a¥aŸÃ®<*ïãƒî7ÊÃ9ú±j‹"
endobj
-864 0 obj
+866 0 obj
1577
endobj
-865 0 obj<</Type/Page/Parent 633 0 R/Contents 866 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
-866 0 obj<</Length 867 0 R/Filter/FlateDecode>>stream
+867 0 obj<</Type/Page/Parent 635 0 R/Contents 868 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>>>endobj
+868 0 obj<</Length 869 0 R/Filter/FlateDecode>>stream
xmRËnÛ0¼ë+æ˜
~J4+ÜÕcvßfŸ¾~FY¡=òI½æB¡È‹¢@+oÊ2or<X#‡èµ5·í ÷W(˹¹j¸ÿ¦í “6ÏÚ(ø¿>и@è]Ï_Bô{¼”;1äÎZp˜týû!vx›È
“u¿ó¤ïK›qh¨‹:¯Q­®Wü:ÂqÎx}ͬ¬›<åÏñþ—óa³½ß`ïì É€G+ãÈ!\¶’¦/gÔr†}x+ª¦Ê×|ƒ8˜¦¹*zÊÞ
endobj
-867 0 obj
+869 0 obj
399
endobj
-868 0 obj<</Type/Page/Parent 633 0 R/Contents 869 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 311 0 R>>endobj
-869 0 obj<</Length 870 0 R/Filter/FlateDecode>>stream
+870 0 obj<</Type/Page/Parent 635 0 R/Contents 871 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R/Fc 12 0 R>>>>/Annots 313 0 R>>endobj
+871 0 obj<</Length 872 0 R/Filter/FlateDecode>>stream
x¥W]oâF}ϯ¸â%‰6ÈJ«*‰’.ÚÍÇ.´ÛJ¼Œí¼±g¼3ã°¼ô·÷ܱ jSµM${¾îœ{î9—ïGêãw@㈆ç”GWó£›ùQ?˜LhÿaVxÀ´hD4šŒñÿhŒÈHZò
b›Ý¦‡·õi¾Äîçã ÍS?Ž7ÉÉõZ”NlÐÃ,¢ë<“Êч‡¯ó‡Óù·#^;Õk{C>ržž`ò  ÛËÏ–§ô©7Ä^Ík |ÐJ„¢)%Z-³U…ÐfaD_…)éZ+%GÚЋ·#–D³Ýà<à(O’:˜%¦ÎD‹ŸxÜ#Ò^qÀ÷üòóQtv èl‚Fã þÖO9Í•ðvDƒA}³ñð—Th„˜è¢Ì¥“$”Ý
Ê”_ÌÔoòÙ"WU‰< é². Zs äFŠtK±”
@@ -2018,21 +2030,21 @@ M®
–s•.¹¥X,
ä]Å¡UfÌDÎÞ³G>ÁRXw蛳ŸÓ´»çxñ =Éc D¥÷åF§Eï2·º QÇnWÀ*É«e~õѼ6ýL,Áð_àW«Õ6 9pã ë©1ªaÐ4‰pK”ÃÅtôm5ÐdèØ÷ølî³—‡y“ð
endobj
-870 0 obj
+872 0 obj
1597
endobj
-871 0 obj<</Type/Page/Parent 633 0 R/Contents 872 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 314 0 R>>endobj
-872 0 obj<</Length 873 0 R/Filter/FlateDecode>>stream
+873 0 obj<</Type/Page/Parent 635 0 R/Contents 874 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F2 5 0 R/F4 7 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 316 0 R>>endobj
+874 0 obj<</Length 875 0 R/Filter/FlateDecode>>stream
x­VaoÛ6ýî_qÈ'phKqì$H3$­³¦ÈÒ, ë0Ðm³£DU¤âùK{ßQrb;ë·!ˆ![äÝ»wïù­Ñ
E o”ÚºÕXÑ´½¬į̀ÜõÈÕ( ½-+ÅÔêbAÆâ[*dÞŠc/»}U©Gdˆ)«äbª?ÜÖG[ýS‰þM—
E·¡ÝÛ ɦqt|rŠæ OÆhUŒï‹úøxôZÔCA ì†Ê£ÈŒd•)ø}U+3ZWFs¨/ȼ‘®û™v¯uå|ÒJaðç–\i*A¡Þ?ÜÜ%ï>ÿ…²¤g‡p“by&A,ùΖkV›¯EĤºÆ„Xsg<ÄØ£—Y“Ë¿Cåµóä|+§JYzgƒ¿‚R
dÌôÆ\¶Ò ]H9àM¬^°[a=$€Ðzûú•À6ˆYõXXskçU<‡1
endobj
-873 0 obj
+875 0 obj
1117
endobj
-874 0 obj<</Type/Page/Parent 633 0 R/Contents 875 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 321 0 R>>endobj
-875 0 obj<</Length 876 0 R/Filter/FlateDecode>>stream
+876 0 obj<</Type/Page/Parent 635 0 R/Contents 877 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 323 0 R>>endobj
+877 0 obj<</Length 878 0 R/Filter/FlateDecode>>stream
xWQoÛ6~÷¯8ä¥)PË–íÄNž¶uK[ h·Æm0 /4EÙ¬%R#)kþ÷ûŽ’ÅéТhmYGÞÝwßwwýg”ÒRZÎh~M²ý¶Mînh6¥uŽ7×Ë­3š&Ó)~‘—¯w¢
ÊQ:OèíLJõGúUJå=Ý‹r#ÈÛÚIEÒfêåúÛhJãÙç/ZÐë/÷üßžâG¾}<O“¿ÇuiBïLp6«eÐÖ´¦ JÓÎt¶dÃÖö”©ƒ*l¥2Ò†„!|5¤ÌA;kJeBBô{gâ<Õ^±úzùÚY; ú¢œ‡'m¶tôA•__R°]܈(Fv!wJîµ¹ÀYQxK{cxôDÒ–¥8fT3ÌÎc /<„Ó¶öÑûÆ ƒë<I¼Q$"tHðœ¹ÆšcÙ¬=v
ÉúàZ„ƒ tÑBv
@@ -2040,19 +2052,19 @@ xWQoÛ6~÷¯8ä¥)PË–íÄNž¶uK[ h·Æm0 /4EÙ¬%R#)kþ÷ûŽ’ÅéТhmYGÞÝwßwwýg”ÒRZÎh~M²ý¶
Ϻè5ÆžQÛùl–Ì)½¹§xˆ\ã³}:q+½á‡ÜZ# Ί,W )øàèÅyE•Õ3€Øõn{µý +›¦Iäõ” d8‰PFOÏÄË$æÉVû30;9½xkF~«b„/ C³oG°ÍQ*‡†áÔ'bNo>|¦7¾çMm¤Û‰¾¾Ä6ðÁ¢„a×ö ÆÜõûQßð»1@['ª–@ûtËLªhP±rŠ+öh´”Ë–.ÄÛRÅÖ%ÈT"4¹…‹ÎÒäÕòå=[âQ3½ÃHŒ(¢V Á“-w¶¤nj?Źoi`BÜöPë- ŽkQp§}†+ÎëÇš[î×q´U¾t‡qÉ#‰Ô¿¢¬àU·;‡÷Ø?˜9€õ×°ä|i’¶:2Ç#ùã°r+é.Wdaà†¯›½fvc‘|Ü
[1øzƒVêXÇóâI •É@ÝÔ&#Êh‚•z܃ò›ÆŠS^¥úhºÞp^NÁæˆ}’·:Þ1NfœTÔzlV„Ž+Ü1‰]zŒ%Û9Öèö§EâSÝNˆ®äOíÑV™“»«nÏæ“}ÀìlœÑmÕ. ·xþå´.Ýr»w­sNÇ^8¹[u·Œ9ïù­1ýüÿbëȺX.p<&µšrŒè;þ3ìendstream
endobj
-876 0 obj
+878 0 obj
1481
endobj
-877 0 obj<</Type/Page/Parent 633 0 R/Contents 878 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F1 4 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 324 0 R>>endobj
-878 0 obj<</Length 879 0 R/Filter/FlateDecode>>stream
+879 0 obj<</Type/Page/Parent 635 0 R/Contents 880 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F1 4 0 R/F2 5 0 R/F4 7 0 R/F5 8 0 R/F6 9 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 326 0 R>>endobj
+880 0 obj<</Length 881 0 R/Filter/FlateDecode>>stream
xTMo›@½ûW<åD¤‚›øTç«í¡’›Xí%R´†“
‚´•05“K±4(ýr‹Ní¨8uâ]ã|y*—Ó›œŽ<Q@ËJêŠDÅKGm©v¢#,áÚŽ‹»¡ rSI–­í6| Ui—ȘD´gy$ïL¨‰¤“£wÒž˜T—¼æL¹îPÍVìLt5ÉÀ‘‹–ŸÊQˆº#NïËs# þÿFô%žfßof/ñKü/W™ÒŒ)#í¨m˜é¶@Ã%éS9ézóY¿e+Ö–ÔîŽ(Zî@!EC.×+÷ù™ˆNì½í§û9Üy69WÀŒâè:Cºunf‡&ÒŸðûÅ€v’QJ1I:¡û˜.ÉQ¸]sˆ6LA“ž„QÎaÙ|ksþû€B«ŠÖ"ó÷øeÅ&ïhbÆ©A”Žƒ¨ªñäÀǽ“C:HìÔÀç²jöhhpKC-©ß\~rËÉd9ä“%<ܰ쭔ƸV·}„ £ˆáCºÛP㉩&¹²Œ<ÛnÌ¥x¥}B³ÎL.Ó•³±ÙpÛ}·§PÑ©ÛiÔëðcðs¶©Ëendstream
endobj
-879 0 obj
+881 0 obj
734
endobj
-880 0 obj<</Type/Page/Parent 633 0 R/Contents 881 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 370 0 R>>endobj
-881 0 obj<</Length 882 0 R/Filter/FlateDecode>>stream
+882 0 obj<</Type/Page/Parent 635 0 R/Contents 883 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 372 0 R>>endobj
+883 0 obj<</Length 884 0 R/Filter/FlateDecode>>stream
xÍœ[s¹…ßý+æ-›ª„æp8¼ä%åK6ë*_6+m9¯45²ó¢”7ûïsh
u„ËátÎí`2ý¨s•ˆââÉ«§O¤»¬Kzù»Ñü¯UËéfb•]?ZÀ*û^Z?\¨U>þ~ª6ˆ1Cá…1ÃvDVTÄÉŠ˜¤lO¸8·©£¥h] ±b&èmOÿ)éI‚>l§þaô¾ü4¬Š
Œn<šÚJ$¬‡œo†T Vá¯Á’
@@ -2089,11 +2101,11 @@ E^ßÄ ²ÞjÄ–‡¬L¿ŽOøK<[À)!ZoÅxµúÍ—Dè°0ç„Þ÷Ù²Æñ° p@` (€ŠyF9ô"…žl–Y½ð„Ý°{WR)X(
»L§ß]È̼"ù||¤y~XßíñG: ošôÍç!_ô»ü
_ÇÿÛ£Ç)endstream
endobj
-882 0 obj
+884 0 obj
5352
endobj
-883 0 obj<</Type/Page/Parent 633 0 R/Contents 884 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 415 0 R>>endobj
-884 0 obj<</Length 885 0 R/Filter/FlateDecode>>stream
+885 0 obj<</Type/Page/Parent 635 0 R/Contents 886 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 417 0 R>>endobj
+886 0 obj<</Length 887 0 R/Filter/FlateDecode>>stream
xÍœoo[DZÆßûSE‘¾Ãsÿ¸(;¾u;n¬Þ\à¢(h‰–ØŠ¤JR±óíûÌììî3s”4v,å&@¢£Ýç§åîììììþëQÛŒñoÛÌ»¦Ÿ5çÛG_ž=úâÙ²éÆÍÙÛ¦.Gm3›Oš³‹f<ñÛóÏÎVo®×Íþmód¿;­w§ãïÏþñ諳GRAk5­üôí?êg£q3›,ñßm3ëGS{¸n^Ë
‚ÃeóųIÓ¶ò§ÑšÙŽþîdÔâßÆþá¶Íb9ê<;ÂËýi­­í&£>÷ÙÅg£ÿGÿt}íÉfÖu£ºmÒŽ–ö`Ýöų©u:·ëQ‹{éÉÕêæ´>än"ù¶™v‘eÅ2-ÝLts?šû¶XqÔÿõåóÿÍ- ѶiûÅhâV¯Ö‡íæxÜìwÄZ`›°'í%ë˜\!¢¾ÜœŽB2@°Á
²Ú]©¶M×Íb¯
@@ -2119,198 +2131,197 @@ c­7ÃÃÊ}+8f#
À¹S#àyùûU¿+µ3/OÅQ~¹>išï·=¼éÀˆ&î—þJQ®ÖƒxË/<pbÞzLŒÐßS& «õ ä>×QE2ú62!•ÆXš£ô•Éø‹#e†Q#Ľ(U4
d<ÐØ’¯÷—û]rüâ1ïaà&.Ác/ ³´oõç:T¸ªƒ,N?W‰L/Is°>•FÂO —5¤Õ^e’ × )?1`JiJèئð’%é0d¸÷‹¥¬_¬8BnË’Aèq3@^©#}"Fý·ûÕ–²Î¤“T–~å
endobj
-885 0 obj
+887 0 obj
5223
endobj
-886 0 obj<</Type/Page/Parent 633 0 R/Contents 887 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 461 0 R>>endobj
-887 0 obj<</Length 888 0 R/Filter/FlateDecode>>stream
-xÍœ_s[·Åßý)øVg¦•yyy/ɧŽ"Ç­g’ص”qòBS×[þQHªN¿}Ï àìBNÓ©e»™éè8?‚‹ÅXàò—'ÍhŒÿšÑl2jûÑjûäÛ«'Ï^,F“ñèêý¨égͨŸMGW×£ñÙxŒ]=½Z¾Û £ýûÑÅ~wv§ã7WÿxòÝÕ©jùëÍ_ä_Fýtÿߎ¦ÍÙB6£KùWÿp3zö¢5|2t>Œ>õâvyw#ý0ÂmGÝijc±C,Î’šÛÑlvÖÛ–Åb§þëþC’“b;š/Î:+ÅN~Ú'5 ¶£Åìlnձة—ILõ·£¦mÎfVËúõýaØü;!XFßûh¹\nßåf°j;šLÆg­m‡Vp ñ˜Ã~³®ScX
-PWõ…Vp çûír½_h;˜@\åéÙ§ý_7SWk{qc|ÎnÜug}P7~öbªN‹Ô£òÜø-FPq»"†á›±8Nà*Jáñú0†_î×ÇõiHvc5XÓ™oVªàao†åõzw£¦ëÅt¿·#œ‰' Ädâð vÃNZr@XœMœaUߌ%âô ˆ†­ß.Wÿ¼9ìïw×bŒúÉ5‡5›3¾Ô4'<qàJ6F/ÎZgÕÏí¬¶©oo—§äl$‚¯Á°ð[FÄò
-ñËýr³~¿Ž‰ÃR€Ú±Ì. Ò
-©ÄÒ€ÐÏ%îB¬PbÀÈ !!¢NÓW˜X¡Âä
-Q i@軪±BEÅÚý]ö(Jðj½I•\aìB€…Àt­8:›D+T˜²ˆG6âžÎ»¾¬‘»ð@.vOÖ;炪Ç„±>º`E Y”4ˆc˜ -@‹ezæ&\ç}/I ƒ™h±×¿L=N
-øM3­ô‘èõÇ!/cY$Î+‹GÓ„TÁ3ÈíH6o…lÆDõˆâÿ¤ÿŸK87­à v(“¬®\o$°§|ûü"8ì¤GËÅaŒ§Î‹§mØÌÄ©/<c-`§tlµTB\¹1A™žA~L˜nÜÈH`‚–{BqdÖAR8†*xDöeÖ€0 áœÛ*xÂa¸Û¬WKʤ~*îdHZÁ“x~'‚ &s8“ahÏ8nßÝ-ÇyIÉZZñ>CJ<éýz3¿Ä‡?N:Gݲ[èªNöi]3 ‹º-Œꇜ‰ì;¯?”‰L¤.ôdÀ*IÙÍD
-k¤@T ñ„åZlå—§ý9œ„ \ ­š åŽ!é¼?”U"Éd>•…¶±HâZÊOÇáðì‡åêv½Ëkò¿•*XÔùj…LLÖ¬ÛŽZ,]R©aQ-´Œõîýþ°5[%V‚Ó,$b³…QáN²- o§2g¹mCÊÂ%
-q¹º¶yåK22ÄPÑrߎ%e¬H$}!)4ƒ
-«Àè‰&ÜŽTÁ3wž¥9†e2MÊc!Êõ„ëõ¯:w‡˜$ìÿ»±pŽ‹–#äè„ᷫܶìyI]þÂz-·lí߯oîy…%Þš¤
-ÉûMÃu VžÕ:ÂløŠ
-v›È
-Ì0úž=ãÕÝ°3aœt  ÿ‰ñÎ-I`B†9xCˆ ÁÁg•ê14Îœø.aå Èœ“…nnÅ Íd·Ð ŠhP»Ó§ËaΊñИ ©Œ‰
-”ؾ=aT|v4ö”‡¾5.ÚH Řð@6E8¬Ö+}±h˜PÐŒ;±/b”©4ËŒ”âè’Ò4 Ãêß6…çGÒH—ˆ/[‚Vð_ç/8¿+ !! –§î %²Çl—»åÍ°Å 0Pd3ûÿÎU·Õÿ`;²Å2"¯râCéÈID±Ê™ÙŽL€f,ëECY3.‡f‹S¹`CJtC81œ„öá®$sYºY†VðŒ£ìëi>î?û6ªŸòÀjçâ>:°âõǼ
-Us×*Ç! Rœ’Q×:
-–Àv#¸ðõ8ãÒuüL®š¤ŽÔñXªT“~¹ŸšâùdË-÷Œï~]nïp7Qý…Ù“*xÎ÷Ï_¾Èè
-žñÓ/ÿž›A2IÈ‘…h¹?ÒAë@Á—A,妤
-ž»¾ƒiÅùaÄÿ9ðôæ*¯¤ôËŠ$<äqCùíVîÀÓtx|ñù8)+Nô+ƒb±œ¿;žËUX‡[¿Ÿamü@ ùØ?9#a3Rfïð FBv»û[Å0í0ÃÊL1»Ý2!Z§b|ÝÙmãBrC-çþãC±Î7ܤÔÐuÜðí
-ÁW5ŠFŒ*·\ A™¾:]O/B`B¦Ê`¹âÈÍ[™t0Æ>Ù½ÒÅßÿ»ë\R ÓWpÚð@ÒÙäP蚶Š†çŽrçmœƒzÈ~X¯ûãþ}>˜g™Xs"ÂTÁ¶äÍ°ÝÓµ’‚´ÌÔA´‚… ô¬†k¼Í”»–”²R«£,çb¹Ù|ÆQç:K˜œ —õÝ<™S막nc,#Š&×Ð…Š+ƒPU!~\n³ÅHÃcáˆ8ÅmXà¹ÈYæz•,gM˜Ä¢jÎ3V·:¢¾ÐÄqÖ§+@áÅ.9ËÉôø@ÃiâïÏ…EGÕ¡7!Žë…§âÐãõæþæ&¼D©»9ž8œ™´K1©‚oÍù=®qíNr#Œß @\§<î\.Øä‰}úø»ë
-lÐC>5<PWàƧÄ¡+h²)*lCåšý„20*„\_J¡„$èÀ' å¾´Ób¸ÒŽµ·!UðŒ~Oí`(¸ŠÞ3”©´Ì3^>Ï
-ñf8ÞoòG"ô
-΄Ԋñýz»>Å»laŠ~´·Ž¬3þ¾§Y:œëjI”é&<u&•mÜ)|’ËkµpOÖÇéÆãW$›ãÅXÜ9ÿ±Úm–r‡rj³ˆww±Jø[­Âg68ì°î¡#…ãE²'àöIš…‹oS#›¤Íˆ…^ýêr’ÔE!Ž+Ç„üá±ÔË/6kìRT$•Ì-öŒ¿¾z{õ*8½ –Ï8y[矙ä¾n¾4þÎI sMV£”Œ,®”–2Ì ®^é_œÿ-&/d©ðÅ,aíBOÖDxQ-IY”‡¿KÀ¼ä€†L“5ØÐÉû†¬Ç¤Ué)sXêÇøŠ_T†è‡ÇRÿñ«òÖFÜ©iÛår'~„ôZìåý®¢ÀÇ÷á3Œ<
-2½.g# ·Wý\f.Ö#¬TúórÂUêËBFro,Ž¥þãq(P
-È‘sWŠ)µØ·âþX®ê‘ܔ׈™žÀK™,+J8 ë#±Ò§ïO
-Èq’å>>½<.eâO_È|xA»˜ðçÌêMÔp¾ —€õ  /aa᧢>,­Õ#Tz¿´õ1zpk
-µéÃ#Í<ÿXEV@Ž
-ayz9_Œ)
-Ò¸ü@öÐbO‘ßØ£d*é$ȆÆ@"ÖCF4㑃
-endobj
-888 0 obj
-5057
-endobj
-889 0 obj<</Type/Page/Parent 633 0 R/Contents 890 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 468 0 R>>endobj
-890 0 obj<</Length 891 0 R/Filter/FlateDecode>>stream
+888 0 obj<</Type/Page/Parent 635 0 R/Contents 889 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 463 0 R>>endobj
+889 0 obj<</Length 890 0 R/Filter/FlateDecode>>stream
+xÍœ_s[·Åßý)øVg¦•yyy/ɧŽ"Ç­g’ص”qòBS×[þQHªN¿}Ï àìBnãid»™éè8?‚‹ÅXàò—'ÍhŒÿšÑl2jûÑjûäÛ«'Ï^,F“ñèêý¨égͨŸMGW×£ñÙxŒ]=½Z¾Û £ýûÑÅ~wv§ã7WÿxòÝÕ©jùëÍ_ä_Fýtÿߎ¦ÍÙB6£KùWÿp3zö¢5|2t>Œ>õâvyw#ý0ÂmGÝijc±C,Î’šÛÑlvÖÛ–Åb§þëþC’“b;š/Î:+ÅN~Ú'5 ¶£f<?›[y,wòóÕ)éYÀ¤9k-@+8Âò˜$@õ”éE_Ð÷ó³©k@D:ý·ËÕ?ïï2„d[ø[ ‰äù~»\ï„e€ôcß“ZÁAÄqûͦ¸KšM|Ÿj¢–€ùØ÷ª2`™¿ )¶£¶™žÍ¬Méô¯ïÃæß Â2@0òÜÓ
+r¹Ü¾Ë aFí¸õÞ¥#›ô:5†¥
+;XFyÛ£ùžžÑÿº™F
+j_&1íe,D f8ÝæhÀ™fÞ°Z¡bì†Ó‡ýáŸÿGà”Uš ƒÖ)û“ußn!_j‹p‡Šûv ‰^vl·6I„U,¢ A‹=ƒ–Q¤ÓÀ® Zî ×{r]R cŽ›V$¬‡×% ³>çê oÑAÇÓò´.Ãj°27Y–â=ëýz—çM–Ái°0Z8ˆr=d}Ê#šU⺲š0 I<ãÚ.¯HÌbâm“È³Ê ¬èÂâø¿“ wsžÿ»yvÑÙÂ9𼎾er"Év„¯çc½[ÂÛÛ!‡’ ¯Ç2I€–[À:w+¢çÂW¸©‚PtoO¦² ²­` ¯Ÿ_äÕ
+i@˜Ém ZÁvÃp=\‡žmeyø;õì'1ëývÐJÈf²·Aljçà(Á>°“QÂú0wáb™€4ⲉ1„X^ÌŠ›e€`sWäfh…Šò.O4,a©¢„AÒ€ÐËÔ6"V¨~WW„¼ZoR%W»`!0]+ŽÎ&Ñ
+¦,bà‘꣸§ C]_ÖÈ]x ìdn´.Ø9T=F ˆõÑ+Í¢¤AÃmZì›pÓ$^ f Å^ÿ2ÅRÀo°oõúHôúã—±,ç•Å£iBªà”L ؼ!²Õ#Šÿ“Fü.áÜ´‚'Ø¡L:P°ºr½‘Àžòíó‹à°“÷¼¿=2~bMçÅÓ6lfâÔÈ‹±°Ó
+DÅOX®ÅV~yÚÃIRÁÚª Zî’‹ûCY%’LæSYh‹$®¥ütÏ~X®n×»¼F`1P!-oP©‚E¯VÈÄä`Í:¤±âIý¥†E´Ð2Ö»÷ûÃÖl•X)ùNIUšÖ Âœd[@ÞNeÎàJlCÊÂ%
+žÄƒe€ÌÚ
+¢\¹ÿáÌù½þ1'µ9wßð¸žb9¸à|áº1›ƒÃh.û×hr,dáiÆ_+ÄåêvØæ•/É`ÈC DË};–”±"‘ô…¤Ð Tüƒ'¼6aJ8ޮ˩ ‰šË¶Ê¢´‚‡•ãUÉ”9‘1ÍfM*%nIVåSËHXÏxó"'WXF×H4áv¤
+ždõ,Í1,“iRæ Q®‡ \¯Õ¹;Ä$™`ÿß°s\|´œìG' ä¸]å¶eÏKŠèrðÖk¹%`kÿ~}sÏ+,ñÖ$¨“Å£¥
+–d·l¤ç•§eà€rê¾Í‡õé6uKÄßÄ( LÛ fÒ1ع>êÊÚ¡~b"6aE!y¿ix ÄʳZG˜ _QÁnYF¿À³g¼ºv&Œ“ä?1Þ¹% ìAÈ0o$8øì±R=Æ‚æÁ™ß%¬<‚a™sÒ¡ÐÍ­´yÃì:A jwú”b9ÌY1$•1QÛ·'ŒŠÏî‘ÆžòзÆEɤȦ‡Õz¥/ ªšq'öeBŒ2CƒfÙ‚‘R]Rš†tXýÛ¦ðüHéñeKÐ
+þëü‡àw¥!$D ÁòÔ}¡Dö˜ír·¼¶¸ªŠlfÿß™ ê¶úlG¶XFäUN|(Ù"‰h£#V93Û‘ ÐŒe½h¡#kÆå°ÂlqÊ·cX‰n‡#†“*øÆpW’
+Œ¹,Ý,C+xÆQöõ4÷Ÿ}ÕOy`µsqXñúc^…ª¹ë •ã )Nɨk€C>Id8ÉÙh¹mÁñnX­—›2H
+–ÿ¥$°Å,O§ÃúÝý‰I**MsÛ‚ÏÈó?id'ó¹%hK`‡»‘þ±R¿®ãgrÕ$u|x ŽÇR¥šô˵É8ÐÏ'[&h¹g|÷ër{‡+£ê,ÌÀ˜TÁs¾þòE†DHmAzV7­à!ßa³Îw_H)Ž„:Ž£<‡=€TâCÒ‘¶-ZÁ3òŒ5âC²µ…z{‘˜}¬-mß™ø?‹I!µáÜ÷†­·Kª$WáêI{5­Ø‹Zî!û­Lba´à6ÎüsÌbõ¼öÀ¿ô½šF6 m+1Q/<ǵ g¯[œœÛ)ï¡üubÁ8S++ä¯kÖ7i„F3ئ1Zì[ñÓN®†å\MÈQ§V4øfè©ðý´Zî)ßïoö»¬I'c,LšLI`y‡kPC¹qÁJŒ’ÉØ·&U𜷸^³ÿÛÃJpZYy›o•*xÎWɸ,’+ç¶ÑŠ¥<€V¬YK y6Jªà?ýøòï¹$“ô€YˆVðû#T°|ÄRnJªà)°ë;˜VœFüäÀÓ›«¼’±/+’ðÇ å·[y5Þ €ÇŸ‚°âD¿2(;Àù»ãé°\…µq¸õûÖÆÄý“36#eöj$d·Û±¿U ãÐ3¬Ì³Û-¢u*Æ×Ý6.$7Ôrî?>ëLp“ÁMJxs"‡Ëðí
+šlŠ
+ÛP¹f?a„ Œ
+!×—R(! ú
+®†¢÷ e*-óŒ—Ï3€$èþpÂlZÁ#Î7›}ô$ñK\ÃüäÖÇç°ÿQ237&!õžVs៬9èÐ78‚"þÑñŒG¨o†ãý&Oq$B LÀ—¡å¾á\zµò .ÔØÖ¨ ¶yÛŠQ›y5éAeJJrÉ¢áEþ
+2|Õ,å® D Ì C6œ ©ãûõv}ŠwÙÂýhoYgümO³t8ÖÕ’)ÓMx ëL*Û¸Sø$—×jឬÓ# Ư6H6Ç‹±¸sþ5 bµÛ,ååÔfïî„c•ð·Z…ÏlpØaÝCG6
+
+Ç+ ŠdOÀí“4 Þ¦–ßtau,ôêW—“¤.
+q\9&dy,õò‹Í»”D •„
+N/ƒå3NÞÖùg&9†¯›/ …¿sgÒAÂÜ_“Õ(%#‹+å„¥ s‚«Wúç‹É Y*|1KX»Ð“5^T ARæ ðw‰HÖº0 †!Ód 6tò¾!ë1iUzÊ–ú1¾â¤!úá±Ôüª¼µwjÚv¹Ü‰_ !½{@y¿«(ðñ}øÕ #@/OW Kž¥(wà§;‹=æÕå³<ZI„­`¸Ée‘é o—‡|QšD `ÂÆO0QP\÷‚ñ/Ÿ¤O* Æov0"B}#ÊÅ’@Xd}$zýˆí@*<b6±ý©ÅÁv ‘Â/Q#´Ø¦É¤€1Úv¥{yù)-’ˆ^ò¥l-®ôùã‹ò™¤–¬<
+Èñs@®íhå&°dK¸Pb>=­Ü„•‡6¨„˜­9Éðw *Èôºœ,dÜ\õs™4X°RéÏË W©/ ɽ±8–úÇ¡@„Ac‚¤ÜªÏ_îÊe梀¿a @ß‚½4!õ.©d#?§gZÐáž»¬Ç{º<[D¢ÚxyC|L»
+™0ý çðWøIfœ1…ŸdþSƒ×<°·@‡ÈïÓËó¾=áêÇ?dOù|¿º—ËÙù0GÞUíGš…Û–O×뵪ÿíÉ
+endstream
+endobj
+890 0 obj
+5146
+endobj
+891 0 obj<</Type/Page/Parent 635 0 R/Contents 892 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 7 0 R/F5 8 0 R/F8 10 0 R/F9 11 0 R>>>>/Annots 470 0 R>>endobj
+892 0 obj<</Length 893 0 R/Filter/FlateDecode>>stream
xÅ–MsÓ0†ïþ{,}Xþ8¦@LxÊ9±Ý’Nƒã~>»¶ì¬e†Ói“™Ä²´¤}wWú(øUk0äUp‹u
ZBvʦBA‡ …”ø6¿Ê¶»§ê{XÕ‡¶<´Ç7Ùcð> h@7
=}ý@o
Sü­ T"u'ØÐ<Þøæk JÑÌhgq26ëêûöG[6à&c¸
l"Â)»ïöʈÁœYT ¤¥mv ukëû=û·ß²ÛÀah—„à1–y^#„™!$…ö æ!6Ûj· ̦BÙba=B?ÀcëS“—„›!Ä(M!n€Éëâ‚`FˆgŠ8ª‡8ïÇp$ÄÒ×Ô ð«» …„VÂ`ÔdÅ•x¶O"]°™ˆÄ5V$È‘Ä¿¾á‚e±]ØbE88™D.†Y£àª ¼ìX®ßgÜÚ¦.Ny»¯´(«1Ržy»ÿí7ÏOZcø ~ênoäm°“ç5zG{Þq€$¤ŠÁ½sf !’™ ¹7!©8Áõû‹ð²’ÙQjKªœ2€}L[ëàF”Ø–2j‚pTq¤äuó@*‡sàåUöô”)®õì*\×`z*JÓ™ž,Þ/Vè©IRΈ°=cxr0+µ;“8ÃagV\¸2°¼c`L=vÆÀØúUîH ãÚ_^Œ>+§’Ø4Âôw’ô‹$6±s& K2’d@ô¾›0P’9ão’ŒŒÎwÆ€õ—2“ddƒ’Lë3òswã ÂñjzŒµr†î:61ø‹‡—Nê›æÉÍ¡(S\iûú»·óï‡DÑ‚/÷¶î©»·%î
endobj
-891 0 obj
+893 0 obj
699
endobj
-892 0 obj<</Count 15/First 893 0 R/Last 1033 0 R>>endobj
-893 0 obj<</Parent 892 0 R/Title(Table of Contents)/Dest[880 0 R/XYZ null 756 null]/Next 894 0 R>>endobj
-894 0 obj<</Parent 892 0 R/Count -19/First 895 0 R/Last 913 0 R/Title(Chapter 1. How to Install and Test SAMBA)/Dest[637 0 R/XYZ null 750 null]/Prev 893 0 R/Next 914 0 R>>endobj
-895 0 obj<</Parent 894 0 R/Title(1.1. Step 0: Read the man pages)/Dest[637 0 R/XYZ null 726 null]/Next 896 0 R>>endobj
-896 0 obj<</Parent 894 0 R/Title(1.2. Step 1: Building the Binaries)/Dest[637 0 R/XYZ null 589 null]/Prev 895 0 R/Next 897 0 R>>endobj
-897 0 obj<</Parent 894 0 R/Title(1.3. Step 2: The all important step)/Dest[637 0 R/XYZ null 174 null]/Prev 896 0 R/Next 898 0 R>>endobj
-898 0 obj<</Parent 894 0 R/Title(1.4. Step 3: Create the smb configuration file.)/Dest[640 0 R/XYZ null 735 null]/Prev 897 0 R/Next 899 0 R>>endobj
-899 0 obj<</Parent 894 0 R/Title(1.5. Step 4: Test your config file with testparm)/Dest[640 0 R/XYZ null 375 null]/Prev 898 0 R/Next 900 0 R>>endobj
-900 0 obj<</Parent 894 0 R/Title(1.6. Step 5: Starting the smbd and nmbd)/Dest[640 0 R/XYZ null 264 null]/Prev 899 0 R/Next 901 0 R>>endobj
-901 0 obj<</Parent 894 0 R/Title(1.6.1. Step 5a: Starting from inetd.conf)/Dest[643 0 R/XYZ null 750 null]/Prev 900 0 R/Next 902 0 R>>endobj
-902 0 obj<</Parent 894 0 R/Title(1.6.2. Step 5b. Alternative: starting it as a daemon)/Dest[643 0 R/XYZ null 262 null]/Prev 901 0 R/Next 903 0 R>>endobj
-903 0 obj<</Parent 894 0 R/Title(1.7. Step 6: Try listing the shares available on your server)/Dest[646 0 R/XYZ null 682 null]/Prev 902 0 R/Next 904 0 R>>endobj
-904 0 obj<</Parent 894 0 R/Title(1.8. Step 7: Try connecting with the unix client)/Dest[646 0 R/XYZ null 505 null]/Prev 903 0 R/Next 905 0 R>>endobj
-905 0 obj<</Parent 894 0 R/Title(1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, Win2k, OS/2, etc... client)/Dest[646 0 R/XYZ null 328 null]/Prev 904 0 R/Next 906 0 R>>endobj
-906 0 obj<</Parent 894 0 R/Title(1.10. What If Things Don't Work?)/Dest[649 0 R/XYZ null 750 null]/Prev 905 0 R/Next 907 0 R>>endobj
-907 0 obj<</Parent 894 0 R/Title(1.10.1. Diagnosing Problems)/Dest[649 0 R/XYZ null 573 null]/Prev 906 0 R/Next 908 0 R>>endobj
-908 0 obj<</Parent 894 0 R/Title(1.10.2. Scope IDs)/Dest[649 0 R/XYZ null 501 null]/Prev 907 0 R/Next 909 0 R>>endobj
-909 0 obj<</Parent 894 0 R/Title(1.10.3. Choosing the Protocol Level)/Dest[649 0 R/XYZ null 390 null]/Prev 908 0 R/Next 910 0 R>>endobj
-910 0 obj<</Parent 894 0 R/Title(1.10.4. Printing from UNIX to a Client PC)/Dest[652 0 R/XYZ null 735 null]/Prev 909 0 R/Next 911 0 R>>endobj
-911 0 obj<</Parent 894 0 R/Title(1.10.5. Locking)/Dest[652 0 R/XYZ null 611 null]/Prev 910 0 R/Next 912 0 R>>endobj
-912 0 obj<</Parent 894 0 R/Title(1.10.6. Mapping Usernames)/Dest[655 0 R/XYZ null 750 null]/Prev 911 0 R/Next 913 0 R>>endobj
-913 0 obj<</Parent 894 0 R/Title(1.10.7. Other Character Sets)/Dest[655 0 R/XYZ null 679 null]/Prev 912 0 R>>endobj
-914 0 obj<</Parent 892 0 R/Count -18/First 915 0 R/Last 932 0 R/Title(Chapter 2. Integrating MS Windows networks with Samba)/Dest[658 0 R/XYZ null 750 null]/Prev 894 0 R/Next 933 0 R>>endobj
-915 0 obj<</Parent 914 0 R/Title(2.1. Agenda)/Dest[658 0 R/XYZ null 702 null]/Next 916 0 R>>endobj
-916 0 obj<</Parent 914 0 R/Title(2.2. Name Resolution in a pure Unix/Linux world)/Dest[658 0 R/XYZ null 459 null]/Prev 915 0 R/Next 917 0 R>>endobj
-917 0 obj<</Parent 914 0 R/Title(2.2.1. /etc/hosts)/Dest[658 0 R/XYZ null 321 null]/Prev 916 0 R/Next 918 0 R>>endobj
-918 0 obj<</Parent 914 0 R/Title(2.2.2. /etc/resolv.conf)/Dest[661 0 R/XYZ null 431 null]/Prev 917 0 R/Next 919 0 R>>endobj
-919 0 obj<</Parent 914 0 R/Title(2.2.3. /etc/host.conf)/Dest[661 0 R/XYZ null 281 null]/Prev 918 0 R/Next 920 0 R>>endobj
-920 0 obj<</Parent 914 0 R/Title(2.2.4. /etc/nsswitch.conf)/Dest[664 0 R/XYZ null 750 null]/Prev 919 0 R/Next 921 0 R>>endobj
-921 0 obj<</Parent 914 0 R/Title(2.3. Name resolution as used within MS Windows networking)/Dest[664 0 R/XYZ null 264 null]/Prev 920 0 R/Next 922 0 R>>endobj
-922 0 obj<</Parent 914 0 R/Title(2.3.1. The NetBIOS Name Cache)/Dest[667 0 R/XYZ null 206 null]/Prev 921 0 R/Next 923 0 R>>endobj
-923 0 obj<</Parent 914 0 R/Title(2.3.2. The LMHOSTS file)/Dest[670 0 R/XYZ null 656 null]/Prev 922 0 R/Next 924 0 R>>endobj
-924 0 obj<</Parent 914 0 R/Title(2.3.3. HOSTS file)/Dest[673 0 R/XYZ null 367 null]/Prev 923 0 R/Next 925 0 R>>endobj
-925 0 obj<</Parent 914 0 R/Title(2.3.4. DNS Lookup)/Dest[673 0 R/XYZ null 256 null]/Prev 924 0 R/Next 926 0 R>>endobj
-926 0 obj<</Parent 914 0 R/Title(2.3.5. WINS Lookup)/Dest[676 0 R/XYZ null 750 null]/Prev 925 0 R/Next 927 0 R>>endobj
-927 0 obj<</Parent 914 0 R/Title(2.4. How browsing functions and how to deploy stable and dependable browsing using Samba)/Dest[676 0 R/XYZ null 525 null]/Prev 926 0 R/Next 928 0 R>>endobj
-928 0 obj<</Parent 914 0 R/Title(2.5. MS Windows security options and how to configure Samba for seemless integration)/Dest[679 0 R/XYZ null 629 null]/Prev 927 0 R/Next 929 0 R>>endobj
-929 0 obj<</Parent 914 0 R/Title(2.5.1. Use MS Windows NT as an authentication server)/Dest[682 0 R/XYZ null 577 null]/Prev 928 0 R/Next 930 0 R>>endobj
-930 0 obj<</Parent 914 0 R/Title(2.5.2. Make Samba a member of an MS Windows NT security domain)/Dest[682 0 R/XYZ null 300 null]/Prev 929 0 R/Next 931 0 R>>endobj
-931 0 obj<</Parent 914 0 R/Title(2.5.3. Configure Samba as an authentication server)/Dest[685 0 R/XYZ null 590 null]/Prev 930 0 R/Next 932 0 R>>endobj
-932 0 obj<</Parent 914 0 R/Title(2.6. Conclusions)/Dest[688 0 R/XYZ null 635 null]/Prev 931 0 R>>endobj
-933 0 obj<</Parent 892 0 R/Count -3/First 934 0 R/Last 936 0 R/Title(Chapter 3. Configuring PAM for distributed but centrally managed authentication)/Dest[691 0 R/XYZ null 750 null]/Prev 914 0 R/Next 937 0 R>>endobj
-934 0 obj<</Parent 933 0 R/Title(3.1. Samba and PAM)/Dest[691 0 R/XYZ null 702 null]/Next 935 0 R>>endobj
-935 0 obj<</Parent 933 0 R/Title(3.2. Distributed Authentication)/Dest[694 0 R/XYZ null 175 null]/Prev 934 0 R/Next 936 0 R>>endobj
-936 0 obj<</Parent 933 0 R/Title(3.3. PAM Configuration in smb.conf)/Dest[697 0 R/XYZ null 722 null]/Prev 935 0 R>>endobj
-937 0 obj<</Parent 892 0 R/Count -2/First 938 0 R/Last 939 0 R/Title(Chapter 4. Hosting a Microsoft Distributed File System tree on Samba)/Dest[700 0 R/XYZ null 750 null]/Prev 933 0 R/Next 940 0 R>>endobj
-938 0 obj<</Parent 937 0 R/Title(4.1. Instructions)/Dest[700 0 R/XYZ null 702 null]/Next 939 0 R>>endobj
-939 0 obj<</Parent 937 0 R/Title(4.1.1. Notes)/Dest[703 0 R/XYZ null 669 null]/Prev 938 0 R>>endobj
-940 0 obj<</Parent 892 0 R/Count -9/First 941 0 R/Last 949 0 R/Title(Chapter 5. UNIX Permission Bits and Windows NT Access Control Lists)/Dest[706 0 R/XYZ null 750 null]/Prev 937 0 R/Next 950 0 R>>endobj
-941 0 obj<</Parent 940 0 R/Title(5.1. Viewing and changing UNIX permissions using the NT security dialogs)/Dest[706 0 R/XYZ null 702 null]/Next 942 0 R>>endobj
-942 0 obj<</Parent 940 0 R/Title(5.2. How to view file security on a Samba share)/Dest[706 0 R/XYZ null 521 null]/Prev 941 0 R/Next 943 0 R>>endobj
-943 0 obj<</Parent 940 0 R/Title(5.3. Viewing file ownership)/Dest[706 0 R/XYZ null 344 null]/Prev 942 0 R/Next 944 0 R>>endobj
-944 0 obj<</Parent 940 0 R/Title(5.4. Viewing file or directory permissions)/Dest[709 0 R/XYZ null 682 null]/Prev 943 0 R/Next 945 0 R>>endobj
-945 0 obj<</Parent 940 0 R/Title(5.4.1. File Permissions)/Dest[709 0 R/XYZ null 439 null]/Prev 944 0 R/Next 946 0 R>>endobj
-946 0 obj<</Parent 940 0 R/Title(5.4.2. Directory Permissions)/Dest[709 0 R/XYZ null 183 null]/Prev 945 0 R/Next 947 0 R>>endobj
-947 0 obj<</Parent 940 0 R/Title(5.5. Modifying file or directory permissions)/Dest[712 0 R/XYZ null 669 null]/Prev 946 0 R/Next 948 0 R>>endobj
-948 0 obj<</Parent 940 0 R/Title(5.6. Interaction with the standard Samba create mask parameters)/Dest[712 0 R/XYZ null 228 null]/Prev 947 0 R/Next 949 0 R>>endobj
-949 0 obj<</Parent 940 0 R/Title(5.7. Interaction with the standard Samba file attribute mapping)/Dest[718 0 R/XYZ null 590 null]/Prev 948 0 R>>endobj
-950 0 obj<</Parent 892 0 R/Count -13/First 951 0 R/Last 963 0 R/Title(Chapter 6. Printing Support in Samba 2.2.x)/Dest[721 0 R/XYZ null 750 null]/Prev 940 0 R/Next 964 0 R>>endobj
-951 0 obj<</Parent 950 0 R/Title(6.1. Introduction)/Dest[721 0 R/XYZ null 726 null]/Next 952 0 R>>endobj
-952 0 obj<</Parent 950 0 R/Title(6.2. Configuration)/Dest[721 0 R/XYZ null 298 null]/Prev 951 0 R/Next 953 0 R>>endobj
-953 0 obj<</Parent 950 0 R/Title(6.2.1. Creating [print$])/Dest[724 0 R/XYZ null 689 null]/Prev 952 0 R/Next 954 0 R>>endobj
-954 0 obj<</Parent 950 0 R/Title(6.2.2. Setting Drivers for Existing Printers)/Dest[727 0 R/XYZ null 459 null]/Prev 953 0 R/Next 955 0 R>>endobj
-955 0 obj<</Parent 950 0 R/Title(6.2.3. Support a large number of printers)/Dest[730 0 R/XYZ null 682 null]/Prev 954 0 R/Next 956 0 R>>endobj
-956 0 obj<</Parent 950 0 R/Title(6.2.4. Adding New Printers via the Windows NT APW)/Dest[730 0 R/XYZ null 298 null]/Prev 955 0 R/Next 957 0 R>>endobj
-957 0 obj<</Parent 950 0 R/Title(6.2.5. Samba and Printer Ports)/Dest[733 0 R/XYZ null 682 null]/Prev 956 0 R/Next 958 0 R>>endobj
-958 0 obj<</Parent 950 0 R/Title(6.3. The Imprints Toolset)/Dest[733 0 R/XYZ null 492 null]/Prev 957 0 R/Next 959 0 R>>endobj
-959 0 obj<</Parent 950 0 R/Title(6.3.1. What is Imprints?)/Dest[733 0 R/XYZ null 381 null]/Prev 958 0 R/Next 960 0 R>>endobj
-960 0 obj<</Parent 950 0 R/Title(6.3.2. Creating Printer Driver Packages)/Dest[733 0 R/XYZ null 243 null]/Prev 959 0 R/Next 961 0 R>>endobj
-961 0 obj<</Parent 950 0 R/Title(6.3.3. The Imprints server)/Dest[733 0 R/XYZ null 145 null]/Prev 960 0 R/Next 962 0 R>>endobj
-962 0 obj<</Parent 950 0 R/Title(6.3.4. The Installation Client)/Dest[736 0 R/XYZ null 709 null]/Prev 961 0 R/Next 963 0 R>>endobj
-963 0 obj<</Parent 950 0 R/Title(6.4. Migration to from Samba 2.0.x to 2.2.x)/Dest[739 0 R/XYZ null 750 null]/Prev 962 0 R>>endobj
-964 0 obj<</Parent 892 0 R/Count -3/First 965 0 R/Last 967 0 R/Title(Chapter 7. security = domain in Samba 2.x)/Dest[742 0 R/XYZ null 750 null]/Prev 950 0 R/Next 968 0 R>>endobj
-965 0 obj<</Parent 964 0 R/Title(7.1. Joining an NT Domain with Samba 2.2)/Dest[742 0 R/XYZ null 726 null]/Next 966 0 R>>endobj
-966 0 obj<</Parent 964 0 R/Title(7.2. Samba and Windows 2000 Domains)/Dest[745 0 R/XYZ null 379 null]/Prev 965 0 R/Next 967 0 R>>endobj
-967 0 obj<</Parent 964 0 R/Title(7.3. Why is this better than security = server?)/Dest[745 0 R/XYZ null 162 null]/Prev 966 0 R>>endobj
-968 0 obj<</Parent 892 0 R/Count -14/First 969 0 R/Last 982 0 R/Title(Chapter 8. How to Configure Samba 2.2 as a Primary Domain Controller)/Dest[751 0 R/XYZ null 750 null]/Prev 964 0 R/Next 983 0 R>>endobj
-969 0 obj<</Parent 968 0 R/Title(8.1. Prerequisite Reading)/Dest[751 0 R/XYZ null 702 null]/Next 970 0 R>>endobj
-970 0 obj<</Parent 968 0 R/Title(8.2. Background)/Dest[751 0 R/XYZ null 604 null]/Prev 969 0 R/Next 971 0 R>>endobj
-971 0 obj<</Parent 968 0 R/Title(8.3. Configuring the Samba Domain Controller)/Dest[754 0 R/XYZ null 722 null]/Prev 970 0 R/Next 972 0 R>>endobj
-972 0 obj<</Parent 968 0 R/Title(8.4. Creating Machine Trust Accounts and Joining Clients to the Domain)/Dest[757 0 R/XYZ null 603 null]/Prev 971 0 R/Next 973 0 R>>endobj
-973 0 obj<</Parent 968 0 R/Title(8.4.1. Manual Creation of Machine Trust Accounts)/Dest[757 0 R/XYZ null 228 null]/Prev 972 0 R/Next 974 0 R>>endobj
-974 0 obj<</Parent 968 0 R/Title(8.4.2. "On-the-Fly" Creation of Machine Trust Accounts)/Dest[760 0 R/XYZ null 355 null]/Prev 973 0 R/Next 975 0 R>>endobj
-975 0 obj<</Parent 968 0 R/Title(8.4.3. Joining the Client to the Domain)/Dest[763 0 R/XYZ null 750 null]/Prev 974 0 R/Next 976 0 R>>endobj
-976 0 obj<</Parent 968 0 R/Title(8.5. Common Problems and Errors)/Dest[763 0 R/XYZ null 388 null]/Prev 975 0 R/Next 977 0 R>>endobj
-977 0 obj<</Parent 968 0 R/Title(8.6. System Policies and Profiles)/Dest[769 0 R/XYZ null 735 null]/Prev 976 0 R/Next 978 0 R>>endobj
-978 0 obj<</Parent 968 0 R/Title(8.7. What other help can I get?)/Dest[772 0 R/XYZ null 682 null]/Prev 977 0 R/Next 979 0 R>>endobj
-979 0 obj<</Parent 968 0 R/Title(8.8. Domain Control for Windows 9x/ME)/Dest[778 0 R/XYZ null 299 null]/Prev 978 0 R/Next 980 0 R>>endobj
-980 0 obj<</Parent 968 0 R/Title(8.8.1. Configuration Instructions: Network Logons)/Dest[781 0 R/XYZ null 273 null]/Prev 979 0 R/Next 981 0 R>>endobj
-981 0 obj<</Parent 968 0 R/Title(8.8.2. Configuration Instructions: Setting up Roaming User Profiles)/Dest[784 0 R/XYZ null 478 null]/Prev 980 0 R/Next 982 0 R>>endobj
-982 0 obj<</Parent 968 0 R/Title(8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba)/Dest[796 0 R/XYZ null 270 null]/Prev 981 0 R>>endobj
-983 0 obj<</Parent 892 0 R/Count -8/First 984 0 R/Last 991 0 R/Title(Chapter 9. How to a Purely Samba Controlled Domain)/Dest[805 0 R/XYZ null 750 null]/Prev 968 0 R/Next 992 0 R>>endobj
-984 0 obj<</Parent 983 0 R/Title(9.1. Prerequisite Reading)/Dest[805 0 R/XYZ null 702 null]/Next 985 0 R>>endobj
-985 0 obj<</Parent 983 0 R/Title(9.2. Background)/Dest[805 0 R/XYZ null 617 null]/Prev 984 0 R/Next 986 0 R>>endobj
-986 0 obj<</Parent 983 0 R/Title(9.3. What qualifies a Domain Controller on the network?)/Dest[805 0 R/XYZ null 235 null]/Prev 985 0 R/Next 987 0 R>>endobj
-987 0 obj<</Parent 983 0 R/Title(9.3.1. How does a Workstation find its domain controller?)/Dest[808 0 R/XYZ null 750 null]/Prev 986 0 R/Next 988 0 R>>endobj
-988 0 obj<</Parent 983 0 R/Title(9.3.2. When is the PDC needed?)/Dest[808 0 R/XYZ null 626 null]/Prev 987 0 R/Next 989 0 R>>endobj
-989 0 obj<</Parent 983 0 R/Title(9.4. Can Samba be a Backup Domain Controller?)/Dest[808 0 R/XYZ null 528 null]/Prev 988 0 R/Next 990 0 R>>endobj
-990 0 obj<</Parent 983 0 R/Title(9.5. How do I set up a Samba BDC?)/Dest[808 0 R/XYZ null 377 null]/Prev 989 0 R/Next 991 0 R>>endobj
-991 0 obj<</Parent 983 0 R/Title(9.5.1. How do I replicate the smbpasswd file?)/Dest[811 0 R/XYZ null 646 null]/Prev 990 0 R>>endobj
-992 0 obj<</Parent 892 0 R/Count -12/First 993 0 R/Last 1004 0 R/Title(Chapter 10. Storing Samba's User/Machine Account information in an LDAP Directory)/Dest[814 0 R/XYZ null 750 null]/Prev 983 0 R/Next 1005 0 R>>endobj
-993 0 obj<</Parent 992 0 R/Title(10.1. Purpose)/Dest[814 0 R/XYZ null 702 null]/Next 994 0 R>>endobj
-994 0 obj<</Parent 992 0 R/Title(10.2. Introduction)/Dest[814 0 R/XYZ null 433 null]/Prev 993 0 R/Next 995 0 R>>endobj
-995 0 obj<</Parent 992 0 R/Title(10.3. Supported LDAP Servers)/Dest[817 0 R/XYZ null 577 null]/Prev 994 0 R/Next 996 0 R>>endobj
-996 0 obj<</Parent 992 0 R/Title(10.4. Schema and Relationship to the RFC 2307 posixAccount)/Dest[817 0 R/XYZ null 465 null]/Prev 995 0 R/Next 997 0 R>>endobj
-997 0 obj<</Parent 992 0 R/Title(10.5. Configuring Samba with LDAP)/Dest[820 0 R/XYZ null 735 null]/Prev 996 0 R/Next 998 0 R>>endobj
-998 0 obj<</Parent 992 0 R/Title(10.5.1. OpenLDAP configuration)/Dest[820 0 R/XYZ null 705 null]/Prev 997 0 R/Next 999 0 R>>endobj
-999 0 obj<</Parent 992 0 R/Title(10.5.2. Configuring Samba)/Dest[823 0 R/XYZ null 750 null]/Prev 998 0 R/Next 1000 0 R>>endobj
-1000 0 obj<</Parent 992 0 R/Title(10.6. Accounts and Groups management)/Dest[823 0 R/XYZ null 176 null]/Prev 999 0 R/Next 1001 0 R>>endobj
-1001 0 obj<</Parent 992 0 R/Title(10.7. Security and sambaAccount)/Dest[826 0 R/XYZ null 629 null]/Prev 1000 0 R/Next 1002 0 R>>endobj
-1002 0 obj<</Parent 992 0 R/Title(10.8. LDAP specials attributes for sambaAccounts)/Dest[826 0 R/XYZ null 236 null]/Prev 1001 0 R/Next 1003 0 R>>endobj
-1003 0 obj<</Parent 992 0 R/Title(10.9. Example LDIF Entries for a sambaAccount)/Dest[829 0 R/XYZ null 207 null]/Prev 1002 0 R/Next 1004 0 R>>endobj
-1004 0 obj<</Parent 992 0 R/Title(10.10. Comments)/Dest[832 0 R/XYZ null 358 null]/Prev 1003 0 R>>endobj
-1005 0 obj<</Parent 892 0 R/Count -16/First 1006 0 R/Last 1021 0 R/Title(Chapter 11. Unified Logons between Windows NT and UNIX using Winbind)/Dest[835 0 R/XYZ null 750 null]/Prev 992 0 R/Next 1022 0 R>>endobj
-1006 0 obj<</Parent 1005 0 R/Title(11.1. Abstract)/Dest[835 0 R/XYZ null 702 null]/Next 1007 0 R>>endobj
-1007 0 obj<</Parent 1005 0 R/Title(11.2. Introduction)/Dest[835 0 R/XYZ null 565 null]/Prev 1006 0 R/Next 1008 0 R>>endobj
-1008 0 obj<</Parent 1005 0 R/Title(11.3. What Winbind Provides)/Dest[835 0 R/XYZ null 242 null]/Prev 1007 0 R/Next 1009 0 R>>endobj
-1009 0 obj<</Parent 1005 0 R/Title(11.3.1. Target Uses)/Dest[838 0 R/XYZ null 577 null]/Prev 1008 0 R/Next 1010 0 R>>endobj
-1010 0 obj<</Parent 1005 0 R/Title(11.4. How Winbind Works)/Dest[838 0 R/XYZ null 413 null]/Prev 1009 0 R/Next 1011 0 R>>endobj
-1011 0 obj<</Parent 1005 0 R/Title(11.4.1. Microsoft Remote Procedure Calls)/Dest[838 0 R/XYZ null 288 null]/Prev 1010 0 R/Next 1012 0 R>>endobj
-1012 0 obj<</Parent 1005 0 R/Title(11.4.2. Name Service Switch)/Dest[841 0 R/XYZ null 750 null]/Prev 1011 0 R/Next 1013 0 R>>endobj
-1013 0 obj<</Parent 1005 0 R/Title(11.4.3. Pluggable Authentication Modules)/Dest[841 0 R/XYZ null 309 null]/Prev 1012 0 R/Next 1014 0 R>>endobj
-1014 0 obj<</Parent 1005 0 R/Title(11.4.4. User and Group ID Allocation)/Dest[844 0 R/XYZ null 669 null]/Prev 1013 0 R/Next 1015 0 R>>endobj
-1015 0 obj<</Parent 1005 0 R/Title(11.4.5. Result Caching)/Dest[844 0 R/XYZ null 479 null]/Prev 1014 0 R/Next 1016 0 R>>endobj
-1016 0 obj<</Parent 1005 0 R/Title(11.5. Installation and Configuration)/Dest[844 0 R/XYZ null 328 null]/Prev 1015 0 R/Next 1017 0 R>>endobj
-1017 0 obj<</Parent 1005 0 R/Title(11.5.1. Introduction)/Dest[844 0 R/XYZ null 217 null]/Prev 1016 0 R/Next 1018 0 R>>endobj
-1018 0 obj<</Parent 1005 0 R/Title(11.5.2. Requirements)/Dest[847 0 R/XYZ null 577 null]/Prev 1017 0 R/Next 1019 0 R>>endobj
-1019 0 obj<</Parent 1005 0 R/Title(11.5.3. Testing Things Out)/Dest[847 0 R/XYZ null 294 null]/Prev 1018 0 R/Next 1020 0 R>>endobj
-1020 0 obj<</Parent 1005 0 R/Title(11.6. Limitations)/Dest[862 0 R/XYZ null 351 null]/Prev 1019 0 R/Next 1021 0 R>>endobj
-1021 0 obj<</Parent 1005 0 R/Title(11.7. Conclusion)/Dest[865 0 R/XYZ null 750 null]/Prev 1020 0 R>>endobj
-1022 0 obj<</Parent 892 0 R/Count -5/First 1023 0 R/Last 1027 0 R/Title(Chapter 12. OS2 Client HOWTO)/Dest[868 0 R/XYZ null 750 null]/Prev 1005 0 R/Next 1028 0 R>>endobj
-1023 0 obj<</Parent 1022 0 R/Title(12.1. FAQs)/Dest[868 0 R/XYZ null 726 null]/Next 1024 0 R>>endobj
-1024 0 obj<</Parent 1022 0 R/Title(12.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?)/Dest[868 0 R/XYZ null 696 null]/Prev 1023 0 R/Next 1025 0 R>>endobj
-1025 0 obj<</Parent 1022 0 R/Title(12.1.2. How can I configure OS/2 Warp 3 \(not Connect\), OS/2 1.2, 1.3 or 2.x for Samba?)/Dest[868 0 R/XYZ null 344 null]/Prev 1024 0 R/Next 1026 0 R>>endobj
-1026 0 obj<</Parent 1022 0 R/Title(12.1.3. Are there any other issues when OS/2 \(any version\) is used as a client?)/Dest[871 0 R/XYZ null 750 null]/Prev 1025 0 R/Next 1027 0 R>>endobj
-1027 0 obj<</Parent 1022 0 R/Title(12.1.4. How do I get printer driver download working for OS/2 clients?)/Dest[871 0 R/XYZ null 635 null]/Prev 1026 0 R>>endobj
-1028 0 obj<</Parent 892 0 R/Count -4/First 1029 0 R/Last 1032 0 R/Title(Chapter 13. HOWTO Access Samba source code via CVS)/Dest[874 0 R/XYZ null 750 null]/Prev 1022 0 R/Next 1033 0 R>>endobj
-1029 0 obj<</Parent 1028 0 R/Title(13.1. Introduction)/Dest[874 0 R/XYZ null 702 null]/Next 1030 0 R>>endobj
-1030 0 obj<</Parent 1028 0 R/Title(13.2. CVS Access to samba.org)/Dest[874 0 R/XYZ null 578 null]/Prev 1029 0 R/Next 1031 0 R>>endobj
-1031 0 obj<</Parent 1028 0 R/Title(13.2.1. Access via CVSweb)/Dest[874 0 R/XYZ null 480 null]/Prev 1030 0 R/Next 1032 0 R>>endobj
-1032 0 obj<</Parent 1028 0 R/Title(13.2.2. Access via cvs)/Dest[874 0 R/XYZ null 355 null]/Prev 1031 0 R>>endobj
-1033 0 obj<</Parent 892 0 R/Title(Index)/Dest[877 0 R/XYZ null 484 null]/Prev 1028 0 R>>endobj
-1034 0 obj<</Type/Catalog/Pages 633 0 R/Names 469 0 R/PageLayout/SinglePage/Outlines 892 0 R/OpenAction[634 0 R/XYZ null null null]/PageMode/UseOutlines/PageLabels<</Nums[0<</P(title)>>1<</S/r>>5<</S/D>>]>>>>endobj
+894 0 obj<</Count 15/First 895 0 R/Last 1035 0 R>>endobj
+895 0 obj<</Parent 894 0 R/Title(Table of Contents)/Dest[882 0 R/XYZ null 756 null]/Next 896 0 R>>endobj
+896 0 obj<</Parent 894 0 R/Count -19/First 897 0 R/Last 915 0 R/Title(Chapter 1. How to Install and Test SAMBA)/Dest[639 0 R/XYZ null 750 null]/Prev 895 0 R/Next 916 0 R>>endobj
+897 0 obj<</Parent 896 0 R/Title(1.1. Step 0: Read the man pages)/Dest[639 0 R/XYZ null 726 null]/Next 898 0 R>>endobj
+898 0 obj<</Parent 896 0 R/Title(1.2. Step 1: Building the Binaries)/Dest[639 0 R/XYZ null 589 null]/Prev 897 0 R/Next 899 0 R>>endobj
+899 0 obj<</Parent 896 0 R/Title(1.3. Step 2: The all important step)/Dest[639 0 R/XYZ null 174 null]/Prev 898 0 R/Next 900 0 R>>endobj
+900 0 obj<</Parent 896 0 R/Title(1.4. Step 3: Create the smb configuration file.)/Dest[642 0 R/XYZ null 735 null]/Prev 899 0 R/Next 901 0 R>>endobj
+901 0 obj<</Parent 896 0 R/Title(1.5. Step 4: Test your config file with testparm)/Dest[642 0 R/XYZ null 375 null]/Prev 900 0 R/Next 902 0 R>>endobj
+902 0 obj<</Parent 896 0 R/Title(1.6. Step 5: Starting the smbd and nmbd)/Dest[642 0 R/XYZ null 264 null]/Prev 901 0 R/Next 903 0 R>>endobj
+903 0 obj<</Parent 896 0 R/Title(1.6.1. Step 5a: Starting from inetd.conf)/Dest[645 0 R/XYZ null 750 null]/Prev 902 0 R/Next 904 0 R>>endobj
+904 0 obj<</Parent 896 0 R/Title(1.6.2. Step 5b. Alternative: starting it as a daemon)/Dest[645 0 R/XYZ null 262 null]/Prev 903 0 R/Next 905 0 R>>endobj
+905 0 obj<</Parent 896 0 R/Title(1.7. Step 6: Try listing the shares available on your server)/Dest[648 0 R/XYZ null 682 null]/Prev 904 0 R/Next 906 0 R>>endobj
+906 0 obj<</Parent 896 0 R/Title(1.8. Step 7: Try connecting with the unix client)/Dest[648 0 R/XYZ null 505 null]/Prev 905 0 R/Next 907 0 R>>endobj
+907 0 obj<</Parent 896 0 R/Title(1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, Win2k, OS/2, etc... client)/Dest[648 0 R/XYZ null 328 null]/Prev 906 0 R/Next 908 0 R>>endobj
+908 0 obj<</Parent 896 0 R/Title(1.10. What If Things Don't Work?)/Dest[651 0 R/XYZ null 750 null]/Prev 907 0 R/Next 909 0 R>>endobj
+909 0 obj<</Parent 896 0 R/Title(1.10.1. Diagnosing Problems)/Dest[651 0 R/XYZ null 573 null]/Prev 908 0 R/Next 910 0 R>>endobj
+910 0 obj<</Parent 896 0 R/Title(1.10.2. Scope IDs)/Dest[651 0 R/XYZ null 501 null]/Prev 909 0 R/Next 911 0 R>>endobj
+911 0 obj<</Parent 896 0 R/Title(1.10.3. Choosing the Protocol Level)/Dest[651 0 R/XYZ null 390 null]/Prev 910 0 R/Next 912 0 R>>endobj
+912 0 obj<</Parent 896 0 R/Title(1.10.4. Printing from UNIX to a Client PC)/Dest[654 0 R/XYZ null 735 null]/Prev 911 0 R/Next 913 0 R>>endobj
+913 0 obj<</Parent 896 0 R/Title(1.10.5. Locking)/Dest[654 0 R/XYZ null 611 null]/Prev 912 0 R/Next 914 0 R>>endobj
+914 0 obj<</Parent 896 0 R/Title(1.10.6. Mapping Usernames)/Dest[657 0 R/XYZ null 750 null]/Prev 913 0 R/Next 915 0 R>>endobj
+915 0 obj<</Parent 896 0 R/Title(1.10.7. Other Character Sets)/Dest[657 0 R/XYZ null 679 null]/Prev 914 0 R>>endobj
+916 0 obj<</Parent 894 0 R/Count -18/First 917 0 R/Last 934 0 R/Title(Chapter 2. Integrating MS Windows networks with Samba)/Dest[660 0 R/XYZ null 750 null]/Prev 896 0 R/Next 935 0 R>>endobj
+917 0 obj<</Parent 916 0 R/Title(2.1. Agenda)/Dest[660 0 R/XYZ null 702 null]/Next 918 0 R>>endobj
+918 0 obj<</Parent 916 0 R/Title(2.2. Name Resolution in a pure Unix/Linux world)/Dest[660 0 R/XYZ null 459 null]/Prev 917 0 R/Next 919 0 R>>endobj
+919 0 obj<</Parent 916 0 R/Title(2.2.1. /etc/hosts)/Dest[660 0 R/XYZ null 321 null]/Prev 918 0 R/Next 920 0 R>>endobj
+920 0 obj<</Parent 916 0 R/Title(2.2.2. /etc/resolv.conf)/Dest[663 0 R/XYZ null 431 null]/Prev 919 0 R/Next 921 0 R>>endobj
+921 0 obj<</Parent 916 0 R/Title(2.2.3. /etc/host.conf)/Dest[663 0 R/XYZ null 281 null]/Prev 920 0 R/Next 922 0 R>>endobj
+922 0 obj<</Parent 916 0 R/Title(2.2.4. /etc/nsswitch.conf)/Dest[666 0 R/XYZ null 750 null]/Prev 921 0 R/Next 923 0 R>>endobj
+923 0 obj<</Parent 916 0 R/Title(2.3. Name resolution as used within MS Windows networking)/Dest[666 0 R/XYZ null 264 null]/Prev 922 0 R/Next 924 0 R>>endobj
+924 0 obj<</Parent 916 0 R/Title(2.3.1. The NetBIOS Name Cache)/Dest[669 0 R/XYZ null 206 null]/Prev 923 0 R/Next 925 0 R>>endobj
+925 0 obj<</Parent 916 0 R/Title(2.3.2. The LMHOSTS file)/Dest[672 0 R/XYZ null 656 null]/Prev 924 0 R/Next 926 0 R>>endobj
+926 0 obj<</Parent 916 0 R/Title(2.3.3. HOSTS file)/Dest[675 0 R/XYZ null 367 null]/Prev 925 0 R/Next 927 0 R>>endobj
+927 0 obj<</Parent 916 0 R/Title(2.3.4. DNS Lookup)/Dest[675 0 R/XYZ null 256 null]/Prev 926 0 R/Next 928 0 R>>endobj
+928 0 obj<</Parent 916 0 R/Title(2.3.5. WINS Lookup)/Dest[678 0 R/XYZ null 750 null]/Prev 927 0 R/Next 929 0 R>>endobj
+929 0 obj<</Parent 916 0 R/Title(2.4. How browsing functions and how to deploy stable and dependable browsing using Samba)/Dest[678 0 R/XYZ null 525 null]/Prev 928 0 R/Next 930 0 R>>endobj
+930 0 obj<</Parent 916 0 R/Title(2.5. MS Windows security options and how to configure Samba for seemless integration)/Dest[681 0 R/XYZ null 629 null]/Prev 929 0 R/Next 931 0 R>>endobj
+931 0 obj<</Parent 916 0 R/Title(2.5.1. Use MS Windows NT as an authentication server)/Dest[684 0 R/XYZ null 577 null]/Prev 930 0 R/Next 932 0 R>>endobj
+932 0 obj<</Parent 916 0 R/Title(2.5.2. Make Samba a member of an MS Windows NT security domain)/Dest[684 0 R/XYZ null 300 null]/Prev 931 0 R/Next 933 0 R>>endobj
+933 0 obj<</Parent 916 0 R/Title(2.5.3. Configure Samba as an authentication server)/Dest[687 0 R/XYZ null 590 null]/Prev 932 0 R/Next 934 0 R>>endobj
+934 0 obj<</Parent 916 0 R/Title(2.6. Conclusions)/Dest[690 0 R/XYZ null 635 null]/Prev 933 0 R>>endobj
+935 0 obj<</Parent 894 0 R/Count -3/First 936 0 R/Last 938 0 R/Title(Chapter 3. Configuring PAM for distributed but centrally managed authentication)/Dest[693 0 R/XYZ null 750 null]/Prev 916 0 R/Next 939 0 R>>endobj
+936 0 obj<</Parent 935 0 R/Title(3.1. Samba and PAM)/Dest[693 0 R/XYZ null 702 null]/Next 937 0 R>>endobj
+937 0 obj<</Parent 935 0 R/Title(3.2. Distributed Authentication)/Dest[696 0 R/XYZ null 175 null]/Prev 936 0 R/Next 938 0 R>>endobj
+938 0 obj<</Parent 935 0 R/Title(3.3. PAM Configuration in smb.conf)/Dest[699 0 R/XYZ null 722 null]/Prev 937 0 R>>endobj
+939 0 obj<</Parent 894 0 R/Count -2/First 940 0 R/Last 941 0 R/Title(Chapter 4. Hosting a Microsoft Distributed File System tree on Samba)/Dest[702 0 R/XYZ null 750 null]/Prev 935 0 R/Next 942 0 R>>endobj
+940 0 obj<</Parent 939 0 R/Title(4.1. Instructions)/Dest[702 0 R/XYZ null 702 null]/Next 941 0 R>>endobj
+941 0 obj<</Parent 939 0 R/Title(4.1.1. Notes)/Dest[705 0 R/XYZ null 669 null]/Prev 940 0 R>>endobj
+942 0 obj<</Parent 894 0 R/Count -9/First 943 0 R/Last 951 0 R/Title(Chapter 5. UNIX Permission Bits and Windows NT Access Control Lists)/Dest[708 0 R/XYZ null 750 null]/Prev 939 0 R/Next 952 0 R>>endobj
+943 0 obj<</Parent 942 0 R/Title(5.1. Viewing and changing UNIX permissions using the NT security dialogs)/Dest[708 0 R/XYZ null 702 null]/Next 944 0 R>>endobj
+944 0 obj<</Parent 942 0 R/Title(5.2. How to view file security on a Samba share)/Dest[708 0 R/XYZ null 521 null]/Prev 943 0 R/Next 945 0 R>>endobj
+945 0 obj<</Parent 942 0 R/Title(5.3. Viewing file ownership)/Dest[708 0 R/XYZ null 344 null]/Prev 944 0 R/Next 946 0 R>>endobj
+946 0 obj<</Parent 942 0 R/Title(5.4. Viewing file or directory permissions)/Dest[711 0 R/XYZ null 682 null]/Prev 945 0 R/Next 947 0 R>>endobj
+947 0 obj<</Parent 942 0 R/Title(5.4.1. File Permissions)/Dest[711 0 R/XYZ null 439 null]/Prev 946 0 R/Next 948 0 R>>endobj
+948 0 obj<</Parent 942 0 R/Title(5.4.2. Directory Permissions)/Dest[711 0 R/XYZ null 183 null]/Prev 947 0 R/Next 949 0 R>>endobj
+949 0 obj<</Parent 942 0 R/Title(5.5. Modifying file or directory permissions)/Dest[714 0 R/XYZ null 669 null]/Prev 948 0 R/Next 950 0 R>>endobj
+950 0 obj<</Parent 942 0 R/Title(5.6. Interaction with the standard Samba create mask parameters)/Dest[714 0 R/XYZ null 228 null]/Prev 949 0 R/Next 951 0 R>>endobj
+951 0 obj<</Parent 942 0 R/Title(5.7. Interaction with the standard Samba file attribute mapping)/Dest[720 0 R/XYZ null 590 null]/Prev 950 0 R>>endobj
+952 0 obj<</Parent 894 0 R/Count -13/First 953 0 R/Last 965 0 R/Title(Chapter 6. Printing Support in Samba 2.2.x)/Dest[723 0 R/XYZ null 750 null]/Prev 942 0 R/Next 966 0 R>>endobj
+953 0 obj<</Parent 952 0 R/Title(6.1. Introduction)/Dest[723 0 R/XYZ null 726 null]/Next 954 0 R>>endobj
+954 0 obj<</Parent 952 0 R/Title(6.2. Configuration)/Dest[723 0 R/XYZ null 298 null]/Prev 953 0 R/Next 955 0 R>>endobj
+955 0 obj<</Parent 952 0 R/Title(6.2.1. Creating [print$])/Dest[726 0 R/XYZ null 689 null]/Prev 954 0 R/Next 956 0 R>>endobj
+956 0 obj<</Parent 952 0 R/Title(6.2.2. Setting Drivers for Existing Printers)/Dest[729 0 R/XYZ null 446 null]/Prev 955 0 R/Next 957 0 R>>endobj
+957 0 obj<</Parent 952 0 R/Title(6.2.3. Support a large number of printers)/Dest[732 0 R/XYZ null 682 null]/Prev 956 0 R/Next 958 0 R>>endobj
+958 0 obj<</Parent 952 0 R/Title(6.2.4. Adding New Printers via the Windows NT APW)/Dest[732 0 R/XYZ null 298 null]/Prev 957 0 R/Next 959 0 R>>endobj
+959 0 obj<</Parent 952 0 R/Title(6.2.5. Samba and Printer Ports)/Dest[735 0 R/XYZ null 682 null]/Prev 958 0 R/Next 960 0 R>>endobj
+960 0 obj<</Parent 952 0 R/Title(6.3. The Imprints Toolset)/Dest[735 0 R/XYZ null 492 null]/Prev 959 0 R/Next 961 0 R>>endobj
+961 0 obj<</Parent 952 0 R/Title(6.3.1. What is Imprints?)/Dest[735 0 R/XYZ null 381 null]/Prev 960 0 R/Next 962 0 R>>endobj
+962 0 obj<</Parent 952 0 R/Title(6.3.2. Creating Printer Driver Packages)/Dest[735 0 R/XYZ null 243 null]/Prev 961 0 R/Next 963 0 R>>endobj
+963 0 obj<</Parent 952 0 R/Title(6.3.3. The Imprints server)/Dest[735 0 R/XYZ null 145 null]/Prev 962 0 R/Next 964 0 R>>endobj
+964 0 obj<</Parent 952 0 R/Title(6.3.4. The Installation Client)/Dest[738 0 R/XYZ null 709 null]/Prev 963 0 R/Next 965 0 R>>endobj
+965 0 obj<</Parent 952 0 R/Title(6.4. Migration to from Samba 2.0.x to 2.2.x)/Dest[741 0 R/XYZ null 750 null]/Prev 964 0 R>>endobj
+966 0 obj<</Parent 894 0 R/Count -3/First 967 0 R/Last 969 0 R/Title(Chapter 7. security = domain in Samba 2.x)/Dest[744 0 R/XYZ null 750 null]/Prev 952 0 R/Next 970 0 R>>endobj
+967 0 obj<</Parent 966 0 R/Title(7.1. Joining an NT Domain with Samba 2.2)/Dest[744 0 R/XYZ null 726 null]/Next 968 0 R>>endobj
+968 0 obj<</Parent 966 0 R/Title(7.2. Samba and Windows 2000 Domains)/Dest[747 0 R/XYZ null 379 null]/Prev 967 0 R/Next 969 0 R>>endobj
+969 0 obj<</Parent 966 0 R/Title(7.3. Why is this better than security = server?)/Dest[747 0 R/XYZ null 162 null]/Prev 968 0 R>>endobj
+970 0 obj<</Parent 894 0 R/Count -14/First 971 0 R/Last 984 0 R/Title(Chapter 8. How to Configure Samba 2.2 as a Primary Domain Controller)/Dest[753 0 R/XYZ null 750 null]/Prev 966 0 R/Next 985 0 R>>endobj
+971 0 obj<</Parent 970 0 R/Title(8.1. Prerequisite Reading)/Dest[753 0 R/XYZ null 702 null]/Next 972 0 R>>endobj
+972 0 obj<</Parent 970 0 R/Title(8.2. Background)/Dest[753 0 R/XYZ null 604 null]/Prev 971 0 R/Next 973 0 R>>endobj
+973 0 obj<</Parent 970 0 R/Title(8.3. Configuring the Samba Domain Controller)/Dest[756 0 R/XYZ null 722 null]/Prev 972 0 R/Next 974 0 R>>endobj
+974 0 obj<</Parent 970 0 R/Title(8.4. Creating Machine Trust Accounts and Joining Clients to the Domain)/Dest[759 0 R/XYZ null 603 null]/Prev 973 0 R/Next 975 0 R>>endobj
+975 0 obj<</Parent 970 0 R/Title(8.4.1. Manual Creation of Machine Trust Accounts)/Dest[759 0 R/XYZ null 228 null]/Prev 974 0 R/Next 976 0 R>>endobj
+976 0 obj<</Parent 970 0 R/Title(8.4.2. "On-the-Fly" Creation of Machine Trust Accounts)/Dest[762 0 R/XYZ null 355 null]/Prev 975 0 R/Next 977 0 R>>endobj
+977 0 obj<</Parent 970 0 R/Title(8.4.3. Joining the Client to the Domain)/Dest[765 0 R/XYZ null 750 null]/Prev 976 0 R/Next 978 0 R>>endobj
+978 0 obj<</Parent 970 0 R/Title(8.5. Common Problems and Errors)/Dest[765 0 R/XYZ null 388 null]/Prev 977 0 R/Next 979 0 R>>endobj
+979 0 obj<</Parent 970 0 R/Title(8.6. System Policies and Profiles)/Dest[771 0 R/XYZ null 735 null]/Prev 978 0 R/Next 980 0 R>>endobj
+980 0 obj<</Parent 970 0 R/Title(8.7. What other help can I get?)/Dest[774 0 R/XYZ null 682 null]/Prev 979 0 R/Next 981 0 R>>endobj
+981 0 obj<</Parent 970 0 R/Title(8.8. Domain Control for Windows 9x/ME)/Dest[780 0 R/XYZ null 299 null]/Prev 980 0 R/Next 982 0 R>>endobj
+982 0 obj<</Parent 970 0 R/Title(8.8.1. Configuration Instructions: Network Logons)/Dest[783 0 R/XYZ null 273 null]/Prev 981 0 R/Next 983 0 R>>endobj
+983 0 obj<</Parent 970 0 R/Title(8.8.2. Configuration Instructions: Setting up Roaming User Profiles)/Dest[786 0 R/XYZ null 478 null]/Prev 982 0 R/Next 984 0 R>>endobj
+984 0 obj<</Parent 970 0 R/Title(8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba)/Dest[798 0 R/XYZ null 270 null]/Prev 983 0 R>>endobj
+985 0 obj<</Parent 894 0 R/Count -8/First 986 0 R/Last 993 0 R/Title(Chapter 9. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain)/Dest[807 0 R/XYZ null 750 null]/Prev 970 0 R/Next 994 0 R>>endobj
+986 0 obj<</Parent 985 0 R/Title(9.1. Prerequisite Reading)/Dest[807 0 R/XYZ null 702 null]/Next 987 0 R>>endobj
+987 0 obj<</Parent 985 0 R/Title(9.2. Background)/Dest[807 0 R/XYZ null 617 null]/Prev 986 0 R/Next 988 0 R>>endobj
+988 0 obj<</Parent 985 0 R/Title(9.3. What qualifies a Domain Controller on the network?)/Dest[807 0 R/XYZ null 235 null]/Prev 987 0 R/Next 989 0 R>>endobj
+989 0 obj<</Parent 985 0 R/Title(9.3.1. How does a Workstation find its domain controller?)/Dest[810 0 R/XYZ null 750 null]/Prev 988 0 R/Next 990 0 R>>endobj
+990 0 obj<</Parent 985 0 R/Title(9.3.2. When is the PDC needed?)/Dest[810 0 R/XYZ null 626 null]/Prev 989 0 R/Next 991 0 R>>endobj
+991 0 obj<</Parent 985 0 R/Title(9.4. Can Samba be a Backup Domain Controller?)/Dest[810 0 R/XYZ null 528 null]/Prev 990 0 R/Next 992 0 R>>endobj
+992 0 obj<</Parent 985 0 R/Title(9.5. How do I set up a Samba BDC?)/Dest[810 0 R/XYZ null 377 null]/Prev 991 0 R/Next 993 0 R>>endobj
+993 0 obj<</Parent 985 0 R/Title(9.5.1. How do I replicate the smbpasswd file?)/Dest[813 0 R/XYZ null 646 null]/Prev 992 0 R>>endobj
+994 0 obj<</Parent 894 0 R/Count -12/First 995 0 R/Last 1006 0 R/Title(Chapter 10. Storing Samba's User/Machine Account information in an LDAP Directory)/Dest[816 0 R/XYZ null 750 null]/Prev 985 0 R/Next 1007 0 R>>endobj
+995 0 obj<</Parent 994 0 R/Title(10.1. Purpose)/Dest[816 0 R/XYZ null 702 null]/Next 996 0 R>>endobj
+996 0 obj<</Parent 994 0 R/Title(10.2. Introduction)/Dest[816 0 R/XYZ null 433 null]/Prev 995 0 R/Next 997 0 R>>endobj
+997 0 obj<</Parent 994 0 R/Title(10.3. Supported LDAP Servers)/Dest[819 0 R/XYZ null 577 null]/Prev 996 0 R/Next 998 0 R>>endobj
+998 0 obj<</Parent 994 0 R/Title(10.4. Schema and Relationship to the RFC 2307 posixAccount)/Dest[819 0 R/XYZ null 465 null]/Prev 997 0 R/Next 999 0 R>>endobj
+999 0 obj<</Parent 994 0 R/Title(10.5. Configuring Samba with LDAP)/Dest[822 0 R/XYZ null 735 null]/Prev 998 0 R/Next 1000 0 R>>endobj
+1000 0 obj<</Parent 994 0 R/Title(10.5.1. OpenLDAP configuration)/Dest[822 0 R/XYZ null 705 null]/Prev 999 0 R/Next 1001 0 R>>endobj
+1001 0 obj<</Parent 994 0 R/Title(10.5.2. Configuring Samba)/Dest[825 0 R/XYZ null 750 null]/Prev 1000 0 R/Next 1002 0 R>>endobj
+1002 0 obj<</Parent 994 0 R/Title(10.6. Accounts and Groups management)/Dest[825 0 R/XYZ null 176 null]/Prev 1001 0 R/Next 1003 0 R>>endobj
+1003 0 obj<</Parent 994 0 R/Title(10.7. Security and sambaAccount)/Dest[828 0 R/XYZ null 629 null]/Prev 1002 0 R/Next 1004 0 R>>endobj
+1004 0 obj<</Parent 994 0 R/Title(10.8. LDAP specials attributes for sambaAccounts)/Dest[828 0 R/XYZ null 236 null]/Prev 1003 0 R/Next 1005 0 R>>endobj
+1005 0 obj<</Parent 994 0 R/Title(10.9. Example LDIF Entries for a sambaAccount)/Dest[831 0 R/XYZ null 207 null]/Prev 1004 0 R/Next 1006 0 R>>endobj
+1006 0 obj<</Parent 994 0 R/Title(10.10. Comments)/Dest[834 0 R/XYZ null 358 null]/Prev 1005 0 R>>endobj
+1007 0 obj<</Parent 894 0 R/Count -16/First 1008 0 R/Last 1023 0 R/Title(Chapter 11. Unified Logons between Windows NT and UNIX using Winbind)/Dest[837 0 R/XYZ null 750 null]/Prev 994 0 R/Next 1024 0 R>>endobj
+1008 0 obj<</Parent 1007 0 R/Title(11.1. Abstract)/Dest[837 0 R/XYZ null 702 null]/Next 1009 0 R>>endobj
+1009 0 obj<</Parent 1007 0 R/Title(11.2. Introduction)/Dest[837 0 R/XYZ null 565 null]/Prev 1008 0 R/Next 1010 0 R>>endobj
+1010 0 obj<</Parent 1007 0 R/Title(11.3. What Winbind Provides)/Dest[837 0 R/XYZ null 242 null]/Prev 1009 0 R/Next 1011 0 R>>endobj
+1011 0 obj<</Parent 1007 0 R/Title(11.3.1. Target Uses)/Dest[840 0 R/XYZ null 577 null]/Prev 1010 0 R/Next 1012 0 R>>endobj
+1012 0 obj<</Parent 1007 0 R/Title(11.4. How Winbind Works)/Dest[840 0 R/XYZ null 413 null]/Prev 1011 0 R/Next 1013 0 R>>endobj
+1013 0 obj<</Parent 1007 0 R/Title(11.4.1. Microsoft Remote Procedure Calls)/Dest[840 0 R/XYZ null 288 null]/Prev 1012 0 R/Next 1014 0 R>>endobj
+1014 0 obj<</Parent 1007 0 R/Title(11.4.2. Name Service Switch)/Dest[843 0 R/XYZ null 750 null]/Prev 1013 0 R/Next 1015 0 R>>endobj
+1015 0 obj<</Parent 1007 0 R/Title(11.4.3. Pluggable Authentication Modules)/Dest[843 0 R/XYZ null 309 null]/Prev 1014 0 R/Next 1016 0 R>>endobj
+1016 0 obj<</Parent 1007 0 R/Title(11.4.4. User and Group ID Allocation)/Dest[846 0 R/XYZ null 669 null]/Prev 1015 0 R/Next 1017 0 R>>endobj
+1017 0 obj<</Parent 1007 0 R/Title(11.4.5. Result Caching)/Dest[846 0 R/XYZ null 479 null]/Prev 1016 0 R/Next 1018 0 R>>endobj
+1018 0 obj<</Parent 1007 0 R/Title(11.5. Installation and Configuration)/Dest[846 0 R/XYZ null 328 null]/Prev 1017 0 R/Next 1019 0 R>>endobj
+1019 0 obj<</Parent 1007 0 R/Title(11.5.1. Introduction)/Dest[846 0 R/XYZ null 217 null]/Prev 1018 0 R/Next 1020 0 R>>endobj
+1020 0 obj<</Parent 1007 0 R/Title(11.5.2. Requirements)/Dest[849 0 R/XYZ null 577 null]/Prev 1019 0 R/Next 1021 0 R>>endobj
+1021 0 obj<</Parent 1007 0 R/Title(11.5.3. Testing Things Out)/Dest[849 0 R/XYZ null 294 null]/Prev 1020 0 R/Next 1022 0 R>>endobj
+1022 0 obj<</Parent 1007 0 R/Title(11.6. Limitations)/Dest[864 0 R/XYZ null 351 null]/Prev 1021 0 R/Next 1023 0 R>>endobj
+1023 0 obj<</Parent 1007 0 R/Title(11.7. Conclusion)/Dest[867 0 R/XYZ null 750 null]/Prev 1022 0 R>>endobj
+1024 0 obj<</Parent 894 0 R/Count -5/First 1025 0 R/Last 1029 0 R/Title(Chapter 12. OS2 Client HOWTO)/Dest[870 0 R/XYZ null 750 null]/Prev 1007 0 R/Next 1030 0 R>>endobj
+1025 0 obj<</Parent 1024 0 R/Title(12.1. FAQs)/Dest[870 0 R/XYZ null 726 null]/Next 1026 0 R>>endobj
+1026 0 obj<</Parent 1024 0 R/Title(12.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?)/Dest[870 0 R/XYZ null 696 null]/Prev 1025 0 R/Next 1027 0 R>>endobj
+1027 0 obj<</Parent 1024 0 R/Title(12.1.2. How can I configure OS/2 Warp 3 \(not Connect\), OS/2 1.2, 1.3 or 2.x for Samba?)/Dest[870 0 R/XYZ null 344 null]/Prev 1026 0 R/Next 1028 0 R>>endobj
+1028 0 obj<</Parent 1024 0 R/Title(12.1.3. Are there any other issues when OS/2 \(any version\) is used as a client?)/Dest[873 0 R/XYZ null 750 null]/Prev 1027 0 R/Next 1029 0 R>>endobj
+1029 0 obj<</Parent 1024 0 R/Title(12.1.4. How do I get printer driver download working for OS/2 clients?)/Dest[873 0 R/XYZ null 635 null]/Prev 1028 0 R>>endobj
+1030 0 obj<</Parent 894 0 R/Count -4/First 1031 0 R/Last 1034 0 R/Title(Chapter 13. HOWTO Access Samba source code via CVS)/Dest[876 0 R/XYZ null 750 null]/Prev 1024 0 R/Next 1035 0 R>>endobj
+1031 0 obj<</Parent 1030 0 R/Title(13.1. Introduction)/Dest[876 0 R/XYZ null 702 null]/Next 1032 0 R>>endobj
+1032 0 obj<</Parent 1030 0 R/Title(13.2. CVS Access to samba.org)/Dest[876 0 R/XYZ null 578 null]/Prev 1031 0 R/Next 1033 0 R>>endobj
+1033 0 obj<</Parent 1030 0 R/Title(13.2.1. Access via CVSweb)/Dest[876 0 R/XYZ null 480 null]/Prev 1032 0 R/Next 1034 0 R>>endobj
+1034 0 obj<</Parent 1030 0 R/Title(13.2.2. Access via cvs)/Dest[876 0 R/XYZ null 355 null]/Prev 1033 0 R>>endobj
+1035 0 obj<</Parent 894 0 R/Title(Index)/Dest[879 0 R/XYZ null 484 null]/Prev 1030 0 R>>endobj
+1036 0 obj<</Type/Catalog/Pages 635 0 R/Names 471 0 R/PageLayout/SinglePage/Outlines 894 0 R/OpenAction[636 0 R/XYZ null null null]/PageMode/UseOutlines/PageLabels<</Nums[0<</P(title)>>1<</S/r>>5<</S/D>>]>>>>endobj
xref
-0 1035
+0 1037
0000000000 65535 f
0000000015 00000 n
0000000244 00000 n
@@ -2329,1025 +2340,1027 @@ xref
0000002720 00000 n
0000002773 00000 n
0000002857 00000 n
-0000002888 00000 n
-0000002940 00000 n
-0000003025 00000 n
-0000003049 00000 n
-0000003095 00000 n
-0000003180 00000 n
-0000003225 00000 n
-0000003309 00000 n
-0000003354 00000 n
-0000003438 00000 n
-0000003476 00000 n
-0000003519 00000 n
-0000003604 00000 n
-0000003647 00000 n
-0000003731 00000 n
-0000003762 00000 n
-0000003816 00000 n
-0000003900 00000 n
-0000003924 00000 n
-0000003975 00000 n
-0000004060 00000 n
-0000004108 00000 n
-0000004193 00000 n
-0000004224 00000 n
-0000004342 00000 n
-0000004426 00000 n
-0000004467 00000 n
-0000004552 00000 n
-0000004593 00000 n
-0000004678 00000 n
-0000004716 00000 n
-0000004760 00000 n
-0000004845 00000 n
-0000004869 00000 n
-0000004913 00000 n
-0000004997 00000 n
-0000005039 00000 n
-0000005124 00000 n
-0000005173 00000 n
-0000005258 00000 n
-0000005307 00000 n
-0000005390 00000 n
-0000005437 00000 n
-0000005522 00000 n
-0000005568 00000 n
-0000005652 00000 n
-0000005711 00000 n
-0000005773 00000 n
-0000005858 00000 n
-0000005915 00000 n
-0000006000 00000 n
-0000006093 00000 n
-0000006177 00000 n
-0000006215 00000 n
-0000006320 00000 n
-0000006361 00000 n
-0000006445 00000 n
-0000006491 00000 n
-0000006576 00000 n
-0000006615 00000 n
-0000006700 00000 n
-0000006742 00000 n
-0000006827 00000 n
-0000006869 00000 n
-0000006954 00000 n
-0000007013 00000 n
-0000007057 00000 n
-0000007142 00000 n
-0000007166 00000 n
-0000007213 00000 n
-0000007298 00000 n
-0000007350 00000 n
-0000007435 00000 n
-0000007484 00000 n
-0000007569 00000 n
-0000007618 00000 n
-0000007702 00000 n
-0000007747 00000 n
-0000007799 00000 n
-0000007884 00000 n
-0000007932 00000 n
-0000008017 00000 n
-0000008065 00000 n
-0000008150 00000 n
-0000008214 00000 n
-0000008301 00000 n
-0000008349 00000 n
-0000008413 00000 n
-0000008500 00000 n
-0000008526 00000 n
+0000002923 00000 n
+0000003007 00000 n
+0000003045 00000 n
+0000003097 00000 n
+0000003182 00000 n
+0000003206 00000 n
+0000003252 00000 n
+0000003337 00000 n
+0000003382 00000 n
+0000003466 00000 n
+0000003511 00000 n
+0000003595 00000 n
+0000003633 00000 n
+0000003676 00000 n
+0000003761 00000 n
+0000003804 00000 n
+0000003888 00000 n
+0000003919 00000 n
+0000003973 00000 n
+0000004057 00000 n
+0000004081 00000 n
+0000004132 00000 n
+0000004217 00000 n
+0000004265 00000 n
+0000004350 00000 n
+0000004381 00000 n
+0000004499 00000 n
+0000004583 00000 n
+0000004624 00000 n
+0000004709 00000 n
+0000004750 00000 n
+0000004835 00000 n
+0000004873 00000 n
+0000004917 00000 n
+0000005002 00000 n
+0000005026 00000 n
+0000005070 00000 n
+0000005154 00000 n
+0000005196 00000 n
+0000005281 00000 n
+0000005330 00000 n
+0000005415 00000 n
+0000005464 00000 n
+0000005547 00000 n
+0000005594 00000 n
+0000005679 00000 n
+0000005725 00000 n
+0000005809 00000 n
+0000005868 00000 n
+0000005930 00000 n
+0000006015 00000 n
+0000006072 00000 n
+0000006157 00000 n
+0000006250 00000 n
+0000006334 00000 n
+0000006372 00000 n
+0000006477 00000 n
+0000006518 00000 n
+0000006602 00000 n
+0000006648 00000 n
+0000006733 00000 n
+0000006772 00000 n
+0000006857 00000 n
+0000006899 00000 n
+0000006984 00000 n
+0000007026 00000 n
+0000007111 00000 n
+0000007170 00000 n
+0000007214 00000 n
+0000007299 00000 n
+0000007323 00000 n
+0000007370 00000 n
+0000007455 00000 n
+0000007507 00000 n
+0000007592 00000 n
+0000007641 00000 n
+0000007726 00000 n
+0000007775 00000 n
+0000007859 00000 n
+0000007904 00000 n
+0000007956 00000 n
+0000008041 00000 n
+0000008089 00000 n
+0000008175 00000 n
+0000008224 00000 n
+0000008310 00000 n
+0000008374 00000 n
+0000008461 00000 n
+0000008510 00000 n
0000008574 00000 n
0000008661 00000 n
-0000008708 00000 n
-0000008795 00000 n
-0000008836 00000 n
-0000008922 00000 n
-0000008964 00000 n
-0000009006 00000 n
-0000009093 00000 n
-0000009142 00000 n
-0000009229 00000 n
-0000009276 00000 n
-0000009363 00000 n
-0000009405 00000 n
-0000009458 00000 n
-0000009545 00000 n
-0000009589 00000 n
-0000009676 00000 n
-0000009733 00000 n
-0000009820 00000 n
-0000009916 00000 n
-0000010002 00000 n
-0000010052 00000 n
-0000010099 00000 n
-0000010186 00000 n
-0000010233 00000 n
-0000010320 00000 n
-0000010369 00000 n
-0000010456 00000 n
-0000010503 00000 n
-0000010590 00000 n
-0000010640 00000 n
-0000010687 00000 n
-0000010774 00000 n
-0000010821 00000 n
-0000010906 00000 n
-0000010950 00000 n
-0000011036 00000 n
-0000011078 00000 n
-0000011164 00000 n
-0000011204 00000 n
-0000011290 00000 n
-0000011338 00000 n
-0000011424 00000 n
-0000011469 00000 n
-0000011555 00000 n
-0000011599 00000 n
-0000011685 00000 n
-0000011736 00000 n
-0000011822 00000 n
-0000011871 00000 n
-0000011957 00000 n
-0000012002 00000 n
-0000012088 00000 n
-0000012130 00000 n
-0000012216 00000 n
-0000012259 00000 n
-0000012345 00000 n
-0000012387 00000 n
-0000012473 00000 n
-0000012517 00000 n
-0000012603 00000 n
-0000012640 00000 n
-0000012726 00000 n
-0000012767 00000 n
-0000012853 00000 n
-0000012895 00000 n
-0000012981 00000 n
-0000013018 00000 n
-0000013104 00000 n
-0000013145 00000 n
-0000013231 00000 n
-0000013274 00000 n
-0000013360 00000 n
-0000013406 00000 n
-0000013492 00000 n
-0000013686 00000 n
-0000013733 00000 n
-0000013820 00000 n
-0000013869 00000 n
-0000013956 00000 n
-0000014005 00000 n
-0000014091 00000 n
-0000014133 00000 n
-0000014181 00000 n
-0000014267 00000 n
-0000014313 00000 n
-0000014400 00000 n
-0000014434 00000 n
-0000014549 00000 n
-0000014636 00000 n
-0000014662 00000 n
-0000014744 00000 n
-0000014831 00000 n
-0000014916 00000 n
-0000015003 00000 n
-0000015058 00000 n
-0000015145 00000 n
-0000015201 00000 n
-0000015288 00000 n
-0000015338 00000 n
-0000015386 00000 n
-0000015473 00000 n
+0000008687 00000 n
+0000008735 00000 n
+0000008822 00000 n
+0000008869 00000 n
+0000008956 00000 n
+0000008997 00000 n
+0000009083 00000 n
+0000009125 00000 n
+0000009167 00000 n
+0000009254 00000 n
+0000009303 00000 n
+0000009390 00000 n
+0000009437 00000 n
+0000009524 00000 n
+0000009566 00000 n
+0000009619 00000 n
+0000009706 00000 n
+0000009750 00000 n
+0000009837 00000 n
+0000009894 00000 n
+0000009981 00000 n
+0000010077 00000 n
+0000010163 00000 n
+0000010213 00000 n
+0000010260 00000 n
+0000010347 00000 n
+0000010394 00000 n
+0000010481 00000 n
+0000010530 00000 n
+0000010617 00000 n
+0000010664 00000 n
+0000010751 00000 n
+0000010801 00000 n
+0000010848 00000 n
+0000010935 00000 n
+0000010982 00000 n
+0000011067 00000 n
+0000011111 00000 n
+0000011197 00000 n
+0000011239 00000 n
+0000011325 00000 n
+0000011365 00000 n
+0000011451 00000 n
+0000011499 00000 n
+0000011585 00000 n
+0000011630 00000 n
+0000011716 00000 n
+0000011760 00000 n
+0000011846 00000 n
+0000011897 00000 n
+0000011983 00000 n
+0000012032 00000 n
+0000012118 00000 n
+0000012163 00000 n
+0000012249 00000 n
+0000012291 00000 n
+0000012377 00000 n
+0000012420 00000 n
+0000012506 00000 n
+0000012548 00000 n
+0000012634 00000 n
+0000012678 00000 n
+0000012764 00000 n
+0000012801 00000 n
+0000012887 00000 n
+0000012928 00000 n
+0000013014 00000 n
+0000013056 00000 n
+0000013142 00000 n
+0000013179 00000 n
+0000013265 00000 n
+0000013306 00000 n
+0000013392 00000 n
+0000013435 00000 n
+0000013521 00000 n
+0000013567 00000 n
+0000013653 00000 n
+0000013847 00000 n
+0000013894 00000 n
+0000013981 00000 n
+0000014030 00000 n
+0000014117 00000 n
+0000014166 00000 n
+0000014252 00000 n
+0000014294 00000 n
+0000014342 00000 n
+0000014428 00000 n
+0000014474 00000 n
+0000014561 00000 n
+0000014595 00000 n
+0000014710 00000 n
+0000014797 00000 n
+0000014823 00000 n
+0000014905 00000 n
+0000014992 00000 n
+0000015077 00000 n
+0000015164 00000 n
+0000015219 00000 n
+0000015306 00000 n
+0000015362 00000 n
+0000015449 00000 n
+0000015499 00000 n
0000015547 00000 n
0000015634 00000 n
-0000015702 00000 n
-0000015789 00000 n
-0000015843 00000 n
-0000015930 00000 n
-0000015998 00000 n
-0000016085 00000 n
+0000015708 00000 n
+0000015795 00000 n
+0000015863 00000 n
+0000015950 00000 n
+0000016004 00000 n
+0000016091 00000 n
0000016159 00000 n
0000016246 00000 n
-0000016294 00000 n
-0000016381 00000 n
-0000016438 00000 n
-0000016525 00000 n
-0000016607 00000 n
-0000016662 00000 n
-0000016749 00000 n
-0000016830 00000 n
-0000016917 00000 n
-0000016951 00000 n
-0000017003 00000 n
-0000017090 00000 n
-0000017116 00000 n
-0000017172 00000 n
-0000017259 00000 n
-0000017328 00000 n
-0000017415 00000 n
-0000017466 00000 n
-0000017553 00000 n
-0000017640 00000 n
-0000017727 00000 n
-0000017783 00000 n
-0000017870 00000 n
-0000017919 00000 n
-0000018006 00000 n
-0000018072 00000 n
-0000018124 00000 n
-0000018211 00000 n
-0000018266 00000 n
-0000018353 00000 n
-0000018400 00000 n
-0000018487 00000 n
-0000018534 00000 n
-0000018621 00000 n
-0000018671 00000 n
-0000018711 00000 n
-0000018798 00000 n
-0000018841 00000 n
-0000018928 00000 n
-0000018972 00000 n
-0000019059 00000 n
-0000019102 00000 n
-0000019189 00000 n
-0000019232 00000 n
-0000019319 00000 n
-0000019360 00000 n
-0000019447 00000 n
-0000019494 00000 n
-0000019581 00000 n
+0000016320 00000 n
+0000016407 00000 n
+0000016455 00000 n
+0000016542 00000 n
+0000016599 00000 n
+0000016686 00000 n
+0000016768 00000 n
+0000016823 00000 n
+0000016910 00000 n
+0000016991 00000 n
+0000017078 00000 n
+0000017112 00000 n
+0000017164 00000 n
+0000017251 00000 n
+0000017277 00000 n
+0000017333 00000 n
+0000017420 00000 n
+0000017489 00000 n
+0000017576 00000 n
+0000017627 00000 n
+0000017714 00000 n
+0000017801 00000 n
+0000017888 00000 n
+0000017944 00000 n
+0000018031 00000 n
+0000018080 00000 n
+0000018167 00000 n
+0000018233 00000 n
+0000018285 00000 n
+0000018372 00000 n
+0000018427 00000 n
+0000018514 00000 n
+0000018561 00000 n
+0000018648 00000 n
+0000018695 00000 n
+0000018782 00000 n
+0000018832 00000 n
+0000018872 00000 n
+0000018959 00000 n
+0000019002 00000 n
+0000019089 00000 n
+0000019133 00000 n
+0000019220 00000 n
+0000019263 00000 n
+0000019350 00000 n
+0000019393 00000 n
+0000019480 00000 n
+0000019521 00000 n
+0000019608 00000 n
0000019655 00000 n
-0000019702 00000 n
-0000019788 00000 n
-0000019814 00000 n
-0000019866 00000 n
-0000019952 00000 n
-0000019978 00000 n
-0000020032 00000 n
-0000020119 00000 n
-0000020145 00000 n
-0000020207 00000 n
-0000020294 00000 n
-0000020320 00000 n
-0000020369 00000 n
-0000020456 00000 n
-0000020482 00000 n
-0000020529 00000 n
-0000020616 00000 n
-0000020665 00000 n
-0000020752 00000 n
-0000020795 00000 n
-0000020882 00000 n
-0000020925 00000 n
-0000021011 00000 n
-0000021060 00000 n
-0000021145 00000 n
-0000021194 00000 n
-0000021279 00000 n
-0000021345 00000 n
-0000021393 00000 n
-0000021480 00000 n
-0000021526 00000 n
-0000021613 00000 n
-0000021647 00000 n
-0000021726 00000 n
-0000021813 00000 n
-0000021895 00000 n
-0000021981 00000 n
+0000019742 00000 n
+0000019816 00000 n
+0000019863 00000 n
+0000019949 00000 n
+0000019975 00000 n
+0000020027 00000 n
+0000020113 00000 n
+0000020139 00000 n
+0000020193 00000 n
+0000020280 00000 n
+0000020306 00000 n
+0000020368 00000 n
+0000020455 00000 n
+0000020481 00000 n
+0000020530 00000 n
+0000020617 00000 n
+0000020643 00000 n
+0000020690 00000 n
+0000020777 00000 n
+0000020826 00000 n
+0000020913 00000 n
+0000020956 00000 n
+0000021043 00000 n
+0000021086 00000 n
+0000021172 00000 n
+0000021221 00000 n
+0000021306 00000 n
+0000021355 00000 n
+0000021440 00000 n
+0000021506 00000 n
+0000021554 00000 n
+0000021641 00000 n
+0000021687 00000 n
+0000021774 00000 n
+0000021808 00000 n
+0000021887 00000 n
+0000021974 00000 n
0000022056 00000 n
-0000022143 00000 n
-0000022216 00000 n
-0000022303 00000 n
-0000022353 00000 n
-0000022431 00000 n
-0000022518 00000 n
-0000022544 00000 n
-0000022607 00000 n
-0000022694 00000 n
-0000022757 00000 n
-0000022844 00000 n
-0000022898 00000 n
-0000022985 00000 n
-0000023027 00000 n
-0000023068 00000 n
-0000023155 00000 n
-0000023181 00000 n
-0000023286 00000 n
-0000023392 00000 n
-0000023498 00000 n
-0000023604 00000 n
-0000023710 00000 n
-0000023816 00000 n
-0000023922 00000 n
-0000024028 00000 n
-0000024134 00000 n
-0000024240 00000 n
-0000024346 00000 n
-0000024452 00000 n
-0000024558 00000 n
-0000024664 00000 n
-0000024770 00000 n
-0000024876 00000 n
-0000024982 00000 n
-0000025088 00000 n
-0000025194 00000 n
-0000025300 00000 n
-0000025405 00000 n
-0000025511 00000 n
-0000025617 00000 n
-0000025723 00000 n
-0000025829 00000 n
-0000025935 00000 n
-0000026041 00000 n
-0000026147 00000 n
-0000026253 00000 n
-0000026359 00000 n
-0000026465 00000 n
-0000026571 00000 n
-0000026677 00000 n
-0000026783 00000 n
-0000026889 00000 n
-0000026995 00000 n
-0000027101 00000 n
-0000027207 00000 n
-0000027313 00000 n
-0000027418 00000 n
-0000027524 00000 n
-0000027630 00000 n
-0000027736 00000 n
-0000027839 00000 n
-0000027943 00000 n
-0000028321 00000 n
-0000028427 00000 n
-0000028532 00000 n
-0000028638 00000 n
-0000028744 00000 n
-0000028850 00000 n
-0000028956 00000 n
-0000029062 00000 n
-0000029168 00000 n
-0000029274 00000 n
-0000029380 00000 n
-0000029486 00000 n
-0000029591 00000 n
-0000029697 00000 n
-0000029803 00000 n
-0000029909 00000 n
-0000030015 00000 n
-0000030121 00000 n
-0000030227 00000 n
-0000030333 00000 n
-0000030439 00000 n
-0000030545 00000 n
-0000030651 00000 n
-0000030757 00000 n
-0000030863 00000 n
-0000030969 00000 n
-0000031074 00000 n
-0000031180 00000 n
-0000031286 00000 n
-0000031392 00000 n
-0000031497 00000 n
-0000031603 00000 n
-0000031709 00000 n
-0000031815 00000 n
-0000031921 00000 n
-0000032027 00000 n
-0000032133 00000 n
-0000032239 00000 n
-0000032345 00000 n
-0000032451 00000 n
-0000032557 00000 n
-0000032663 00000 n
-0000032768 00000 n
-0000032872 00000 n
-0000032976 00000 n
-0000033346 00000 n
-0000033451 00000 n
-0000033557 00000 n
-0000033663 00000 n
-0000033769 00000 n
-0000033875 00000 n
-0000033981 00000 n
-0000034087 00000 n
-0000034193 00000 n
-0000034299 00000 n
-0000034404 00000 n
-0000034510 00000 n
-0000034616 00000 n
-0000034722 00000 n
-0000034828 00000 n
-0000034934 00000 n
-0000035040 00000 n
-0000035146 00000 n
-0000035252 00000 n
-0000035358 00000 n
-0000035464 00000 n
-0000035570 00000 n
-0000035676 00000 n
-0000035781 00000 n
-0000035887 00000 n
-0000035993 00000 n
-0000036099 00000 n
-0000036205 00000 n
-0000036311 00000 n
-0000036417 00000 n
-0000036523 00000 n
-0000036629 00000 n
-0000036735 00000 n
-0000036841 00000 n
-0000036947 00000 n
-0000037053 00000 n
-0000037159 00000 n
-0000037265 00000 n
-0000037371 00000 n
-0000037477 00000 n
-0000037582 00000 n
-0000037688 00000 n
-0000037794 00000 n
-0000037899 00000 n
-0000038003 00000 n
-0000038107 00000 n
-0000038485 00000 n
-0000038590 00000 n
-0000038696 00000 n
-0000038802 00000 n
-0000038908 00000 n
-0000039014 00000 n
-0000039118 00000 n
-0000039184 00000 n
-0000039218 00000 n
-0000039252 00000 n
-0000041865 00000 n
-0000041914 00000 n
-0000041963 00000 n
-0000042012 00000 n
-0000042061 00000 n
-0000042110 00000 n
-0000042159 00000 n
-0000042208 00000 n
-0000042257 00000 n
-0000042306 00000 n
-0000042355 00000 n
-0000042404 00000 n
-0000042453 00000 n
-0000042502 00000 n
-0000042551 00000 n
-0000042600 00000 n
-0000042649 00000 n
-0000042698 00000 n
-0000042747 00000 n
-0000042796 00000 n
-0000042845 00000 n
-0000042894 00000 n
-0000042943 00000 n
-0000042992 00000 n
-0000043041 00000 n
-0000043090 00000 n
-0000043139 00000 n
-0000043188 00000 n
-0000043237 00000 n
-0000043286 00000 n
-0000043335 00000 n
-0000043384 00000 n
-0000043433 00000 n
-0000043482 00000 n
-0000043531 00000 n
-0000043580 00000 n
-0000043629 00000 n
-0000043678 00000 n
-0000043727 00000 n
-0000043776 00000 n
-0000043825 00000 n
-0000043874 00000 n
-0000043923 00000 n
-0000043972 00000 n
-0000044021 00000 n
-0000044070 00000 n
-0000044119 00000 n
-0000044168 00000 n
-0000044217 00000 n
-0000044266 00000 n
-0000044315 00000 n
-0000044364 00000 n
-0000044413 00000 n
-0000044462 00000 n
-0000044511 00000 n
-0000044560 00000 n
-0000044609 00000 n
-0000044658 00000 n
-0000044707 00000 n
-0000044756 00000 n
-0000044805 00000 n
-0000044854 00000 n
-0000044903 00000 n
-0000044952 00000 n
-0000045001 00000 n
-0000045050 00000 n
-0000045099 00000 n
-0000045148 00000 n
-0000045197 00000 n
-0000045246 00000 n
-0000045295 00000 n
-0000045344 00000 n
-0000045393 00000 n
-0000045442 00000 n
-0000045491 00000 n
-0000045540 00000 n
-0000045589 00000 n
-0000045638 00000 n
-0000045687 00000 n
-0000045736 00000 n
-0000045785 00000 n
-0000045834 00000 n
-0000045883 00000 n
-0000045932 00000 n
-0000045981 00000 n
-0000046030 00000 n
-0000046079 00000 n
-0000046128 00000 n
-0000046177 00000 n
-0000046226 00000 n
-0000046275 00000 n
-0000046324 00000 n
-0000046373 00000 n
-0000046422 00000 n
-0000046471 00000 n
-0000046520 00000 n
-0000046569 00000 n
-0000046618 00000 n
-0000046667 00000 n
-0000046716 00000 n
-0000046765 00000 n
-0000046814 00000 n
-0000046863 00000 n
-0000046912 00000 n
-0000046961 00000 n
-0000047010 00000 n
-0000047059 00000 n
-0000047108 00000 n
-0000047157 00000 n
-0000047206 00000 n
-0000047255 00000 n
-0000047304 00000 n
-0000047353 00000 n
-0000047402 00000 n
-0000047451 00000 n
-0000047500 00000 n
-0000047549 00000 n
-0000047598 00000 n
-0000047647 00000 n
-0000047696 00000 n
-0000047745 00000 n
-0000047794 00000 n
-0000047843 00000 n
-0000047892 00000 n
-0000047941 00000 n
-0000047990 00000 n
-0000048039 00000 n
-0000048088 00000 n
-0000048137 00000 n
-0000048186 00000 n
-0000048235 00000 n
-0000048284 00000 n
-0000048333 00000 n
-0000048382 00000 n
-0000048431 00000 n
-0000048480 00000 n
-0000048529 00000 n
-0000048578 00000 n
-0000048627 00000 n
-0000048676 00000 n
-0000048725 00000 n
-0000048774 00000 n
-0000048823 00000 n
-0000048872 00000 n
-0000048921 00000 n
-0000048970 00000 n
-0000049019 00000 n
-0000049068 00000 n
-0000049117 00000 n
-0000049166 00000 n
-0000049215 00000 n
-0000049264 00000 n
-0000049313 00000 n
-0000049362 00000 n
-0000049411 00000 n
-0000049460 00000 n
-0000049509 00000 n
-0000049558 00000 n
-0000049607 00000 n
-0000049656 00000 n
-0000049705 00000 n
-0000049754 00000 n
-0000050511 00000 n
-0000050667 00000 n
-0000051239 00000 n
-0000051260 00000 n
-0000051434 00000 n
-0000052596 00000 n
-0000052618 00000 n
-0000052769 00000 n
-0000054275 00000 n
-0000054297 00000 n
-0000054457 00000 n
-0000055893 00000 n
-0000055915 00000 n
-0000056093 00000 n
-0000057353 00000 n
-0000057375 00000 n
-0000057517 00000 n
-0000059101 00000 n
-0000059123 00000 n
-0000059256 00000 n
-0000061091 00000 n
-0000061113 00000 n
-0000061246 00000 n
-0000061769 00000 n
-0000061790 00000 n
-0000061951 00000 n
-0000063235 00000 n
-0000063257 00000 n
-0000063418 00000 n
-0000065173 00000 n
-0000065195 00000 n
-0000065355 00000 n
-0000067000 00000 n
-0000067022 00000 n
-0000067164 00000 n
-0000069234 00000 n
-0000069256 00000 n
-0000069398 00000 n
-0000071210 00000 n
-0000071232 00000 n
-0000071374 00000 n
-0000073099 00000 n
-0000073121 00000 n
-0000073272 00000 n
-0000075036 00000 n
-0000075058 00000 n
-0000075233 00000 n
-0000077340 00000 n
-0000077362 00000 n
-0000077522 00000 n
-0000079118 00000 n
-0000079140 00000 n
-0000079315 00000 n
-0000080810 00000 n
-0000080832 00000 n
-0000080984 00000 n
-0000081791 00000 n
-0000081812 00000 n
-0000081963 00000 n
-0000083601 00000 n
-0000083623 00000 n
-0000083788 00000 n
-0000085560 00000 n
-0000085582 00000 n
-0000085747 00000 n
-0000086640 00000 n
-0000086661 00000 n
-0000086835 00000 n
-0000088440 00000 n
-0000088462 00000 n
-0000088605 00000 n
-0000089363 00000 n
-0000089384 00000 n
-0000089567 00000 n
-0000091435 00000 n
-0000091457 00000 n
-0000091626 00000 n
-0000093480 00000 n
-0000093502 00000 n
-0000093662 00000 n
-0000095346 00000 n
-0000095368 00000 n
-0000095541 00000 n
-0000097270 00000 n
-0000097292 00000 n
-0000097443 00000 n
-0000098367 00000 n
-0000098388 00000 n
-0000098572 00000 n
-0000100397 00000 n
-0000100419 00000 n
-0000100593 00000 n
-0000102766 00000 n
-0000102788 00000 n
-0000102981 00000 n
-0000104855 00000 n
-0000104877 00000 n
-0000105061 00000 n
-0000106971 00000 n
-0000106993 00000 n
-0000107169 00000 n
-0000108970 00000 n
-0000108992 00000 n
-0000109162 00000 n
-0000110760 00000 n
-0000110782 00000 n
-0000110967 00000 n
-0000112443 00000 n
-0000112465 00000 n
-0000112658 00000 n
-0000114229 00000 n
-0000114251 00000 n
-0000114426 00000 n
-0000116206 00000 n
-0000116228 00000 n
-0000116384 00000 n
-0000117945 00000 n
-0000117967 00000 n
-0000118152 00000 n
-0000120004 00000 n
-0000120026 00000 n
-0000120192 00000 n
-0000121839 00000 n
-0000121861 00000 n
-0000122046 00000 n
-0000123995 00000 n
-0000124017 00000 n
-0000124201 00000 n
-0000125928 00000 n
-0000125950 00000 n
-0000126120 00000 n
-0000127725 00000 n
-0000127747 00000 n
-0000127916 00000 n
-0000129789 00000 n
-0000129811 00000 n
-0000129996 00000 n
-0000131860 00000 n
-0000131882 00000 n
-0000132058 00000 n
-0000134148 00000 n
-0000134170 00000 n
-0000134345 00000 n
-0000136285 00000 n
-0000136307 00000 n
-0000136483 00000 n
-0000138799 00000 n
-0000138821 00000 n
-0000138973 00000 n
-0000140953 00000 n
-0000140975 00000 n
-0000141135 00000 n
-0000143002 00000 n
-0000143024 00000 n
-0000143175 00000 n
-0000144927 00000 n
-0000144949 00000 n
-0000145081 00000 n
-0000146955 00000 n
-0000146977 00000 n
-0000147119 00000 n
-0000149190 00000 n
-0000149212 00000 n
-0000149363 00000 n
-0000151157 00000 n
-0000151179 00000 n
-0000151311 00000 n
-0000153104 00000 n
-0000153126 00000 n
-0000153249 00000 n
-0000153703 00000 n
-0000153724 00000 n
-0000153881 00000 n
-0000155494 00000 n
-0000155516 00000 n
-0000155668 00000 n
-0000157328 00000 n
-0000157350 00000 n
-0000157492 00000 n
-0000158375 00000 n
-0000158396 00000 n
-0000158581 00000 n
-0000160737 00000 n
-0000160759 00000 n
-0000160935 00000 n
-0000163120 00000 n
-0000163142 00000 n
-0000163293 00000 n
-0000164394 00000 n
-0000164416 00000 n
-0000164592 00000 n
-0000166092 00000 n
-0000166114 00000 n
-0000166299 00000 n
-0000168151 00000 n
-0000168173 00000 n
-0000168358 00000 n
-0000170265 00000 n
-0000170287 00000 n
-0000170444 00000 n
-0000171375 00000 n
-0000171396 00000 n
-0000171548 00000 n
-0000173289 00000 n
-0000173311 00000 n
-0000173453 00000 n
-0000175215 00000 n
-0000175237 00000 n
-0000175388 00000 n
-0000177279 00000 n
-0000177301 00000 n
-0000177458 00000 n
-0000179311 00000 n
-0000179333 00000 n
-0000179527 00000 n
-0000181587 00000 n
-0000181609 00000 n
-0000181784 00000 n
-0000183376 00000 n
-0000183398 00000 n
-0000183582 00000 n
-0000184932 00000 n
-0000184954 00000 n
-0000185114 00000 n
-0000186357 00000 n
-0000186379 00000 n
-0000186530 00000 n
-0000187986 00000 n
-0000188008 00000 n
-0000188169 00000 n
-0000189817 00000 n
-0000189839 00000 n
-0000189972 00000 n
-0000190442 00000 n
-0000190463 00000 n
-0000190630 00000 n
-0000192298 00000 n
-0000192320 00000 n
-0000192477 00000 n
-0000193665 00000 n
-0000193687 00000 n
-0000193844 00000 n
-0000195396 00000 n
-0000195418 00000 n
-0000195602 00000 n
-0000196407 00000 n
-0000196428 00000 n
-0000196585 00000 n
-0000202008 00000 n
-0000202030 00000 n
-0000202187 00000 n
-0000207481 00000 n
-0000207503 00000 n
-0000207660 00000 n
-0000212788 00000 n
-0000212810 00000 n
-0000212967 00000 n
-0000213737 00000 n
-0000213758 00000 n
-0000213815 00000 n
-0000213920 00000 n
-0000214098 00000 n
-0000214217 00000 n
-0000214352 00000 n
-0000214488 00000 n
-0000214636 00000 n
-0000214786 00000 n
-0000214926 00000 n
-0000215067 00000 n
-0000215220 00000 n
-0000215382 00000 n
-0000215531 00000 n
-0000215719 00000 n
-0000215852 00000 n
-0000215980 00000 n
-0000216098 00000 n
-0000216234 00000 n
-0000216376 00000 n
-0000216492 00000 n
-0000216618 00000 n
-0000216734 00000 n
-0000216925 00000 n
-0000217024 00000 n
-0000217172 00000 n
-0000217290 00000 n
-0000217414 00000 n
-0000217536 00000 n
-0000217662 00000 n
-0000217820 00000 n
-0000217950 00000 n
-0000218074 00000 n
-0000218192 00000 n
-0000218310 00000 n
-0000218429 00000 n
-0000218619 00000 n
-0000218805 00000 n
-0000218958 00000 n
-0000219121 00000 n
-0000219272 00000 n
-0000219376 00000 n
-0000219593 00000 n
-0000219699 00000 n
-0000219831 00000 n
-0000219953 00000 n
-0000220158 00000 n
-0000220263 00000 n
-0000220363 00000 n
-0000220567 00000 n
-0000220728 00000 n
-0000220876 00000 n
-0000221004 00000 n
-0000221147 00000 n
-0000221271 00000 n
-0000221400 00000 n
-0000221545 00000 n
-0000221710 00000 n
-0000221862 00000 n
-0000222042 00000 n
-0000222147 00000 n
-0000222266 00000 n
-0000222391 00000 n
-0000222536 00000 n
-0000222678 00000 n
-0000222828 00000 n
-0000222959 00000 n
-0000223085 00000 n
-0000223210 00000 n
-0000223350 00000 n
-0000223477 00000 n
-0000223608 00000 n
-0000223739 00000 n
-0000223917 00000 n
-0000224045 00000 n
-0000224181 00000 n
-0000224316 00000 n
-0000224522 00000 n
-0000224635 00000 n
-0000224751 00000 n
-0000224896 00000 n
-0000225067 00000 n
-0000225216 00000 n
+0000022142 00000 n
+0000022217 00000 n
+0000022304 00000 n
+0000022377 00000 n
+0000022464 00000 n
+0000022514 00000 n
+0000022592 00000 n
+0000022679 00000 n
+0000022705 00000 n
+0000022768 00000 n
+0000022855 00000 n
+0000022918 00000 n
+0000023005 00000 n
+0000023059 00000 n
+0000023146 00000 n
+0000023188 00000 n
+0000023229 00000 n
+0000023316 00000 n
+0000023342 00000 n
+0000023447 00000 n
+0000023553 00000 n
+0000023659 00000 n
+0000023765 00000 n
+0000023871 00000 n
+0000023977 00000 n
+0000024083 00000 n
+0000024189 00000 n
+0000024295 00000 n
+0000024401 00000 n
+0000024507 00000 n
+0000024613 00000 n
+0000024719 00000 n
+0000024825 00000 n
+0000024931 00000 n
+0000025037 00000 n
+0000025143 00000 n
+0000025249 00000 n
+0000025355 00000 n
+0000025461 00000 n
+0000025566 00000 n
+0000025672 00000 n
+0000025778 00000 n
+0000025884 00000 n
+0000025990 00000 n
+0000026096 00000 n
+0000026202 00000 n
+0000026308 00000 n
+0000026414 00000 n
+0000026520 00000 n
+0000026626 00000 n
+0000026732 00000 n
+0000026838 00000 n
+0000026944 00000 n
+0000027050 00000 n
+0000027156 00000 n
+0000027262 00000 n
+0000027368 00000 n
+0000027474 00000 n
+0000027579 00000 n
+0000027685 00000 n
+0000027791 00000 n
+0000027897 00000 n
+0000028000 00000 n
+0000028104 00000 n
+0000028482 00000 n
+0000028588 00000 n
+0000028693 00000 n
+0000028799 00000 n
+0000028905 00000 n
+0000029011 00000 n
+0000029117 00000 n
+0000029223 00000 n
+0000029329 00000 n
+0000029435 00000 n
+0000029541 00000 n
+0000029647 00000 n
+0000029752 00000 n
+0000029858 00000 n
+0000029964 00000 n
+0000030070 00000 n
+0000030176 00000 n
+0000030282 00000 n
+0000030388 00000 n
+0000030494 00000 n
+0000030600 00000 n
+0000030706 00000 n
+0000030812 00000 n
+0000030918 00000 n
+0000031024 00000 n
+0000031130 00000 n
+0000031235 00000 n
+0000031341 00000 n
+0000031447 00000 n
+0000031553 00000 n
+0000031658 00000 n
+0000031764 00000 n
+0000031870 00000 n
+0000031976 00000 n
+0000032082 00000 n
+0000032188 00000 n
+0000032294 00000 n
+0000032400 00000 n
+0000032506 00000 n
+0000032612 00000 n
+0000032718 00000 n
+0000032824 00000 n
+0000032929 00000 n
+0000033033 00000 n
+0000033137 00000 n
+0000033507 00000 n
+0000033612 00000 n
+0000033718 00000 n
+0000033824 00000 n
+0000033930 00000 n
+0000034036 00000 n
+0000034142 00000 n
+0000034248 00000 n
+0000034354 00000 n
+0000034460 00000 n
+0000034565 00000 n
+0000034671 00000 n
+0000034777 00000 n
+0000034883 00000 n
+0000034989 00000 n
+0000035095 00000 n
+0000035201 00000 n
+0000035307 00000 n
+0000035413 00000 n
+0000035519 00000 n
+0000035625 00000 n
+0000035731 00000 n
+0000035837 00000 n
+0000035942 00000 n
+0000036048 00000 n
+0000036154 00000 n
+0000036260 00000 n
+0000036366 00000 n
+0000036472 00000 n
+0000036578 00000 n
+0000036684 00000 n
+0000036790 00000 n
+0000036896 00000 n
+0000037002 00000 n
+0000037108 00000 n
+0000037214 00000 n
+0000037320 00000 n
+0000037426 00000 n
+0000037532 00000 n
+0000037638 00000 n
+0000037743 00000 n
+0000037849 00000 n
+0000037955 00000 n
+0000038060 00000 n
+0000038164 00000 n
+0000038268 00000 n
+0000038646 00000 n
+0000038751 00000 n
+0000038857 00000 n
+0000038963 00000 n
+0000039069 00000 n
+0000039175 00000 n
+0000039279 00000 n
+0000039345 00000 n
+0000039379 00000 n
+0000039413 00000 n
+0000042026 00000 n
+0000042075 00000 n
+0000042124 00000 n
+0000042173 00000 n
+0000042222 00000 n
+0000042271 00000 n
+0000042320 00000 n
+0000042369 00000 n
+0000042418 00000 n
+0000042467 00000 n
+0000042516 00000 n
+0000042565 00000 n
+0000042614 00000 n
+0000042663 00000 n
+0000042712 00000 n
+0000042761 00000 n
+0000042810 00000 n
+0000042859 00000 n
+0000042908 00000 n
+0000042957 00000 n
+0000043006 00000 n
+0000043055 00000 n
+0000043104 00000 n
+0000043153 00000 n
+0000043202 00000 n
+0000043251 00000 n
+0000043300 00000 n
+0000043349 00000 n
+0000043398 00000 n
+0000043447 00000 n
+0000043496 00000 n
+0000043545 00000 n
+0000043594 00000 n
+0000043643 00000 n
+0000043692 00000 n
+0000043741 00000 n
+0000043790 00000 n
+0000043839 00000 n
+0000043888 00000 n
+0000043937 00000 n
+0000043986 00000 n
+0000044035 00000 n
+0000044084 00000 n
+0000044133 00000 n
+0000044182 00000 n
+0000044231 00000 n
+0000044280 00000 n
+0000044329 00000 n
+0000044378 00000 n
+0000044427 00000 n
+0000044476 00000 n
+0000044525 00000 n
+0000044574 00000 n
+0000044623 00000 n
+0000044672 00000 n
+0000044721 00000 n
+0000044770 00000 n
+0000044819 00000 n
+0000044868 00000 n
+0000044917 00000 n
+0000044966 00000 n
+0000045015 00000 n
+0000045064 00000 n
+0000045113 00000 n
+0000045162 00000 n
+0000045211 00000 n
+0000045260 00000 n
+0000045309 00000 n
+0000045358 00000 n
+0000045407 00000 n
+0000045456 00000 n
+0000045505 00000 n
+0000045554 00000 n
+0000045603 00000 n
+0000045652 00000 n
+0000045701 00000 n
+0000045750 00000 n
+0000045799 00000 n
+0000045848 00000 n
+0000045897 00000 n
+0000045946 00000 n
+0000045995 00000 n
+0000046044 00000 n
+0000046093 00000 n
+0000046142 00000 n
+0000046191 00000 n
+0000046240 00000 n
+0000046289 00000 n
+0000046338 00000 n
+0000046387 00000 n
+0000046436 00000 n
+0000046485 00000 n
+0000046534 00000 n
+0000046583 00000 n
+0000046632 00000 n
+0000046681 00000 n
+0000046730 00000 n
+0000046779 00000 n
+0000046828 00000 n
+0000046877 00000 n
+0000046926 00000 n
+0000046975 00000 n
+0000047024 00000 n
+0000047073 00000 n
+0000047122 00000 n
+0000047171 00000 n
+0000047220 00000 n
+0000047269 00000 n
+0000047318 00000 n
+0000047367 00000 n
+0000047416 00000 n
+0000047465 00000 n
+0000047514 00000 n
+0000047563 00000 n
+0000047612 00000 n
+0000047661 00000 n
+0000047710 00000 n
+0000047759 00000 n
+0000047808 00000 n
+0000047857 00000 n
+0000047906 00000 n
+0000047955 00000 n
+0000048004 00000 n
+0000048053 00000 n
+0000048102 00000 n
+0000048151 00000 n
+0000048200 00000 n
+0000048249 00000 n
+0000048298 00000 n
+0000048347 00000 n
+0000048396 00000 n
+0000048445 00000 n
+0000048494 00000 n
+0000048543 00000 n
+0000048592 00000 n
+0000048641 00000 n
+0000048690 00000 n
+0000048739 00000 n
+0000048788 00000 n
+0000048837 00000 n
+0000048886 00000 n
+0000048935 00000 n
+0000048984 00000 n
+0000049033 00000 n
+0000049082 00000 n
+0000049131 00000 n
+0000049180 00000 n
+0000049229 00000 n
+0000049278 00000 n
+0000049327 00000 n
+0000049376 00000 n
+0000049425 00000 n
+0000049474 00000 n
+0000049523 00000 n
+0000049572 00000 n
+0000049621 00000 n
+0000049670 00000 n
+0000049719 00000 n
+0000049768 00000 n
+0000049817 00000 n
+0000049866 00000 n
+0000049915 00000 n
+0000050672 00000 n
+0000050828 00000 n
+0000051551 00000 n
+0000051572 00000 n
+0000051746 00000 n
+0000052908 00000 n
+0000052930 00000 n
+0000053081 00000 n
+0000054587 00000 n
+0000054609 00000 n
+0000054769 00000 n
+0000056205 00000 n
+0000056227 00000 n
+0000056405 00000 n
+0000057665 00000 n
+0000057687 00000 n
+0000057829 00000 n
+0000059413 00000 n
+0000059435 00000 n
+0000059568 00000 n
+0000061403 00000 n
+0000061425 00000 n
+0000061558 00000 n
+0000062081 00000 n
+0000062102 00000 n
+0000062263 00000 n
+0000063547 00000 n
+0000063569 00000 n
+0000063730 00000 n
+0000065485 00000 n
+0000065507 00000 n
+0000065667 00000 n
+0000067312 00000 n
+0000067334 00000 n
+0000067476 00000 n
+0000069546 00000 n
+0000069568 00000 n
+0000069710 00000 n
+0000071522 00000 n
+0000071544 00000 n
+0000071686 00000 n
+0000073411 00000 n
+0000073433 00000 n
+0000073584 00000 n
+0000075348 00000 n
+0000075370 00000 n
+0000075545 00000 n
+0000077652 00000 n
+0000077674 00000 n
+0000077834 00000 n
+0000079430 00000 n
+0000079452 00000 n
+0000079627 00000 n
+0000081122 00000 n
+0000081144 00000 n
+0000081296 00000 n
+0000082103 00000 n
+0000082124 00000 n
+0000082275 00000 n
+0000083913 00000 n
+0000083935 00000 n
+0000084100 00000 n
+0000085872 00000 n
+0000085894 00000 n
+0000086059 00000 n
+0000086952 00000 n
+0000086973 00000 n
+0000087147 00000 n
+0000088752 00000 n
+0000088774 00000 n
+0000088917 00000 n
+0000089675 00000 n
+0000089696 00000 n
+0000089879 00000 n
+0000091747 00000 n
+0000091769 00000 n
+0000091938 00000 n
+0000093792 00000 n
+0000093814 00000 n
+0000093974 00000 n
+0000095658 00000 n
+0000095680 00000 n
+0000095853 00000 n
+0000097582 00000 n
+0000097604 00000 n
+0000097755 00000 n
+0000098679 00000 n
+0000098700 00000 n
+0000098884 00000 n
+0000100709 00000 n
+0000100731 00000 n
+0000100905 00000 n
+0000103078 00000 n
+0000103100 00000 n
+0000103293 00000 n
+0000105220 00000 n
+0000105242 00000 n
+0000105426 00000 n
+0000107336 00000 n
+0000107358 00000 n
+0000107534 00000 n
+0000109335 00000 n
+0000109357 00000 n
+0000109527 00000 n
+0000111125 00000 n
+0000111147 00000 n
+0000111332 00000 n
+0000112808 00000 n
+0000112830 00000 n
+0000113023 00000 n
+0000114594 00000 n
+0000114616 00000 n
+0000114791 00000 n
+0000116571 00000 n
+0000116593 00000 n
+0000116749 00000 n
+0000118310 00000 n
+0000118332 00000 n
+0000118517 00000 n
+0000120369 00000 n
+0000120391 00000 n
+0000120557 00000 n
+0000122204 00000 n
+0000122226 00000 n
+0000122411 00000 n
+0000124360 00000 n
+0000124382 00000 n
+0000124566 00000 n
+0000126293 00000 n
+0000126315 00000 n
+0000126485 00000 n
+0000128090 00000 n
+0000128112 00000 n
+0000128281 00000 n
+0000130154 00000 n
+0000130176 00000 n
+0000130361 00000 n
+0000132225 00000 n
+0000132247 00000 n
+0000132423 00000 n
+0000134513 00000 n
+0000134535 00000 n
+0000134710 00000 n
+0000136650 00000 n
+0000136672 00000 n
+0000136848 00000 n
+0000139164 00000 n
+0000139186 00000 n
+0000139338 00000 n
+0000141318 00000 n
+0000141340 00000 n
+0000141500 00000 n
+0000143367 00000 n
+0000143389 00000 n
+0000143540 00000 n
+0000145292 00000 n
+0000145314 00000 n
+0000145446 00000 n
+0000147320 00000 n
+0000147342 00000 n
+0000147484 00000 n
+0000149555 00000 n
+0000149577 00000 n
+0000149728 00000 n
+0000151522 00000 n
+0000151544 00000 n
+0000151676 00000 n
+0000153469 00000 n
+0000153491 00000 n
+0000153614 00000 n
+0000154068 00000 n
+0000154089 00000 n
+0000154246 00000 n
+0000155880 00000 n
+0000155902 00000 n
+0000156054 00000 n
+0000157714 00000 n
+0000157736 00000 n
+0000157878 00000 n
+0000158761 00000 n
+0000158782 00000 n
+0000158967 00000 n
+0000161123 00000 n
+0000161145 00000 n
+0000161321 00000 n
+0000163506 00000 n
+0000163528 00000 n
+0000163679 00000 n
+0000164780 00000 n
+0000164802 00000 n
+0000164978 00000 n
+0000166478 00000 n
+0000166500 00000 n
+0000166685 00000 n
+0000168537 00000 n
+0000168559 00000 n
+0000168744 00000 n
+0000170651 00000 n
+0000170673 00000 n
+0000170830 00000 n
+0000171761 00000 n
+0000171782 00000 n
+0000171934 00000 n
+0000173675 00000 n
+0000173697 00000 n
+0000173839 00000 n
+0000175601 00000 n
+0000175623 00000 n
+0000175774 00000 n
+0000177665 00000 n
+0000177687 00000 n
+0000177844 00000 n
+0000179697 00000 n
+0000179719 00000 n
+0000179913 00000 n
+0000181973 00000 n
+0000181995 00000 n
+0000182170 00000 n
+0000183762 00000 n
+0000183784 00000 n
+0000183968 00000 n
+0000185318 00000 n
+0000185340 00000 n
+0000185500 00000 n
+0000186743 00000 n
+0000186765 00000 n
+0000186916 00000 n
+0000188372 00000 n
+0000188394 00000 n
+0000188555 00000 n
+0000190203 00000 n
+0000190225 00000 n
+0000190358 00000 n
+0000190828 00000 n
+0000190849 00000 n
+0000191016 00000 n
+0000192684 00000 n
+0000192706 00000 n
+0000192863 00000 n
+0000194051 00000 n
+0000194073 00000 n
+0000194230 00000 n
+0000195782 00000 n
+0000195804 00000 n
+0000195988 00000 n
+0000196793 00000 n
+0000196814 00000 n
+0000196971 00000 n
+0000202394 00000 n
+0000202416 00000 n
+0000202573 00000 n
+0000207867 00000 n
+0000207889 00000 n
+0000208046 00000 n
+0000213263 00000 n
+0000213285 00000 n
+0000213442 00000 n
+0000214212 00000 n
+0000214233 00000 n
+0000214290 00000 n
+0000214395 00000 n
+0000214573 00000 n
+0000214692 00000 n
+0000214827 00000 n
+0000214963 00000 n
+0000215111 00000 n
+0000215261 00000 n
+0000215401 00000 n
+0000215542 00000 n
+0000215695 00000 n
+0000215857 00000 n
+0000216006 00000 n
+0000216194 00000 n
+0000216327 00000 n
+0000216455 00000 n
+0000216573 00000 n
+0000216709 00000 n
+0000216851 00000 n
+0000216967 00000 n
+0000217093 00000 n
+0000217209 00000 n
+0000217400 00000 n
+0000217499 00000 n
+0000217647 00000 n
+0000217765 00000 n
+0000217889 00000 n
+0000218011 00000 n
+0000218137 00000 n
+0000218295 00000 n
+0000218425 00000 n
+0000218549 00000 n
+0000218667 00000 n
+0000218785 00000 n
+0000218904 00000 n
+0000219094 00000 n
+0000219280 00000 n
+0000219433 00000 n
+0000219596 00000 n
+0000219747 00000 n
+0000219851 00000 n
+0000220068 00000 n
+0000220174 00000 n
+0000220306 00000 n
+0000220428 00000 n
+0000220633 00000 n
+0000220738 00000 n
+0000220838 00000 n
+0000221042 00000 n
+0000221203 00000 n
+0000221351 00000 n
+0000221479 00000 n
+0000221622 00000 n
+0000221746 00000 n
+0000221875 00000 n
+0000222020 00000 n
+0000222185 00000 n
+0000222337 00000 n
+0000222517 00000 n
+0000222622 00000 n
+0000222741 00000 n
+0000222866 00000 n
+0000223011 00000 n
+0000223153 00000 n
+0000223303 00000 n
+0000223434 00000 n
+0000223560 00000 n
+0000223685 00000 n
+0000223825 00000 n
+0000223952 00000 n
+0000224083 00000 n
+0000224214 00000 n
+0000224392 00000 n
+0000224520 00000 n
+0000224656 00000 n
+0000224791 00000 n
+0000224997 00000 n
+0000225110 00000 n
+0000225226 00000 n
0000225371 00000 n
-0000225511 00000 n
-0000225643 00000 n
-0000225777 00000 n
-0000225909 00000 n
-0000226047 00000 n
-0000226197 00000 n
-0000226365 00000 n
-0000226512 00000 n
-0000226699 00000 n
-0000226812 00000 n
-0000226928 00000 n
-0000227084 00000 n
-0000227242 00000 n
-0000227373 00000 n
-0000227519 00000 n
-0000227653 00000 n
-0000227786 00000 n
-0000228007 00000 n
-0000228108 00000 n
-0000228227 00000 n
-0000228356 00000 n
-0000228515 00000 n
-0000228649 00000 n
-0000228780 00000 n
-0000228907 00000 n
-0000229046 00000 n
-0000229181 00000 n
-0000229333 00000 n
-0000229482 00000 n
-0000229587 00000 n
-0000229797 00000 n
-0000229902 00000 n
-0000230025 00000 n
-0000230157 00000 n
-0000230281 00000 n
-0000230409 00000 n
-0000230554 00000 n
-0000230686 00000 n
-0000230831 00000 n
-0000230972 00000 n
-0000231099 00000 n
-0000231240 00000 n
-0000231365 00000 n
+0000225542 00000 n
+0000225691 00000 n
+0000225846 00000 n
+0000225986 00000 n
+0000226118 00000 n
+0000226252 00000 n
+0000226384 00000 n
+0000226522 00000 n
+0000226672 00000 n
+0000226840 00000 n
+0000226987 00000 n
+0000227211 00000 n
+0000227324 00000 n
+0000227440 00000 n
+0000227596 00000 n
+0000227754 00000 n
+0000227885 00000 n
+0000228031 00000 n
+0000228165 00000 n
+0000228298 00000 n
+0000228519 00000 n
+0000228620 00000 n
+0000228739 00000 n
+0000228868 00000 n
+0000229027 00000 n
+0000229162 00000 n
+0000229295 00000 n
+0000229424 00000 n
+0000229564 00000 n
+0000229699 00000 n
+0000229851 00000 n
+0000230000 00000 n
+0000230105 00000 n
+0000230315 00000 n
+0000230420 00000 n
+0000230543 00000 n
+0000230675 00000 n
+0000230799 00000 n
+0000230927 00000 n
+0000231072 00000 n
+0000231204 00000 n
+0000231349 00000 n
0000231490 00000 n
-0000231621 00000 n
-0000231743 00000 n
-0000231850 00000 n
-0000232020 00000 n
-0000232121 00000 n
-0000232310 00000 n
-0000232504 00000 n
-0000232691 00000 n
-0000232853 00000 n
-0000233045 00000 n
-0000233154 00000 n
-0000233288 00000 n
-0000233418 00000 n
-0000233531 00000 n
-0000233626 00000 n
+0000231617 00000 n
+0000231758 00000 n
+0000231883 00000 n
+0000232008 00000 n
+0000232139 00000 n
+0000232261 00000 n
+0000232368 00000 n
+0000232538 00000 n
+0000232639 00000 n
+0000232828 00000 n
+0000233022 00000 n
+0000233209 00000 n
+0000233371 00000 n
+0000233563 00000 n
+0000233672 00000 n
+0000233806 00000 n
+0000233936 00000 n
+0000234049 00000 n
+0000234144 00000 n
trailer
-<</Size 1035/Root 1034 0 R/Info 1 0 R/ID[<e381f560a515aeaa16d567ffdefb7f4c><e381f560a515aeaa16d567ffdefb7f4c>]>>
+<</Size 1037/Root 1036 0 R/Info 1 0 R/ID[<52fc0eaf02438f2b8787e6e3d63d5828><52fc0eaf02438f2b8787e6e3d63d5828>]>>
startxref
-233841
+234359
%%EOF
diff --git a/docs/docbook/manpages/nmbd.8.sgml b/docs/docbook/manpages/nmbd.8.sgml
index 92149d503a2..d5c89064e74 100644
--- a/docs/docbook/manpages/nmbd.8.sgml
+++ b/docs/docbook/manpages/nmbd.8.sgml
@@ -177,13 +177,14 @@
<listitem><para>The -l parameter specifies a directory
into which the "log.nmbd" log file will be created
for operational data from the running
- <command>nmbd</command> server.</para>
-
- <para>The default log directory is compiled into Samba
+ <command>nmbd</command> server. The default log directory is compiled into Samba
as part of the build process. Common defaults are <filename>
/usr/local/samba/var/log.nmb</filename>, <filename>
/usr/samba/var/log.nmb</filename> or
- <filename>/var/log/log.nmb</filename>.</para></listitem>
+ <filename>/var/log/log.nmb</filename>. <emphasis>Beware:</emphasis>
+ If the directory specified does not exist, <command>nmbd</command>
+ will log to the default debug log location defined at compile time.
+ </para></listitem>
</varlistentry>
diff --git a/docs/docbook/manpages/rpcclient.1.sgml b/docs/docbook/manpages/rpcclient.1.sgml
index f32e2f9ece6..773455fb2bf 100644
--- a/docs/docbook/manpages/rpcclient.1.sgml
+++ b/docs/docbook/manpages/rpcclient.1.sgml
@@ -16,7 +16,6 @@
<refsynopsisdiv>
<cmdsynopsis>
<command>rpcclient</command>
- <arg choice="req">server</arg>
<arg choice="opt">-A authfile</arg>
<arg choice="opt">-c &lt;command string&gt;</arg>
<arg choice="opt">-d debuglevel</arg>
@@ -27,6 +26,7 @@
<arg choice="opt">-U username[%password]</arg>
<arg choice="opt">-W workgroup</arg>
<arg choice="opt">-N</arg>
+ <arg choice="req">server</arg>
</cmdsynopsis>
</refsynopsisdiv>
diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml
index ddb8a7ec9b4..85874b7198d 100644
--- a/docs/docbook/manpages/smb.conf.5.sgml
+++ b/docs/docbook/manpages/smb.conf.5.sgml
@@ -41,7 +41,7 @@
<para>Section and parameter names are not case sensitive.</para>
<para>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
@@ -84,7 +84,7 @@
printable services (used by the client to access print services
on the host running the server).</para>
- <para>Sections may be designated <emphasis>guest</emphasis> services,
+ <para>Sections may be designated <emphasis>guest</emphasis> services,
in which case no password is required to access them. A specified
UNIX <emphasis>guest account</emphasis> is used to define access
privileges in this case.</para>
@@ -213,7 +213,7 @@
the [homes] section will hide the [homes] share but make
any auto home directories visible.</para>
</refsect2>
-
+
<refsect2>
<title id="PRINTERSSECT">The [printers] section</title>
@@ -428,7 +428,7 @@
<varlistentry>
<term>%d</term>
- <listitem><para>The process id of the current server
+ <listitem><para>The process id of the current server
process.</para></listitem>
</varlistentry>
@@ -514,7 +514,7 @@
<varlistentry>
<term>short preserve case = yes/no</term>
- <listitem><para>controls if new files which conform to 8.3 syntax,
+ <listitem><para>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"
@@ -650,6 +650,7 @@
<listitem><para><link linkend="LOCALMASTER"><parameter>local master</parameter></link></para></listitem>
<listitem><para><link linkend="LOCKDIR"><parameter>lock dir</parameter></link></para></listitem>
<listitem><para><link linkend="LOCKDIRECTORY"><parameter>lock directory</parameter></link></para></listitem>
+ <listitem><para><link linkend="PIDDIRECTORY"><parameter>pid directory</parameter></link></para></listitem>
<listitem><para><link linkend="LOGFILE"><parameter>log file</parameter></link></para></listitem>
<listitem><para><link linkend="LOGLEVEL"><parameter>log level</parameter></link></para></listitem>
<listitem><para><link linkend="LOGONDRIVE"><parameter>logon drive</parameter></link></para></listitem>
@@ -681,6 +682,7 @@
<listitem><para><link linkend="NISHOMEDIR"><parameter>nis homedir</parameter></link></para></listitem>
<listitem><para><link linkend="NTPIPESUPPORT"><parameter>nt pipe support</parameter></link></para></listitem>
<listitem><para><link linkend="NTSMBSUPPORT"><parameter>nt smb support</parameter></link></para></listitem>
+ <listitem><para><link linkend="NTSTATUSSUPPORT"><parameter>nt status support</parameter></link></para></listitem>
<listitem><para><link linkend="NULLPASSWORDS"><parameter>null passwords</parameter></link></para></listitem>
<listitem><para><link linkend="OBEYPAMRESTRICTIONS"><parameter>obey pam restrictions</parameter></link></para></listitem>
<listitem><para><link linkend="OPLOCKBREAKWAITTIME"><parameter>oplock break wait time</parameter></link></para></listitem>
@@ -792,6 +794,8 @@
<listitem><para><link linkend="COPY"><parameter>copy</parameter></link></para></listitem>
<listitem><para><link linkend="CREATEMASK"><parameter>create mask</parameter></link></para></listitem>
<listitem><para><link linkend="CREATEMODE"><parameter>create mode</parameter></link></para></listitem>
+ <listitem><para><link linkend="CSCPOLICY"><parameter>csc policy</parameter></link></para></listitem>
+
<listitem><para><link linkend="DEFAULTCASE"><parameter>default case</parameter></link></para></listitem>
<listitem><para><link linkend="DEFAULTDEVMODE"><parameter>default devmode</parameter></link></para></listitem>
<listitem><para><link linkend="DELETEREADONLY"><parameter>delete readonly</parameter></link></para></listitem>
@@ -1071,8 +1075,8 @@
<emphasis>ON DEMAND</emphasis> when a user accesses the Samba server.</para>
<para>In order to use this option, <ulink url="smbd.8.html">smbd</ulink>
- must be set to <parameter>security = server</parameter> or <parameter>
- security = domain</parameter> and <parameter>add user script</parameter>
+ must <emphasis>NOT</emphasis> be set to <parameter>security = share</parameter>
+ and <parameter>add user script</parameter>
must be set to a full pathname for a script that will create a UNIX
user given one argument of <parameter>%u</parameter>, which expands into
the UNIX user name to create.</para>
@@ -1734,6 +1738,24 @@
</varlistentry>
+ <varlistentry>
+ <term><anchor id="CSCPOLICY">csc policy (S)</term>
+ <listitem><para>This stands for <emphasis>client-side caching
+ policy</emphasis>, and specifies how clients capable of offline
+ caching will cache the files in the share. The valid values
+ are: manual, documents, programs, disable.</para>
+
+ <para>These values correspond to those used on Windows
+ servers.</para>
+
+ <para>For example, shares containing roaming profiles can have
+ offline caching disabled using <command>csc policy = disable
+ </command>.</para>
+
+ <para>Default: <command>csc policy = manual</command></para>
+ <para>Example: <command>csc policy = programs</command></para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><anchor id="DEADTIME">deadtime (G)</term>
@@ -2049,19 +2071,11 @@
Windows NT user no longer exists.</para>
<para>In order to use this option, <command>smbd</command> must be
- set to <parameter>security = domain</parameter> and <parameter>delete
- user script</parameter> must be set to a full pathname for a script
- that will delete a UNIX user given one argument of <parameter>%u
- </parameter>, which expands into the UNIX user name to delete.
- <emphasis>NOTE</emphasis> that this is different to the <link
- linkend="ADDUSERSCRIPT"><parameter>add user script</parameter></link>
- which will work with the <parameter>security = server</parameter> option
- as well as <parameter>security = domain</parameter>. The reason for this
- is only when Samba is a domain member does it get the information
- on an attempted user logon that a user no longer exists. In the
- <parameter>security = server</parameter> mode a missing user
- is treated the same as an invalid password logon attempt. Deleting
- the user in this circumstance would not be a good idea.</para>
+ set to <parameter>security = domain</parameter> or <parameter>security =
+ user</parameter> and <parameter>delete user script</parameter>
+ must be set to a full pathname for a script
+ that will delete a UNIX user given one argument of <parameter>%u</parameter>,
+ which expands into the UNIX user name to delete.</para>
<para>When the Windows user attempts to access the Samba server,
at <emphasis>login</emphasis> (session setup in the SMB protocol)
@@ -4988,23 +5002,41 @@
<varlistentry>
<term><anchor id="NTSMBSUPPORT">nt smb support (G)</term>
- <listitem><para>This boolean parameter controls whether <ulink
- url="smbd.8.html">smbd(8)</ulink> will negotiate NT specific SMB
- support with Windows NT clients. Although this is a developer
- debugging option and should be left alone, benchmarking has discovered
- that Windows NT clients give faster performance with this option
- set to <constant>no</constant>. This is still being investigated.
- If this option is set to <constant>no</constant> then Samba offers
- exactly the same SMB calls that versions prior to Samba 2.0 offered.
- This information may be of use if any users are having problems
+ <listitem><para>This boolean parameter controls whether <ulink
+ url="smbd.8.html">smbd(8)</ulink> will negotiate NT specific SMB
+ support with Windows NT/2k/XP clients. Although this is a developer
+ debugging option and should be left alone, benchmarking has discovered
+ that Windows NT clients give faster performance with this option
+ set to <constant>no</constant>. This is still being investigated.
+ If this option is set to <constant>no</constant> then Samba offers
+ exactly the same SMB calls that versions prior to Samba 2.0 offered.
+ This information may be of use if any users are having problems
with NT SMB support.</para>
-
+
<para>You should not need to ever disable this parameter.</para>
<para>Default: <command>nt smb support = yes</command></para>
</listitem>
</varlistentry>
-
+
+
+
+ <varlistentry>
+ <term><anchor id="NTSTATUSSUPPORT">nt status support (G)</term>
+ <listitem><para>This boolean parameter controls whether <ulink
+ url="smbd.8.html">smbd(8)</ulink> 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 <constant>no</constant> then Samba offers
+ exactly the same DOS error codes that versions prior to Samba 2.2.3
+ reported.</para>
+
+ <para>You should not need to ever disable this parameter.</para>
+
+ <para>Default: <command>nt status support = yes</command></para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
@@ -5522,6 +5554,18 @@
<varlistentry>
+ <term><anchor id="PIDDIRECTORY">pid directory (G)</term>
+ <listitem><para>This option specifies the directory where pid
+ files will be placed. </para>
+
+ <para>Default: <command>pid directory = ${prefix}/var/locks</command></para>
+ <para>Example: <command>pid directory = /var/run/</command>
+ </para></listitem>
+ </varlistentry>
+
+
+
+ <varlistentry>
<term><anchor id="POSIXLOCKING">posix locking (S)</term>
<listitem><para>The <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
daemon maintains an database of file locks obtained by SMB clients.
@@ -5804,6 +5848,8 @@
linkend="PRINTERSSECT">[printers]</link> section above for reasons
why you might want to do this.</para>
+ <para>To use the CUPS printing interface set <command>printcap name = cups
+ </command>.</para>
<para>On System V systems that use <command>lpstat</command> to
list available printers you can use <command>printcap name = lpstat
</command> to automatically obtain lists of available printers. This
@@ -8255,8 +8301,12 @@ veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
and <filename>nss_winbind.so</filename> modules for UNIX services.
</para>
- <para>Example: <command>winbind separator = \</command></para>
- <para>Example: <command>winbind separator = +</command></para>
+ <para>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.</para>
+
+ <para>Example: <command>winbind separator = \\</command></para>
+ <para>Example: <command>winbind separator = /</command></para>
</listitem>
</varlistentry>
diff --git a/docs/docbook/manpages/smbcontrol.1.sgml b/docs/docbook/manpages/smbcontrol.1.sgml
index 05e05f4a6ab..517e2ca41f4 100644
--- a/docs/docbook/manpages/smbcontrol.1.sgml
+++ b/docs/docbook/manpages/smbcontrol.1.sgml
@@ -9,7 +9,7 @@
<refnamediv>
<refname>smbcontrol</refname>
- <refpurpose>send messages to smbd or nmbd processes</refpurpose>
+ <refpurpose>send messages to smbd, nmbd or winbindd processes</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -33,9 +33,10 @@
Samba</ulink> suite.</para>
<para><command>smbcontrol</command> is a very small program, which
- sends messages to an <ulink url="smbd.8.html">smbd(8)</ulink> or
- an <ulink url="nmbd.8.html">nmbd(8)</ulink> daemon running on the
- system.</para>
+ sends messages to an <ulink url="smbd.8.html">smbd(8)</ulink>,
+ an <ulink url="nmbd.8.html">nmbd(8)</ulink>
+ or a <ulink url="winbindd.8.html">winbindd(8)</ulink>
+ daemon running on the system.</para>
</refsect1>
@@ -81,8 +82,9 @@
message to smbd which will then close the client connections to
the named share. Note that this doesn't affect client connections
to any other shares. This message-type takes an argument of the
- share name for which client connections will be close, or the
+ share name for which client connections will be closed, or the
"*" character which will close all currently open shares.
+ This may be useful if you made changes to the access controls on the share.
This message can only be sent to <constant>smbd</constant>.</para>
<para>The <constant>debug</constant> message-type allows
@@ -105,7 +107,7 @@
collection, "off" to turn off profile stats collection, "count"
to enable only collection of count stats (time stats are
disabled), and "flush" to zero the current profile stats. This can
- be sent to any of the destinations.</para>
+ be sent to any smbd or nmbd destinations.</para>
<para>The <constant>debuglevel</constant> message-type sends
a "request debug level" message. The current debug level setting
@@ -115,18 +117,13 @@
<para>The <constant>profilelevel</constant> message-type sends
a "request profile level" message. The current profile level
setting is returned by a "profilelevel" message. This can be sent
- to any of the destinations.</para>
+ to any smbd or nmbd destinations.</para>
<para>The <constant>printer-notify</constant> message-type sends a
message to smbd which in turn sends a printer notify message to
any Windows NT clients connected to a printer. This message-type
takes an argument of the printer name to send notify messages to.
This message can only be sent to <constant>smbd</constant>.</para>
-
- <para>The <constant>close-share</constant> message-type sends a
- message to smbd which forces smbd to close the share that was
- specified as an argument. This may be useful if you made changes
- to the access controls on the share. </para>
</listitem>
</varlistentry>
diff --git a/docs/docbook/manpages/smbd.8.sgml b/docs/docbook/manpages/smbd.8.sgml
index f82e3c65950..f52da46ed1f 100644
--- a/docs/docbook/manpages/smbd.8.sgml
+++ b/docs/docbook/manpages/smbd.8.sgml
@@ -169,7 +169,9 @@
its size may be controlled by the <ulink
url="smb.conf.5.html#maxlogsize">max log size</ulink>
option in the <ulink url="smb.conf.5.html"><filename>
- smb.conf(5)</filename></ulink> file.
+ smb.conf(5)</filename></ulink> file. <emphasis>Beware:</emphasis>
+ If the directory specified does not exist, <command>smbd</command>
+ will log to the default debug log location defined at compile time.
</para>
<para>The default log directory is specified at
diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml
index 5d41651f7d3..ad962144331 100644
--- a/docs/docbook/manpages/smbpasswd.8.sgml
+++ b/docs/docbook/manpages/smbpasswd.8.sgml
@@ -13,23 +13,18 @@
</refnamediv>
<refsynopsisdiv>
+ <para>When run by root:</para>
<cmdsynopsis>
<command>smbpasswd</command>
- <arg choice="opt">-a</arg>
- <arg choice="opt">-x</arg>
- <arg choice="opt">-d</arg>
- <arg choice="opt">-e</arg>
- <arg choice="opt">-D debuglevel</arg>
- <arg choice="opt">-n</arg>
- <arg choice="opt">-r &lt;remote machine&gt;</arg>
- <arg choice="opt">-R &lt;name resolve order&gt;</arg>
- <arg choice="opt">-m</arg>
- <arg choice="opt">-j DOMAIN</arg>
- <arg choice="opt">-U username[%password]</arg>
- <arg choice="opt">-h</arg>
- <arg choice="opt">-s</arg>
- <arg choice="opt">-w pass</arg>
+ <arg choice="opt">options</arg>
<arg choice="opt">username</arg>
+ <arg choice="opt">password</arg>
+ </cmdsynopsis>
+ <para>otherwise:</para>
+ <cmdsynopsis>
+ <command>smbpasswd</command>
+ <arg choice="opt">options</arg>
+ <arg choice="opt">password</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -80,76 +75,42 @@
<title>OPTIONS</title>
<variablelist>
<varlistentry>
- <term>-a</term>
- <listitem><para>This option specifies that the username
- following should be added to the local smbpasswd file, with the
- new password typed (type &lt;Enter&gt; for the old password). This
- option is ignored if the username following already exists in
- the smbpasswd file and it is treated like a regular change
- password command. Note that the user to be added must already exist
- in the system password file (usually <filename>/etc/passwd</filename>)
- else the request to add the user will fail. </para>
-
- <para>This option is only available when running smbpasswd
- as root. </para></listitem>
+ <term>-L</term>
+ <listitem><para>Run the smbpasswd command in local mode. This
+ allows a non-root user to specify the root-only options. This
+ is used mostly in test environments where a non-root user needs
+ to make changes to the local <filename>smbpasswd</filename> file.
+ The <filename>smbpasswd</filename> file must have read/write
+ permissions for the user running the command.</para></listitem>
</varlistentry>
-
<varlistentry>
- <term>-x</term>
- <listitem><para>This option specifies that the username
- following should be deleted from the local smbpasswd file.
- </para>
-
- <para>This option is only available when running smbpasswd as
- root.</para></listitem>
+ <term>-h</term>
+ <listitem><para>This option prints the help string for
+ <command>smbpasswd</command>. </para></listitem>
</varlistentry>
-
<varlistentry>
- <term>-d</term>
- <listitem><para>This option specifies that the username following
- should be <constant>disabled</constant> in the local smbpasswd
- file. This is done by writing a <constant>'D'</constant> flag
- into the account control space in the smbpasswd file. Once this
- is done all attempts to authenticate via SMB using this username
- will fail. </para>
-
- <para>If the smbpasswd file is in the 'old' format (pre-Samba 2.0
- format) there is no space in the user's password entry to write
- this information and so the user is disabled by writing 'X' characters
- into the password space in the smbpasswd file. See <command>smbpasswd(5)
- </command> for details on the 'old' and new password file formats.
- </para>
-
- <para>This option is only available when running smbpasswd as
- root.</para></listitem>
+ <term>-s</term>
+ <listitem><para>This option causes smbpasswd to be silent (i.e.
+ not issue prompts) and to read its old and new passwords from
+ standard input, rather than from <filename>/dev/tty</filename>
+ (like the <command>passwd(1)</command> program does). This option
+ is to aid people writing scripts to drive smbpasswd</para>
+ </listitem>
</varlistentry>
-
- <varlistentry>
- <term>-e</term>
- <listitem><para>This option specifies that the username following
- should be <constant>enabled</constant> in the local smbpasswd file,
- if the account was previously disabled. If the account was not
- disabled this option has no effect. Once the account is enabled then
- the user will be able to authenticate via SMB once again. </para>
-
- <para>If the smbpasswd file is in the 'old' format, then <command>
- smbpasswd</command> will prompt for a new password for this user,
- otherwise the account will be enabled by removing the <constant>'D'
- </constant> flag from account control space in the <filename>
- smbpasswd</filename> file. See <command>smbpasswd (5)</command> for
- details on the 'old' and new password file formats. </para>
- <para>This option is only available when running smbpasswd as root.
- </para></listitem>
+ <varlistentry>
+ <term>-c smb.conf file</term>
+ <listitem><para>This option specifies that the configuration
+ file specified should be used instead of the default value
+ specified at compile time. </para></listitem>
</varlistentry>
-
-
+
<varlistentry>
<term>-D debuglevel</term>
<listitem><para><replaceable>debuglevel</replaceable> is an integer
@@ -168,28 +129,6 @@
</varlistentry>
-
- <varlistentry>
- <term>-n</term>
- <listitem><para>This option specifies that the username following
- should have their password set to null (i.e. a blank password) in
- the local smbpasswd file. This is done by writing the string "NO
- PASSWORD" as the first part of the first password stored in the
- smbpasswd file. </para>
-
- <para>Note that to allow users to logon to a Samba server once
- the password has been set to "NO PASSWORD" in the smbpasswd
- file the administrator must set the following parameter in the [global]
- section of the <filename>smb.conf</filename> file : </para>
-
- <para><command>null passwords = yes</command></para>
-
- <para>This option is only available when running smbpasswd as
- root.</para></listitem>
- </varlistentry>
-
-
-
<varlistentry>
<term>-r remote machine name</term>
<listitem><para>This option allows a user to specify what machine
@@ -221,45 +160,74 @@
<varlistentry>
- <term>-R name resolve order</term>
- <listitem><para>This option allows the user of smbpasswd to determine
- what name resolution services to use when looking up the NetBIOS
- name of the host being connected to. </para>
+ <term>-U username[%pass]</term>
+ <listitem><para>This option may only be used in conjunction
+ with the <parameter>-r</parameter> option. When changing
+ a password on a remote machine it allows the user to specify
+ the user name on that machine whose password will be changed. It
+ is present to allow users who have different user names on
+ different systems to change these passwords. The optional
+ %pass may be used to specify to old password.</para>
- <para>The options are :"lmhosts", "host", "wins" and "bcast". They cause
- names to be resolved as follows : </para>
- <itemizedlist>
- <listitem><para><constant>lmhosts</constant> : Lookup an IP
- address in the Samba lmhosts file. If the line in lmhosts has
- no name type attached to the NetBIOS name (see the <ulink
- url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
- any name type matches for lookup.</para></listitem>
-
- <listitem><para><constant>host</constant> : Do a standard host
- name to IP address resolution, using the system <filename>/etc/hosts
- </filename>, NIS, or DNS lookups. This method of name resolution
- is operating system depended for instance on IRIX or Solaris this
- may be controlled by the <filename>/etc/nsswitch.conf</filename>
- file). Note that this method is only used if the NetBIOS name
- type being queried is the 0x20 (server) name type, otherwise
- it is ignored.</para></listitem>
-
- <listitem><para><constant>wins</constant> : Query a name with
- the IP address listed in the <parameter>wins server</parameter>
- parameter. If no WINS server has been specified this method
- will be ignored.</para></listitem>
-
- <listitem><para><constant>bcast</constant> : Do a broadcast on
- each of the known local interfaces listed in the
- <parameter>interfaces</parameter> parameter. This is the least
- reliable of the name resolution methods as it depends on the
- target host being on a locally connected subnet.</para></listitem>
- </itemizedlist>
+ <para>In particular, this parameter specifies the username
+ used to create the machine account when invoked with -j</para>
+ </listitem>
+ </varlistentry>
- <para>The default order is <command>lmhosts, host, wins, bcast</command>
- and without this parameter or any entry in the
- <filename>smb.conf</filename> file the name resolution methods will
- be attempted in this order. </para></listitem>
+
+<varlistentry>
+<term><command>NOTE:</command></term>
+<listitem><para>
+<command>The following options are available only when the smbpasswd command is
+run as root or in local mode.</command>
+</para></listitem>
+</varlistentry>
+
+ <varlistentry>
+ <term>-a</term>
+ <listitem><para>This option specifies that the username
+ following should be added to the local smbpasswd file, with the
+ new password typed. This
+ option is ignored if the username specified already exists in
+ the smbpasswd file and it is treated like a regular change
+ password command. Note that the user to be added must already exist
+ in the system password file (usually <filename>/etc/passwd</filename>)
+ else the request to add the user will fail. </para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-d</term>
+ <listitem><para>This option specifies that the username following
+ should be <constant>disabled</constant> in the local smbpasswd
+ file. This is done by writing a <constant>'D'</constant> flag
+ into the account control space in the smbpasswd file. Once this
+ is done all attempts to authenticate via SMB using this username
+ will fail. </para>
+
+ <para>If the smbpasswd file is in the 'old' format (pre-Samba 2.0
+ format) there is no space in the user's password entry to write
+ this information and so the user is disabled by writing 'X' characters
+ into the password space in the smbpasswd file. See <command>smbpasswd(5)
+ </command> for details on the 'old' and new password file formats.
+ </para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-e</term>
+ <listitem><para>This option specifies that the username following
+ should be <constant>enabled</constant> in the local smbpasswd file,
+ if the account was previously disabled. If the account was not
+ disabled this option has no effect. Once the account is enabled then
+ the user will be able to authenticate via SMB once again. </para>
+
+ <para>If the smbpasswd file is in the 'old' format, then <command>
+ smbpasswd</command> will prompt for a new password for this user,
+ otherwise the account will be enabled by removing the <constant>'D'
+ </constant> flag from account control space in the <filename>
+ smbpasswd</filename> file. See <command>smbpasswd (5)</command> for
+ details on the 'old' and new password file formats. </para></listitem>
</varlistentry>
@@ -268,8 +236,48 @@
<listitem><para>This option tells smbpasswd that the account
being changed is a MACHINE account. Currently this is used
when Samba is being used as an NT Primary Domain Controller.</para>
+ </listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-n</term>
+ <listitem><para>This option specifies that the username following
+ should have their password set to null (i.e. a blank password) in
+ the local smbpasswd file. This is done by writing the string "NO
+ PASSWORD" as the first part of the first password stored in the
+ smbpasswd file. </para>
- <para>This option is only available when running smbpasswd as root.
+ <para>Note that to allow users to logon to a Samba server once
+ the password has been set to "NO PASSWORD" in the smbpasswd
+ file the administrator must set the following parameter in the [global]
+ section of the <filename>smb.conf</filename> file : </para>
+
+ <para><command>null passwords = yes</command></para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-w password</term>
+ <listitem><para>This parameter is only available is Samba
+ has been configured to use the experimental
+ <command>--with-ldapsam</command> option. The <parameter>-w</parameter>
+ switch is used to specify the password to be used with the
+ <ulink url="smb.conf.5.html#LDAPADMINDN"><parameter>ldap admin
+ dn</parameter></ulink>. Note that the password is stored in
+ the <filename>private/secrets.tdb</filename> and is keyed off
+ of the admin's DN. This means that if the value of <parameter>ldap
+ admin dn</parameter> ever changes, the password will beed to be
+ manually updated as well.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-x</term>
+ <listitem><para>This option specifies that the username
+ following should be deleted from the local smbpasswd file.
</para></listitem>
</varlistentry>
@@ -316,66 +324,50 @@
done to the PDC all users accessing the Samba server must still
have a valid UNIX account on that machine.
The <command>winbindd(8)</command> daemon can be used
- to create UNIX accounts for NT users.</para>
-
-
- <para>This option is only available when running smbpasswd as root.
- </para></listitem>
+ to create UNIX accounts for NT users.</para></listitem>
</varlistentry>
-
<varlistentry>
- <term>-U username</term>
- <listitem><para>This option may only be used in conjunction
- with the <parameter>-r</parameter> option. When changing
- a password on a remote machine it allows the user to specify
- the user name on that machine whose password will be changed. It
- is present to allow users who have different user names on
- different systems to change these passwords. </para>
-
- <para>In particular, this parameter specifies the username
- used to create the machine account when invoked with -j</para>
- </listitem>
-
+ <term>-R name resolve order</term>
+ <listitem><para>This option allows the user of smbpasswd to determine
+ what name resolution services to use when looking up the NetBIOS
+ name of the host being connected to. </para>
- </varlistentry>
-
-
- <varlistentry>
- <term>-h</term>
- <listitem><para>This option prints the help string for <command>
- smbpasswd</command>, selecting the correct one for running as root
- or as an ordinary user. </para></listitem>
- </varlistentry>
-
-
-
- <varlistentry>
- <term>-s</term>
- <listitem><para>This option causes smbpasswd to be silent (i.e.
- not issue prompts) and to read its old and new passwords from
- standard input, rather than from <filename>/dev/tty</filename>
- (like the <command>passwd(1)</command> program does). This option
- is to aid people writing scripts to drive smbpasswd</para>
- </listitem>
- </varlistentry>
+ <para>The options are :"lmhosts", "host", "wins" and "bcast". They cause
+ names to be resolved as follows : </para>
+ <itemizedlist>
+ <listitem><para><constant>lmhosts</constant> : Lookup an IP
+ address in the Samba lmhosts file. If the line in lmhosts has
+ no name type attached to the NetBIOS name (see the <ulink
+ url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
+ any name type matches for lookup.</para></listitem>
+
+ <listitem><para><constant>host</constant> : Do a standard host
+ name to IP address resolution, using the system <filename>/etc/hosts
+ </filename>, NIS, or DNS lookups. This method of name resolution
+ is operating system dependent. For instance, on IRIX or Solaris this
+ may be controlled by the <filename>/etc/nsswitch.conf</filename>
+ file). Note that this method is only used if the NetBIOS name
+ type being queried is the 0x20 (server) name type, otherwise
+ it is ignored.</para></listitem>
+
+ <listitem><para><constant>wins</constant> : Query a name with
+ the IP address listed in the <parameter>wins server</parameter>
+ parameter. If no WINS server has been specified this method
+ will be ignored.</para></listitem>
+
+ <listitem><para><constant>bcast</constant> : Do a broadcast on
+ each of the known local interfaces listed in the
+ <parameter>interfaces</parameter> parameter. This is the least
+ reliable of the name resolution methods as it depends on the
+ target host being on a locally connected subnet.</para></listitem>
+ </itemizedlist>
-
- <varlistentry>
- <term>-w password</term>
- <listitem><para>This parameter is only available is Samba
- has been configured to use the experimental
- <command>--with-ldapsam</command> option. The <parameter>-w</parameter>
- switch is used to specify the password to be used with the
- <ulink url="smb.conf.5.html#LDAPADMINDN"><parameter>ldap admin
- dn</parameter></ulink>. Note that the password is stored in
- the <filename>private/secrets.tdb</filename> and is keyed off
- of the admin's DN. This means that if the value of <parameter>ldap
- admin dn</parameter> ever changes, the password will beed to be
- manually updated as well.
- </para>
- </listitem>
+ <para>The default order is <command>lmhosts, host, wins, bcast</command>
+ and without this parameter or any entry in the
+ <filename>smb.conf</filename> file the name resolution methods will
+ be attempted in this order. </para></listitem>
</varlistentry>
@@ -387,6 +379,15 @@
to modify attributes directly in the local smbpasswd file.
</para></listitem>
</varlistentry>
+
+
+ <varlistentry>
+ <term>password</term>
+ <listitem><para>This specifies the new password. If this parameter
+ is specified you will not be prompted for the new password.
+ </para></listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
diff --git a/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml b/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml
index 4456ef01a83..53a0959c39a 100644
--- a/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml
+++ b/docs/docbook/projdoc/Samba-BDC-HOWTO.sgml
@@ -13,7 +13,7 @@
</chapterinfo>
<title>
-How to a Purely Samba Controlled Domain
+How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain
</title>
<sect1>
diff --git a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml
index 13a038cf375..c6c04ccab83 100644
--- a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml
+++ b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml
@@ -224,7 +224,7 @@ Next, include the <filename>samba.schema</filename> file in <filename>slapd.conf
The sambaAccount object contains two attributes which depend upon other schema
files. The 'uid' attribute is defined in <filename>cosine.schema</filename> and
the 'displayName' attribute is defined in the <filename>inetorgperson.schema</filename>
-file. Bother of these must be included before the <filename>samba.schema</filename> file.
+file. Both of these must be included before the <filename>samba.schema</filename> file.
</para>
<para><programlisting>
diff --git a/docs/docbook/projdoc/printer_driver2.sgml b/docs/docbook/projdoc/printer_driver2.sgml
index 4377303ffb2..84a24bcdefc 100644
--- a/docs/docbook/projdoc/printer_driver2.sgml
+++ b/docs/docbook/projdoc/printer_driver2.sgml
@@ -230,8 +230,10 @@ that all file shares are set to 'read only' by default.
Once you have created the required [print$] service and
associated subdirectories, simply log onto the Samba server using
a root (or <parameter>printer admin</parameter>) account
-from a Windows NT 4.0 client. Navigate to the "Printers" folder
-on the Samba server. You should see an initial listing of printers
+from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or
+"My Network Places" and browse for the Samba host. Once you have located
+the server, navigate to the "Printers..." folder.
+You should see an initial listing of printers
that matches the printer shares defined on your Samba host.
</para>
</sect2>
diff --git a/docs/docbook/projdoc/samba-doc.sgml b/docs/docbook/projdoc/samba-doc.sgml
index e2fc5a1eb19..28baa7f6094 100644
--- a/docs/docbook/projdoc/samba-doc.sgml
+++ b/docs/docbook/projdoc/samba-doc.sgml
@@ -31,7 +31,7 @@
<title>Abstract</title>
<para>
-<emphasis>Last Update</emphasis> : Tue Jul 31 15:58:03 CDT 2001
+<emphasis>Last Update</emphasis> : Mon Apr 1 08:47:26 CST 2002
</para>
<para>
@@ -44,6 +44,13 @@ url="mailto:jerry@samba.org">jerry@samba.org</ulink>.
</para>
<para>
+This documentation is distributed under the GNU General Public License (GPL)
+version 2. A copy of the license is included with the Samba source
+distribution. A copy can be found on-line at <ulink
+url="http://www.fsf.org/licenses/gpl.txt">http://www.fsf.org/licenses/gpl.txt</ulink>
+</para>
+
+<para>
Cheers, jerry
</para>
diff --git a/docs/htmldocs/Samba-BDC-HOWTO.html b/docs/htmldocs/Samba-BDC-HOWTO.html
index 0847335fe66..fd83c4e09a3 100644
--- a/docs/htmldocs/Samba-BDC-HOWTO.html
+++ b/docs/htmldocs/Samba-BDC-HOWTO.html
@@ -1,7 +1,7 @@
<HTML
><HEAD
><TITLE
->How to a Purely Samba Controlled Domain</TITLE
+>How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
@@ -20,7 +20,7 @@ CLASS="TITLEPAGE"
CLASS="TITLE"
><A
NAME="SAMBA-BDC"
->How to a Purely Samba Controlled Domain</A
+>How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</A
></H1
><HR></DIV
><DIV
diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html
index 8009bb8b86f..94622622cf4 100644
--- a/docs/htmldocs/Samba-HOWTO-Collection.html
+++ b/docs/htmldocs/Samba-HOWTO-Collection.html
@@ -40,7 +40,7 @@ NAME="AEN8"
><P
><EM
>Last Update</EM
-> : Tue Jul 31 15:58:03 CDT 2001</P
+> : Mon Apr 1 08:47:26 CST 2002</P
><P
>This book is a collection of HOWTOs added to Samba documentation over the years.
I try to ensure that all are current, but sometimes the is a larger job
@@ -56,6 +56,14 @@ TARGET="_top"
>jerry@samba.org</A
>.</P
><P
+>This documentation is distributed under the GNU General Public License (GPL)
+version 2. A copy of the license is included with the Samba source
+distribution. A copy can be found on-line at <A
+HREF="http://www.fsf.org/licenses/gpl.txt"
+TARGET="_top"
+>http://www.fsf.org/licenses/gpl.txt</A
+></P
+><P
>Cheers, jerry</P
><DIV
CLASS="TOC"
@@ -73,27 +81,27 @@ HREF="#INSTALL"
><DL
><DT
>1.1. <A
-HREF="#AEN18"
+HREF="#AEN20"
>Step 0: Read the man pages</A
></DT
><DT
>1.2. <A
-HREF="#AEN26"
+HREF="#AEN28"
>Step 1: Building the Binaries</A
></DT
><DT
>1.3. <A
-HREF="#AEN54"
+HREF="#AEN56"
>Step 2: The all important step</A
></DT
><DT
>1.4. <A
-HREF="#AEN58"
+HREF="#AEN60"
>Step 3: Create the smb configuration file.</A
></DT
><DT
>1.5. <A
-HREF="#AEN72"
+HREF="#AEN74"
>Step 4: Test your config file with
<B
CLASS="COMMAND"
@@ -102,80 +110,80 @@ CLASS="COMMAND"
></DT
><DT
>1.6. <A
-HREF="#AEN78"
+HREF="#AEN80"
>Step 5: Starting the smbd and nmbd</A
></DT
><DD
><DL
><DT
>1.6.1. <A
-HREF="#AEN88"
+HREF="#AEN90"
>Step 5a: Starting from inetd.conf</A
></DT
><DT
>1.6.2. <A
-HREF="#AEN117"
+HREF="#AEN119"
>Step 5b. Alternative: starting it as a daemon</A
></DT
></DL
></DD
><DT
>1.7. <A
-HREF="#AEN133"
+HREF="#AEN135"
>Step 6: Try listing the shares available on your
server</A
></DT
><DT
>1.8. <A
-HREF="#AEN142"
+HREF="#AEN144"
>Step 7: Try connecting with the unix client</A
></DT
><DT
>1.9. <A
-HREF="#AEN158"
+HREF="#AEN160"
>Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT,
Win2k, OS/2, etc... client</A
></DT
><DT
>1.10. <A
-HREF="#AEN172"
+HREF="#AEN174"
>What If Things Don't Work?</A
></DT
><DD
><DL
><DT
>1.10.1. <A
-HREF="#AEN177"
+HREF="#AEN179"
>Diagnosing Problems</A
></DT
><DT
>1.10.2. <A
-HREF="#AEN181"
+HREF="#AEN183"
>Scope IDs</A
></DT
><DT
>1.10.3. <A
-HREF="#AEN184"
+HREF="#AEN186"
>Choosing the Protocol Level</A
></DT
><DT
>1.10.4. <A
-HREF="#AEN193"
+HREF="#AEN195"
>Printing from UNIX to a Client PC</A
></DT
><DT
>1.10.5. <A
-HREF="#AEN197"
+HREF="#AEN199"
>Locking</A
></DT
><DT
>1.10.6. <A
-HREF="#AEN207"
+HREF="#AEN209"
>Mapping Usernames</A
></DT
><DT
>1.10.7. <A
-HREF="#AEN210"
+HREF="#AEN212"
>Other Character Sets</A
></DT
></DL
@@ -191,19 +199,19 @@ HREF="#INTEGRATE-MS-NETWORKS"
><DL
><DT
>2.1. <A
-HREF="#AEN224"
+HREF="#AEN226"
>Agenda</A
></DT
><DT
>2.2. <A
-HREF="#AEN246"
+HREF="#AEN248"
>Name Resolution in a pure Unix/Linux world</A
></DT
><DD
><DL
><DT
>2.2.1. <A
-HREF="#AEN262"
+HREF="#AEN264"
><TT
CLASS="FILENAME"
>/etc/hosts</TT
@@ -211,7 +219,7 @@ CLASS="FILENAME"
></DT
><DT
>2.2.2. <A
-HREF="#AEN278"
+HREF="#AEN280"
><TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
@@ -219,7 +227,7 @@ CLASS="FILENAME"
></DT
><DT
>2.2.3. <A
-HREF="#AEN289"
+HREF="#AEN291"
><TT
CLASS="FILENAME"
>/etc/host.conf</TT
@@ -227,7 +235,7 @@ CLASS="FILENAME"
></DT
><DT
>2.2.4. <A
-HREF="#AEN297"
+HREF="#AEN299"
><TT
CLASS="FILENAME"
>/etc/nsswitch.conf</TT
@@ -237,47 +245,47 @@ CLASS="FILENAME"
></DD
><DT
>2.3. <A
-HREF="#AEN309"
+HREF="#AEN311"
>Name resolution as used within MS Windows networking</A
></DT
><DD
><DL
><DT
>2.3.1. <A
-HREF="#AEN321"
+HREF="#AEN323"
>The NetBIOS Name Cache</A
></DT
><DT
>2.3.2. <A
-HREF="#AEN326"
+HREF="#AEN328"
>The LMHOSTS file</A
></DT
><DT
>2.3.3. <A
-HREF="#AEN334"
+HREF="#AEN336"
>HOSTS file</A
></DT
><DT
>2.3.4. <A
-HREF="#AEN339"
+HREF="#AEN341"
>DNS Lookup</A
></DT
><DT
>2.3.5. <A
-HREF="#AEN342"
+HREF="#AEN344"
>WINS Lookup</A
></DT
></DL
></DD
><DT
>2.4. <A
-HREF="#AEN354"
+HREF="#AEN356"
>How browsing functions and how to deploy stable and
dependable browsing using Samba</A
></DT
><DT
>2.5. <A
-HREF="#AEN364"
+HREF="#AEN366"
>MS Windows security options and how to configure
Samba for seemless integration</A
></DT
@@ -285,29 +293,29 @@ Samba for seemless integration</A
><DL
><DT
>2.5.1. <A
-HREF="#AEN392"
+HREF="#AEN394"
>Use MS Windows NT as an authentication server</A
></DT
><DT
>2.5.2. <A
-HREF="#AEN400"
+HREF="#AEN402"
>Make Samba a member of an MS Windows NT security domain</A
></DT
><DT
>2.5.3. <A
-HREF="#AEN417"
+HREF="#AEN419"
>Configure Samba as an authentication server</A
></DT
><DD
><DL
><DT
>2.5.3.1. <A
-HREF="#AEN424"
+HREF="#AEN426"
>Users</A
></DT
><DT
>2.5.3.2. <A
-HREF="#AEN429"
+HREF="#AEN431"
>MS Windows NT Machine Accounts</A
></DT
></DL
@@ -316,7 +324,7 @@ HREF="#AEN429"
></DD
><DT
>2.6. <A
-HREF="#AEN434"
+HREF="#AEN436"
>Conclusions</A
></DT
></DL
@@ -331,17 +339,17 @@ managed authentication</A
><DL
><DT
>3.1. <A
-HREF="#AEN455"
+HREF="#AEN457"
>Samba and PAM</A
></DT
><DT
>3.2. <A
-HREF="#AEN499"
+HREF="#AEN501"
>Distributed Authentication</A
></DT
><DT
>3.3. <A
-HREF="#AEN506"
+HREF="#AEN508"
>PAM Configuration in smb.conf</A
></DT
></DL
@@ -355,14 +363,14 @@ HREF="#MSDFS"
><DL
><DT
>4.1. <A
-HREF="#AEN526"
+HREF="#AEN528"
>Instructions</A
></DT
><DD
><DL
><DT
>4.1.1. <A
-HREF="#AEN561"
+HREF="#AEN563"
>Notes</A
></DT
></DL
@@ -378,53 +386,53 @@ HREF="#UNIX-PERMISSIONS"
><DL
><DT
>5.1. <A
-HREF="#AEN581"
+HREF="#AEN583"
>Viewing and changing UNIX permissions using the NT
security dialogs</A
></DT
><DT
>5.2. <A
-HREF="#AEN590"
+HREF="#AEN592"
>How to view file security on a Samba share</A
></DT
><DT
>5.3. <A
-HREF="#AEN601"
+HREF="#AEN603"
>Viewing file ownership</A
></DT
><DT
>5.4. <A
-HREF="#AEN621"
+HREF="#AEN623"
>Viewing file or directory permissions</A
></DT
><DD
><DL
><DT
>5.4.1. <A
-HREF="#AEN636"
+HREF="#AEN638"
>File Permissions</A
></DT
><DT
>5.4.2. <A
-HREF="#AEN650"
+HREF="#AEN652"
>Directory Permissions</A
></DT
></DL
></DD
><DT
>5.5. <A
-HREF="#AEN657"
+HREF="#AEN659"
>Modifying file or directory permissions</A
></DT
><DT
>5.6. <A
-HREF="#AEN679"
+HREF="#AEN681"
>Interaction with the standard Samba create mask
parameters</A
></DT
><DT
>5.7. <A
-HREF="#AEN743"
+HREF="#AEN745"
>Interaction with the standard Samba file attribute
mapping</A
></DT
@@ -439,75 +447,75 @@ HREF="#PRINTING"
><DL
><DT
>6.1. <A
-HREF="#AEN764"
+HREF="#AEN766"
>Introduction</A
></DT
><DT
>6.2. <A
-HREF="#AEN786"
+HREF="#AEN788"
>Configuration</A
></DT
><DD
><DL
><DT
>6.2.1. <A
-HREF="#AEN797"
+HREF="#AEN799"
>Creating [print$]</A
></DT
><DT
>6.2.2. <A
-HREF="#AEN832"
+HREF="#AEN834"
>Setting Drivers for Existing Printers</A
></DT
><DT
>6.2.3. <A
-HREF="#AEN849"
+HREF="#AEN851"
>Support a large number of printers</A
></DT
><DT
>6.2.4. <A
-HREF="#AEN860"
+HREF="#AEN862"
>Adding New Printers via the Windows NT APW</A
></DT
><DT
>6.2.5. <A
-HREF="#AEN885"
+HREF="#AEN887"
>Samba and Printer Ports</A
></DT
></DL
></DD
><DT
>6.3. <A
-HREF="#AEN893"
+HREF="#AEN895"
>The Imprints Toolset</A
></DT
><DD
><DL
><DT
>6.3.1. <A
-HREF="#AEN897"
+HREF="#AEN899"
>What is Imprints?</A
></DT
><DT
>6.3.2. <A
-HREF="#AEN907"
+HREF="#AEN909"
>Creating Printer Driver Packages</A
></DT
><DT
>6.3.3. <A
-HREF="#AEN910"
+HREF="#AEN912"
>The Imprints server</A
></DT
><DT
>6.3.4. <A
-HREF="#AEN914"
+HREF="#AEN916"
>The Installation Client</A
></DT
></DL
></DD
><DT
>6.4. <A
-HREF="#AEN936"
+HREF="#AEN938"
><A
NAME="MIGRATION"
></A
@@ -524,17 +532,17 @@ HREF="#DOMAIN-SECURITY"
><DL
><DT
>7.1. <A
-HREF="#AEN990"
+HREF="#AEN992"
>Joining an NT Domain with Samba 2.2</A
></DT
><DT
>7.2. <A
-HREF="#AEN1054"
+HREF="#AEN1056"
>Samba and Windows 2000 Domains</A
></DT
><DT
>7.3. <A
-HREF="#AEN1059"
+HREF="#AEN1061"
>Why is this better than security = server?</A
></DT
></DL
@@ -548,22 +556,22 @@ HREF="#SAMBA-PDC"
><DL
><DT
>8.1. <A
-HREF="#AEN1092"
+HREF="#AEN1094"
>Prerequisite Reading</A
></DT
><DT
>8.2. <A
-HREF="#AEN1098"
+HREF="#AEN1100"
>Background</A
></DT
><DT
>8.3. <A
-HREF="#AEN1137"
+HREF="#AEN1139"
>Configuring the Samba Domain Controller</A
></DT
><DT
>8.4. <A
-HREF="#AEN1180"
+HREF="#AEN1182"
>Creating Machine Trust Accounts and Joining Clients to the
Domain</A
></DT
@@ -571,88 +579,88 @@ Domain</A
><DL
><DT
>8.4.1. <A
-HREF="#AEN1199"
+HREF="#AEN1201"
>Manual Creation of Machine Trust Accounts</A
></DT
><DT
>8.4.2. <A
-HREF="#AEN1234"
+HREF="#AEN1236"
>"On-the-Fly" Creation of Machine Trust Accounts</A
></DT
><DT
>8.4.3. <A
-HREF="#AEN1243"
+HREF="#AEN1245"
>Joining the Client to the Domain</A
></DT
></DL
></DD
><DT
>8.5. <A
-HREF="#AEN1258"
+HREF="#AEN1260"
>Common Problems and Errors</A
></DT
><DT
>8.6. <A
-HREF="#AEN1306"
+HREF="#AEN1308"
>System Policies and Profiles</A
></DT
><DT
>8.7. <A
-HREF="#AEN1350"
+HREF="#AEN1352"
>What other help can I get?</A
></DT
><DT
>8.8. <A
-HREF="#AEN1464"
+HREF="#AEN1466"
>Domain Control for Windows 9x/ME</A
></DT
><DD
><DL
><DT
>8.8.1. <A
-HREF="#AEN1490"
+HREF="#AEN1492"
>Configuration Instructions: Network Logons</A
></DT
><DT
>8.8.2. <A
-HREF="#AEN1509"
+HREF="#AEN1511"
>Configuration Instructions: Setting up Roaming User Profiles</A
></DT
><DD
><DL
><DT
>8.8.2.1. <A
-HREF="#AEN1517"
+HREF="#AEN1519"
>Windows NT Configuration</A
></DT
><DT
>8.8.2.2. <A
-HREF="#AEN1525"
+HREF="#AEN1527"
>Windows 9X Configuration</A
></DT
><DT
>8.8.2.3. <A
-HREF="#AEN1533"
+HREF="#AEN1535"
>Win9X and WinNT Configuration</A
></DT
><DT
>8.8.2.4. <A
-HREF="#AEN1540"
+HREF="#AEN1542"
>Windows 9X Profile Setup</A
></DT
><DT
>8.8.2.5. <A
-HREF="#AEN1576"
+HREF="#AEN1578"
>Windows NT Workstation 4.0</A
></DT
><DT
>8.8.2.6. <A
-HREF="#AEN1589"
+HREF="#AEN1591"
>Windows NT Server</A
></DT
><DT
>8.8.2.7. <A
-HREF="#AEN1592"
+HREF="#AEN1594"
>Sharing Profiles between W95 and NT Workstation 4.0</A
></DT
></DL
@@ -661,7 +669,7 @@ HREF="#AEN1592"
></DD
><DT
>8.9. <A
-HREF="#AEN1602"
+HREF="#AEN1604"
>DOMAIN_CONTROL.txt : Windows NT Domain Control &#38; Samba</A
></DT
></DL
@@ -669,54 +677,54 @@ HREF="#AEN1602"
><DT
>9. <A
HREF="#SAMBA-BDC"
->How to a Purely Samba Controlled Domain</A
+>How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</A
></DT
><DD
><DL
><DT
>9.1. <A
-HREF="#AEN1638"
+HREF="#AEN1640"
>Prerequisite Reading</A
></DT
><DT
>9.2. <A
-HREF="#AEN1642"
+HREF="#AEN1644"
>Background</A
></DT
><DT
>9.3. <A
-HREF="#AEN1650"
+HREF="#AEN1652"
>What qualifies a Domain Controller on the network?</A
></DT
><DD
><DL
><DT
>9.3.1. <A
-HREF="#AEN1653"
+HREF="#AEN1655"
>How does a Workstation find its domain controller?</A
></DT
><DT
>9.3.2. <A
-HREF="#AEN1656"
+HREF="#AEN1658"
>When is the PDC needed?</A
></DT
></DL
></DD
><DT
>9.4. <A
-HREF="#AEN1659"
+HREF="#AEN1661"
>Can Samba be a Backup Domain Controller?</A
></DT
><DT
>9.5. <A
-HREF="#AEN1663"
+HREF="#AEN1665"
>How do I set up a Samba BDC?</A
></DT
><DD
><DL
><DT
>9.5.1. <A
-HREF="#AEN1679"
+HREF="#AEN1681"
>How do I replicate the smbpasswd file?</A
></DT
></DL
@@ -732,66 +740,66 @@ HREF="#SAMBA-LDAP-HOWTO"
><DL
><DT
>10.1. <A
-HREF="#AEN1700"
+HREF="#AEN1702"
>Purpose</A
></DT
><DT
>10.2. <A
-HREF="#AEN1720"
+HREF="#AEN1722"
>Introduction</A
></DT
><DT
>10.3. <A
-HREF="#AEN1749"
+HREF="#AEN1751"
>Supported LDAP Servers</A
></DT
><DT
>10.4. <A
-HREF="#AEN1754"
+HREF="#AEN1756"
>Schema and Relationship to the RFC 2307 posixAccount</A
></DT
><DT
>10.5. <A
-HREF="#AEN1766"
+HREF="#AEN1768"
>Configuring Samba with LDAP</A
></DT
><DD
><DL
><DT
>10.5.1. <A
-HREF="#AEN1768"
+HREF="#AEN1770"
>OpenLDAP configuration</A
></DT
><DT
>10.5.2. <A
-HREF="#AEN1785"
+HREF="#AEN1787"
>Configuring Samba</A
></DT
></DL
></DD
><DT
>10.6. <A
-HREF="#AEN1813"
+HREF="#AEN1815"
>Accounts and Groups management</A
></DT
><DT
>10.7. <A
-HREF="#AEN1818"
+HREF="#AEN1820"
>Security and sambaAccount</A
></DT
><DT
>10.8. <A
-HREF="#AEN1838"
+HREF="#AEN1840"
>LDAP specials attributes for sambaAccounts</A
></DT
><DT
>10.9. <A
-HREF="#AEN1908"
+HREF="#AEN1910"
>Example LDIF Entries for a sambaAccount</A
></DT
><DT
>10.10. <A
-HREF="#AEN1916"
+HREF="#AEN1918"
>Comments</A
></DT
></DL
@@ -805,94 +813,94 @@ HREF="#WINBIND"
><DL
><DT
>11.1. <A
-HREF="#AEN1945"
+HREF="#AEN1947"
>Abstract</A
></DT
><DT
>11.2. <A
-HREF="#AEN1949"
+HREF="#AEN1951"
>Introduction</A
></DT
><DT
>11.3. <A
-HREF="#AEN1962"
+HREF="#AEN1964"
>What Winbind Provides</A
></DT
><DD
><DL
><DT
>11.3.1. <A
-HREF="#AEN1969"
+HREF="#AEN1971"
>Target Uses</A
></DT
></DL
></DD
><DT
>11.4. <A
-HREF="#AEN1973"
+HREF="#AEN1975"
>How Winbind Works</A
></DT
><DD
><DL
><DT
>11.4.1. <A
-HREF="#AEN1978"
+HREF="#AEN1980"
>Microsoft Remote Procedure Calls</A
></DT
><DT
>11.4.2. <A
-HREF="#AEN1982"
+HREF="#AEN1984"
>Name Service Switch</A
></DT
><DT
>11.4.3. <A
-HREF="#AEN1998"
+HREF="#AEN2000"
>Pluggable Authentication Modules</A
></DT
><DT
>11.4.4. <A
-HREF="#AEN2006"
+HREF="#AEN2008"
>User and Group ID Allocation</A
></DT
><DT
>11.4.5. <A
-HREF="#AEN2010"
+HREF="#AEN2012"
>Result Caching</A
></DT
></DL
></DD
><DT
>11.5. <A
-HREF="#AEN2013"
+HREF="#AEN2015"
>Installation and Configuration</A
></DT
><DD
><DL
><DT
>11.5.1. <A
-HREF="#AEN2018"
+HREF="#AEN2020"
>Introduction</A
></DT
><DT
>11.5.2. <A
-HREF="#AEN2031"
+HREF="#AEN2033"
>Requirements</A
></DT
><DT
>11.5.3. <A
-HREF="#AEN2045"
+HREF="#AEN2047"
>Testing Things Out</A
></DT
><DD
><DL
><DT
>11.5.3.1. <A
-HREF="#AEN2056"
+HREF="#AEN2058"
>Configure and compile SAMBA</A
></DT
><DT
>11.5.3.2. <A
-HREF="#AEN2075"
+HREF="#AEN2077"
>Configure <TT
CLASS="FILENAME"
>nsswitch.conf</TT
@@ -901,22 +909,22 @@ winbind libraries</A
></DT
><DT
>11.5.3.3. <A
-HREF="#AEN2100"
+HREF="#AEN2102"
>Configure smb.conf</A
></DT
><DT
>11.5.3.4. <A
-HREF="#AEN2116"
+HREF="#AEN2118"
>Join the SAMBA server to the PDC domain</A
></DT
><DT
>11.5.3.5. <A
-HREF="#AEN2127"
+HREF="#AEN2129"
>Start up the winbindd daemon and test it!</A
></DT
><DT
>11.5.3.6. <A
-HREF="#AEN2163"
+HREF="#AEN2165"
>Fix the <TT
CLASS="FILENAME"
>/etc/rc.d/init.d/smb</TT
@@ -924,7 +932,7 @@ CLASS="FILENAME"
></DT
><DT
>11.5.3.7. <A
-HREF="#AEN2185"
+HREF="#AEN2187"
>Configure Winbind and PAM</A
></DT
></DL
@@ -933,12 +941,12 @@ HREF="#AEN2185"
></DD
><DT
>11.6. <A
-HREF="#AEN2232"
+HREF="#AEN2234"
>Limitations</A
></DT
><DT
>11.7. <A
-HREF="#AEN2242"
+HREF="#AEN2244"
>Conclusion</A
></DT
></DL
@@ -952,32 +960,32 @@ HREF="#OS2"
><DL
><DT
>12.1. <A
-HREF="#AEN2256"
+HREF="#AEN2258"
>FAQs</A
></DT
><DD
><DL
><DT
>12.1.1. <A
-HREF="#AEN2258"
+HREF="#AEN2260"
>How can I configure OS/2 Warp Connect or
OS/2 Warp 4 as a client for Samba?</A
></DT
><DT
>12.1.2. <A
-HREF="#AEN2273"
+HREF="#AEN2275"
>How can I configure OS/2 Warp 3 (not Connect),
OS/2 1.2, 1.3 or 2.x for Samba?</A
></DT
><DT
>12.1.3. <A
-HREF="#AEN2282"
+HREF="#AEN2284"
>Are there any other issues when OS/2 (any version)
is used as a client?</A
></DT
><DT
>12.1.4. <A
-HREF="#AEN2286"
+HREF="#AEN2288"
>How do I get printer driver download working
for OS/2 clients?</A
></DT
@@ -994,24 +1002,24 @@ HREF="#CVS-ACCESS"
><DL
><DT
>13.1. <A
-HREF="#AEN2302"
+HREF="#AEN2304"
>Introduction</A
></DT
><DT
>13.2. <A
-HREF="#AEN2307"
+HREF="#AEN2309"
>CVS Access to samba.org</A
></DT
><DD
><DL
><DT
>13.2.1. <A
-HREF="#AEN2310"
+HREF="#AEN2312"
>Access via CVSweb</A
></DT
><DT
>13.2.2. <A
-HREF="#AEN2315"
+HREF="#AEN2317"
>Access via cvs</A
></DT
></DL
@@ -1020,7 +1028,7 @@ HREF="#AEN2315"
></DD
><DT
><A
-HREF="#AEN2343"
+HREF="#AEN2345"
>Index</A
></DT
></DL
@@ -1037,7 +1045,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN18"
+NAME="AEN20"
>1.1. Step 0: Read the man pages</A
></H1
><P
@@ -1069,7 +1077,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN26"
+NAME="AEN28"
>1.2. Step 1: Building the Binaries</A
></H1
><P
@@ -1168,7 +1176,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN54"
+NAME="AEN56"
>1.3. Step 2: The all important step</A
></H1
><P
@@ -1185,7 +1193,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN58"
+NAME="AEN60"
>1.4. Step 3: Create the smb configuration file.</A
></H1
><P
@@ -1250,7 +1258,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN72"
+NAME="AEN74"
>1.5. Step 4: Test your config file with
<B
CLASS="COMMAND"
@@ -1274,7 +1282,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN78"
+NAME="AEN80"
>1.6. Step 5: Starting the smbd and nmbd</A
></H1
><P
@@ -1314,7 +1322,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN88"
+NAME="AEN90"
>1.6.1. Step 5a: Starting from inetd.conf</A
></H2
><P
@@ -1427,7 +1435,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN117"
+NAME="AEN119"
>1.6.2. Step 5b. Alternative: starting it as a daemon</A
></H2
><P
@@ -1493,7 +1501,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN133"
+NAME="AEN135"
>1.7. Step 6: Try listing the shares available on your
server</A
></H1
@@ -1534,7 +1542,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN142"
+NAME="AEN144"
>1.8. Step 7: Try connecting with the unix client</A
></H1
><P
@@ -1597,7 +1605,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN158"
+NAME="AEN160"
>1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT,
Win2k, OS/2, etc... client</A
></H1
@@ -1646,7 +1654,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN172"
+NAME="AEN174"
>1.10. What If Things Don't Work?</A
></H1
><P
@@ -1669,7 +1677,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN177"
+NAME="AEN179"
>1.10.1. Diagnosing Problems</A
></H2
><P
@@ -1685,7 +1693,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN181"
+NAME="AEN183"
>1.10.2. Scope IDs</A
></H2
><P
@@ -1701,7 +1709,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN184"
+NAME="AEN186"
>1.10.3. Choosing the Protocol Level</A
></H2
><P
@@ -1742,7 +1750,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN193"
+NAME="AEN195"
>1.10.4. Printing from UNIX to a Client PC</A
></H2
><P
@@ -1760,7 +1768,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN197"
+NAME="AEN199"
>1.10.5. Locking</A
></H2
><P
@@ -1826,7 +1834,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN207"
+NAME="AEN209"
>1.10.6. Mapping Usernames</A
></H2
><P
@@ -1839,7 +1847,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN210"
+NAME="AEN212"
>1.10.7. Other Character Sets</A
></H2
><P
@@ -1863,7 +1871,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN224"
+NAME="AEN226"
>2.1. Agenda</A
></H1
><P
@@ -1930,7 +1938,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN246"
+NAME="AEN248"
>2.2. Name Resolution in a pure Unix/Linux world</A
></H1
><P
@@ -1972,7 +1980,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN262"
+NAME="AEN264"
>2.2.1. <TT
CLASS="FILENAME"
>/etc/hosts</TT
@@ -2062,7 +2070,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN278"
+NAME="AEN280"
>2.2.2. <TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
@@ -2100,7 +2108,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN289"
+NAME="AEN291"
>2.2.3. <TT
CLASS="FILENAME"
>/etc/host.conf</TT
@@ -2138,7 +2146,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN297"
+NAME="AEN299"
>2.2.4. <TT
CLASS="FILENAME"
>/etc/nsswitch.conf</TT
@@ -2216,7 +2224,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN309"
+NAME="AEN311"
>2.3. Name resolution as used within MS Windows networking</A
></H1
><P
@@ -2310,7 +2318,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN321"
+NAME="AEN323"
>2.3.1. The NetBIOS Name Cache</A
></H2
><P
@@ -2337,7 +2345,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN326"
+NAME="AEN328"
>2.3.2. The LMHOSTS file</A
></H2
><P
@@ -2449,7 +2457,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN334"
+NAME="AEN336"
>2.3.3. HOSTS file</A
></H2
><P
@@ -2471,7 +2479,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN339"
+NAME="AEN341"
>2.3.4. DNS Lookup</A
></H2
><P
@@ -2491,7 +2499,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN342"
+NAME="AEN344"
>2.3.5. WINS Lookup</A
></H2
><P
@@ -2552,7 +2560,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN354"
+NAME="AEN356"
>2.4. How browsing functions and how to deploy stable and
dependable browsing using Samba</A
></H1
@@ -2619,7 +2627,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN364"
+NAME="AEN366"
>2.5. MS Windows security options and how to configure
Samba for seemless integration</A
></H1
@@ -2761,7 +2769,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN392"
+NAME="AEN394"
>2.5.1. Use MS Windows NT as an authentication server</A
></H2
><P
@@ -2806,7 +2814,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN400"
+NAME="AEN402"
>2.5.2. Make Samba a member of an MS Windows NT security domain</A
></H2
><P
@@ -2878,7 +2886,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN417"
+NAME="AEN419"
>2.5.3. Configure Samba as an authentication server</A
></H2
><P
@@ -2924,7 +2932,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN424"
+NAME="AEN426"
>2.5.3.1. Users</A
></H3
><P
@@ -2956,7 +2964,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN429"
+NAME="AEN431"
>2.5.3.2. MS Windows NT Machine Accounts</A
></H3
><P
@@ -2986,7 +2994,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN434"
+NAME="AEN436"
>2.6. Conclusions</A
></H1
><P
@@ -3031,7 +3039,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN455"
+NAME="AEN457"
>3.1. Samba and PAM</A
></H1
><P
@@ -3290,7 +3298,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN499"
+NAME="AEN501"
>3.2. Distributed Authentication</A
></H1
><P
@@ -3323,7 +3331,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN506"
+NAME="AEN508"
>3.3. PAM Configuration in smb.conf</A
></H1
><P
@@ -3371,7 +3379,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN526"
+NAME="AEN528"
>4.1. Instructions</A
></H1
><P
@@ -3528,7 +3536,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN561"
+NAME="AEN563"
>4.1.1. Notes</A
></H2
><P
@@ -3569,7 +3577,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN581"
+NAME="AEN583"
>5.1. Viewing and changing UNIX permissions using the NT
security dialogs</A
></H1
@@ -3608,7 +3616,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN590"
+NAME="AEN592"
>5.2. How to view file security on a Samba share</A
></H1
><P
@@ -3654,7 +3662,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN601"
+NAME="AEN603"
>5.3. Viewing file ownership</A
></H1
><P
@@ -3740,7 +3748,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN621"
+NAME="AEN623"
>5.4. Viewing file or directory permissions</A
></H1
><P
@@ -3802,7 +3810,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN636"
+NAME="AEN638"
>5.4.1. File Permissions</A
></H2
><P
@@ -3864,7 +3872,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN650"
+NAME="AEN652"
>5.4.2. Directory Permissions</A
></H2
><P
@@ -3896,7 +3904,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN657"
+NAME="AEN659"
>5.5. Modifying file or directory permissions</A
></H1
><P
@@ -3994,7 +4002,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN679"
+NAME="AEN681"
>5.6. Interaction with the standard Samba create mask
parameters</A
></H1
@@ -4267,7 +4275,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN743"
+NAME="AEN745"
>5.7. Interaction with the standard Samba file attribute
mapping</A
></H1
@@ -4322,7 +4330,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN764"
+NAME="AEN766"
>6.1. Introduction</A
></H1
><P
@@ -4406,7 +4414,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN786"
+NAME="AEN788"
>6.2. Configuration</A
></H1
><DIV
@@ -4474,7 +4482,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN797"
+NAME="AEN799"
>6.2.1. Creating [print$]</A
></H2
><P
@@ -4666,8 +4674,10 @@ CLASS="PARAMETER"
>printer admin</I
></TT
>) account
-from a Windows NT 4.0 client. Navigate to the "Printers" folder
-on the Samba server. You should see an initial listing of printers
+from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or
+"My Network Places" and browse for the Samba host. Once you have located
+the server, navigate to the "Printers..." folder.
+You should see an initial listing of printers
that matches the printer shares defined on your Samba host.</P
></DIV
><DIV
@@ -4675,7 +4685,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN832"
+NAME="AEN834"
>6.2.2. Setting Drivers for Existing Printers</A
></H2
><P
@@ -4747,7 +4757,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN849"
+NAME="AEN851"
>6.2.3. Support a large number of printers</A
></H2
><P
@@ -4822,7 +4832,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN860"
+NAME="AEN862"
>6.2.4. Adding New Printers via the Windows NT APW</A
></H2
><P
@@ -4928,7 +4938,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN885"
+NAME="AEN887"
>6.2.5. Samba and Printer Ports</A
></H2
><P
@@ -4965,7 +4975,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN893"
+NAME="AEN895"
>6.3. The Imprints Toolset</A
></H1
><P
@@ -4983,7 +4993,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN897"
+NAME="AEN899"
>6.3.1. What is Imprints?</A
></H2
><P
@@ -5015,7 +5025,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN907"
+NAME="AEN909"
>6.3.2. Creating Printer Driver Packages</A
></H2
><P
@@ -5031,7 +5041,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN910"
+NAME="AEN912"
>6.3.3. The Imprints server</A
></H2
><P
@@ -5051,7 +5061,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN914"
+NAME="AEN916"
>6.3.4. The Installation Client</A
></H2
><P
@@ -5154,7 +5164,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN936"
+NAME="AEN938"
>6.4. <A
NAME="MIGRATION"
></A
@@ -5318,7 +5328,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN990"
+NAME="AEN992"
>7.1. Joining an NT Domain with Samba 2.2</A
></H1
><P
@@ -5549,7 +5559,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1054"
+NAME="AEN1056"
>7.2. Samba and Windows 2000 Domains</A
></H1
><P
@@ -5574,7 +5584,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1059"
+NAME="AEN1061"
>7.3. Why is this better than security = server?</A
></H1
><P
@@ -5668,7 +5678,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN1092"
+NAME="AEN1094"
>8.1. Prerequisite Reading</A
></H1
><P
@@ -5696,7 +5706,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1098"
+NAME="AEN1100"
>8.2. Background</A
></H1
><DIV
@@ -5828,7 +5838,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1137"
+NAME="AEN1139"
>8.3. Configuring the Samba Domain Controller</A
></H1
><P
@@ -6049,7 +6059,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1180"
+NAME="AEN1182"
>8.4. Creating Machine Trust Accounts and Joining Clients to the
Domain</A
></H1
@@ -6123,7 +6133,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1199"
+NAME="AEN1201"
>8.4.1. Manual Creation of Machine Trust Accounts</A
></H2
><P
@@ -6290,7 +6300,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1234"
+NAME="AEN1236"
>8.4.2. "On-the-Fly" Creation of Machine Trust Accounts</A
></H2
><P
@@ -6336,7 +6346,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1243"
+NAME="AEN1245"
>8.4.3. Joining the Client to the Domain</A
></H2
><P
@@ -6396,7 +6406,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1258"
+NAME="AEN1260"
>8.5. Common Problems and Errors</A
></H1
><P
@@ -6595,7 +6605,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1306"
+NAME="AEN1308"
>8.6. System Policies and Profiles</A
></H1
><P
@@ -6752,7 +6762,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1350"
+NAME="AEN1352"
>8.7. What other help can I get?</A
></H1
><P
@@ -7148,7 +7158,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1464"
+NAME="AEN1466"
>8.8. Domain Control for Windows 9x/ME</A
></H1
><DIV
@@ -7262,7 +7272,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1490"
+NAME="AEN1492"
>8.8.1. Configuration Instructions: Network Logons</A
></H2
><P
@@ -7356,7 +7366,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1509"
+NAME="AEN1511"
>8.8.2. Configuration Instructions: Setting up Roaming User Profiles</A
></H2
><DIV
@@ -7403,7 +7413,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1517"
+NAME="AEN1519"
>8.8.2.1. Windows NT Configuration</A
></H3
><P
@@ -7447,7 +7457,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1525"
+NAME="AEN1527"
>8.8.2.2. Windows 9X Configuration</A
></H3
><P
@@ -7487,7 +7497,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1533"
+NAME="AEN1535"
>8.8.2.3. Win9X and WinNT Configuration</A
></H3
><P
@@ -7525,7 +7535,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1540"
+NAME="AEN1542"
>8.8.2.4. Windows 9X Profile Setup</A
></H3
><P
@@ -7681,7 +7691,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1576"
+NAME="AEN1578"
>8.8.2.5. Windows NT Workstation 4.0</A
></H3
><P
@@ -7763,7 +7773,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1589"
+NAME="AEN1591"
>8.8.2.6. Windows NT Server</A
></H3
><P
@@ -7777,7 +7787,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN1592"
+NAME="AEN1594"
>8.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0</A
></H3
><DIV
@@ -7842,7 +7852,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1602"
+NAME="AEN1604"
>8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control &#38; Samba</A
></H1
><DIV
@@ -7964,14 +7974,14 @@ CLASS="CHAPTER"
><HR><H1
><A
NAME="SAMBA-BDC"
->Chapter 9. How to a Purely Samba Controlled Domain</A
+>Chapter 9. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</A
></H1
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN1638"
+NAME="AEN1640"
>9.1. Prerequisite Reading</A
></H1
><P
@@ -7988,7 +7998,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1642"
+NAME="AEN1644"
>9.2. Background</A
></H1
><P
@@ -8042,7 +8052,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1650"
+NAME="AEN1652"
>9.3. What qualifies a Domain Controller on the network?</A
></H1
><P
@@ -8059,7 +8069,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1653"
+NAME="AEN1655"
>9.3.1. How does a Workstation find its domain controller?</A
></H2
><P
@@ -8078,7 +8088,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1656"
+NAME="AEN1658"
>9.3.2. When is the PDC needed?</A
></H2
><P
@@ -8094,7 +8104,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1659"
+NAME="AEN1661"
>9.4. Can Samba be a Backup Domain Controller?</A
></H1
><P
@@ -8113,7 +8123,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1663"
+NAME="AEN1665"
>9.5. How do I set up a Samba BDC?</A
></H1
><P
@@ -8183,7 +8193,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1679"
+NAME="AEN1681"
>9.5.1. How do I replicate the smbpasswd file?</A
></H2
><P
@@ -8213,7 +8223,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN1700"
+NAME="AEN1702"
>10.1. Purpose</A
></H1
><P
@@ -8281,7 +8291,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1720"
+NAME="AEN1722"
>10.2. Introduction</A
></H1
><P
@@ -8398,7 +8408,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1749"
+NAME="AEN1751"
>10.3. Supported LDAP Servers</A
></H1
><P
@@ -8423,7 +8433,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1754"
+NAME="AEN1756"
>10.4. Schema and Relationship to the RFC 2307 posixAccount</A
></H1
><P
@@ -8491,7 +8501,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1766"
+NAME="AEN1768"
>10.5. Configuring Samba with LDAP</A
></H1
><DIV
@@ -8499,7 +8509,7 @@ CLASS="SECT2"
><H2
CLASS="SECT2"
><A
-NAME="AEN1768"
+NAME="AEN1770"
>10.5.1. OpenLDAP configuration</A
></H2
><P
@@ -8530,7 +8540,7 @@ the 'displayName' attribute is defined in the <TT
CLASS="FILENAME"
>inetorgperson.schema</TT
>
-file. Bother of these must be included before the <TT
+file. Both of these must be included before the <TT
CLASS="FILENAME"
>samba.schema</TT
> file.</P
@@ -8599,7 +8609,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1785"
+NAME="AEN1787"
>10.5.2. Configuring Samba</A
></H2
><P
@@ -8728,7 +8738,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1813"
+NAME="AEN1815"
>10.6. Accounts and Groups management</A
></H1
><P
@@ -8753,7 +8763,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1818"
+NAME="AEN1820"
>10.7. Security and sambaAccount</A
></H1
><P
@@ -8833,7 +8843,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1838"
+NAME="AEN1840"
>10.8. LDAP specials attributes for sambaAccounts</A
></H1
><P
@@ -9044,7 +9054,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1908"
+NAME="AEN1910"
>10.9. Example LDIF Entries for a sambaAccount</A
></H1
><P
@@ -9120,7 +9130,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1916"
+NAME="AEN1918"
>10.10. Comments</A
></H1
><P
@@ -9144,7 +9154,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN1945"
+NAME="AEN1947"
>11.1. Abstract</A
></H1
><P
@@ -9167,7 +9177,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1949"
+NAME="AEN1951"
>11.2. Introduction</A
></H1
><P
@@ -9221,7 +9231,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1962"
+NAME="AEN1964"
>11.3. What Winbind Provides</A
></H1
><P
@@ -9263,7 +9273,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1969"
+NAME="AEN1971"
>11.3.1. Target Uses</A
></H2
><P
@@ -9287,7 +9297,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN1973"
+NAME="AEN1975"
>11.4. How Winbind Works</A
></H1
><P
@@ -9307,7 +9317,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1978"
+NAME="AEN1980"
>11.4.1. Microsoft Remote Procedure Calls</A
></H2
><P
@@ -9333,7 +9343,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1982"
+NAME="AEN1984"
>11.4.2. Name Service Switch</A
></H2
><P
@@ -9413,7 +9423,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN1998"
+NAME="AEN2000"
>11.4.3. Pluggable Authentication Modules</A
></H2
><P
@@ -9462,7 +9472,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2006"
+NAME="AEN2008"
>11.4.4. User and Group ID Allocation</A
></H2
><P
@@ -9488,7 +9498,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2010"
+NAME="AEN2012"
>11.4.5. Result Caching</A
></H2
><P
@@ -9511,7 +9521,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN2013"
+NAME="AEN2015"
>11.5. Installation and Configuration</A
></H1
><P
@@ -9530,7 +9540,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2018"
+NAME="AEN2020"
>11.5.1. Introduction</A
></H2
><P
@@ -9581,7 +9591,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2031"
+NAME="AEN2033"
>11.5.2. Requirements</A
></H2
><P
@@ -9639,7 +9649,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2045"
+NAME="AEN2047"
>11.5.3. Testing Things Out</A
></H2
><P
@@ -9684,7 +9694,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2056"
+NAME="AEN2058"
>11.5.3.1. Configure and compile SAMBA</A
></H3
><P
@@ -9759,7 +9769,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2075"
+NAME="AEN2077"
>11.5.3.2. Configure <TT
CLASS="FILENAME"
>nsswitch.conf</TT
@@ -9849,7 +9859,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2100"
+NAME="AEN2102"
>11.5.3.3. Configure smb.conf</A
></H3
><P
@@ -9933,7 +9943,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2116"
+NAME="AEN2118"
>11.5.3.4. Join the SAMBA server to the PDC domain</A
></H3
><P
@@ -9979,7 +9989,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2127"
+NAME="AEN2129"
>11.5.3.5. Start up the winbindd daemon and test it!</A
></H3
><P
@@ -10120,7 +10130,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2163"
+NAME="AEN2165"
>11.5.3.6. Fix the <TT
CLASS="FILENAME"
>/etc/rc.d/init.d/smb</TT
@@ -10250,7 +10260,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
-NAME="AEN2185"
+NAME="AEN2187"
>11.5.3.7. Configure Winbind and PAM</A
></H3
><P
@@ -10472,7 +10482,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN2232"
+NAME="AEN2234"
>11.6. Limitations</A
></H1
><P
@@ -10513,7 +10523,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN2242"
+NAME="AEN2244"
>11.7. Conclusion</A
></H1
><P
@@ -10537,7 +10547,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN2256"
+NAME="AEN2258"
>12.1. FAQs</A
></H1
><DIV
@@ -10545,7 +10555,7 @@ CLASS="SECT2"
><H2
CLASS="SECT2"
><A
-NAME="AEN2258"
+NAME="AEN2260"
>12.1.1. How can I configure OS/2 Warp Connect or
OS/2 Warp 4 as a client for Samba?</A
></H2
@@ -10604,7 +10614,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2273"
+NAME="AEN2275"
>12.1.2. How can I configure OS/2 Warp 3 (not Connect),
OS/2 1.2, 1.3 or 2.x for Samba?</A
></H2
@@ -10657,7 +10667,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2282"
+NAME="AEN2284"
>12.1.3. Are there any other issues when OS/2 (any version)
is used as a client?</A
></H2
@@ -10679,7 +10689,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2286"
+NAME="AEN2288"
>12.1.4. How do I get printer driver download working
for OS/2 clients?</A
></H2
@@ -10735,7 +10745,7 @@ CLASS="SECT1"
><H1
CLASS="SECT1"
><A
-NAME="AEN2302"
+NAME="AEN2304"
>13.1. Introduction</A
></H1
><P
@@ -10757,7 +10767,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
-NAME="AEN2307"
+NAME="AEN2309"
>13.2. CVS Access to samba.org</A
></H1
><P
@@ -10770,7 +10780,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2310"
+NAME="AEN2312"
>13.2.1. Access via CVSweb</A
></H2
><P
@@ -10791,7 +10801,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
-NAME="AEN2315"
+NAME="AEN2317"
>13.2.2. Access via cvs</A
></H2
><P
@@ -10897,14 +10907,14 @@ CLASS="COMMAND"
></DIV
><HR><H1
><A
-NAME="AEN2343"
+NAME="AEN2345"
>Index</A
></H1
><DL
><DT
>Primary Domain Controller,
<A
-HREF="x1098.htm"
+HREF="x1100.htm"
>Background</A
>
</DT
diff --git a/docs/htmldocs/Samba-LDAP-HOWTO.html b/docs/htmldocs/Samba-LDAP-HOWTO.html
index 97c862b7d84..9c223c0084f 100644
--- a/docs/htmldocs/Samba-LDAP-HOWTO.html
+++ b/docs/htmldocs/Samba-LDAP-HOWTO.html
@@ -336,7 +336,7 @@ the 'displayName' attribute is defined in the <TT
CLASS="FILENAME"
>inetorgperson.schema</TT
>
-file. Bother of these must be included before the <TT
+file. Both of these must be included before the <TT
CLASS="FILENAME"
>samba.schema</TT
> file.</P
diff --git a/docs/htmldocs/nmbd.8.html b/docs/htmldocs/nmbd.8.html
index b18ae23aa21..76fd5de6ba2 100644
--- a/docs/htmldocs/nmbd.8.html
+++ b/docs/htmldocs/nmbd.8.html
@@ -295,9 +295,7 @@ CLASS="FILENAME"
<B
CLASS="COMMAND"
>nmbd</B
-> server.</P
-><P
->The default log directory is compiled into Samba
+> server. The default log directory is compiled into Samba
as part of the build process. Common defaults are <TT
CLASS="FILENAME"
> /usr/local/samba/var/log.nmb</TT
@@ -308,7 +306,15 @@ CLASS="FILENAME"
<TT
CLASS="FILENAME"
>/var/log/log.nmb</TT
->.</P
+>. <EM
+>Beware:</EM
+>
+ If the directory specified does not exist, <B
+CLASS="COMMAND"
+>nmbd</B
+>
+ will log to the default debug log location defined at compile time.
+ </P
></DD
><DT
>-n &#60;primary NetBIOS name&#62;</DT
@@ -376,7 +382,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN130"
+NAME="AEN131"
></A
><H2
>FILES</H2
@@ -531,7 +537,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN177"
+NAME="AEN178"
></A
><H2
>SIGNALS</H2
@@ -592,7 +598,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN193"
+NAME="AEN194"
></A
><H2
>VERSION</H2
@@ -603,7 +609,7 @@ NAME="AEN193"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN196"
+NAME="AEN197"
></A
><H2
>SEE ALSO</H2
@@ -668,7 +674,7 @@ TARGET="_top"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN213"
+NAME="AEN214"
></A
><H2
>AUTHOR</H2
diff --git a/docs/htmldocs/printer_driver2.html b/docs/htmldocs/printer_driver2.html
index e6cc23b02cf..b3dbc9f9fcb 100644
--- a/docs/htmldocs/printer_driver2.html
+++ b/docs/htmldocs/printer_driver2.html
@@ -355,8 +355,10 @@ CLASS="PARAMETER"
>printer admin</I
></TT
>) account
-from a Windows NT 4.0 client. Navigate to the "Printers" folder
-on the Samba server. You should see an initial listing of printers
+from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or
+"My Network Places" and browse for the Samba host. Once you have located
+the server, navigate to the "Printers..." folder.
+You should see an initial listing of printers
that matches the printer shares defined on your Samba host.</P
></DIV
><DIV
diff --git a/docs/htmldocs/rpcclient.1.html b/docs/htmldocs/rpcclient.1.html
index 98a19c6ea2d..d18966fa238 100644
--- a/docs/htmldocs/rpcclient.1.html
+++ b/docs/htmldocs/rpcclient.1.html
@@ -37,7 +37,7 @@ NAME="AEN8"
><B
CLASS="COMMAND"
>rpcclient</B
-> {server} [-A authfile] [-c &#60;command string&#62;] [-d debuglevel] [-h] [-l logfile] [-N] [-s &#60;smb config file&#62;] [-U username[%password]] [-W workgroup] [-N]</P
+> [-A authfile] [-c &#60;command string&#62;] [-d debuglevel] [-h] [-l logfile] [-N] [-s &#60;smb config file&#62;] [-U username[%password]] [-W workgroup] [-N] {server}</P
></DIV
><DIV
CLASS="REFSECT1"
diff --git a/docs/htmldocs/smb.conf.5.html b/docs/htmldocs/smb.conf.5.html
index aaf38a0cb2b..0f641ff15e5 100644
--- a/docs/htmldocs/smb.conf.5.html
+++ b/docs/htmldocs/smb.conf.5.html
@@ -89,7 +89,7 @@ CLASS="REPLACEABLE"
>Section and parameter names are not case sensitive.</P
><P
>Only the first equals sign in a parameter is significant.
- Whitespace before or after the first equals sign is discarded.
+ Whitespace before or after the first equals sign is discarded.
Leading, trailing and internal whitespace in section and parameter
names is irrelevant. Leading and trailing whitespace in a parameter
value is discarded. Internal whitespace within a parameter value
@@ -140,7 +140,7 @@ NAME="AEN28"
><P
>Sections may be designated <EM
>guest</EM
-> services,
+> services,
in which case no password is required to access them. A specified
UNIX <EM
>guest account</EM
@@ -629,7 +629,7 @@ CLASS="VARIABLELIST"
>%d</DT
><DD
><P
->The process id of the current server
+>The process id of the current server
process.</P
></DD
><DT
@@ -753,7 +753,7 @@ CLASS="VARIABLELIST"
>short preserve case = yes/no</DT
><DD
><P
->controls if new files which conform to 8.3 syntax,
+>controls if new files which conform to 8.3 syntax,
that is all in upper case and of suitable length, are created
upper case, or if they are forced to be the "default"
case. This option can be use with "preserve case = yes"
@@ -1605,6 +1605,18 @@ CLASS="PARAMETER"
><LI
><P
><A
+HREF="#PIDDIRECTORY"
+><TT
+CLASS="PARAMETER"
+><I
+>pid directory</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
HREF="#LOGFILE"
><TT
CLASS="PARAMETER"
@@ -1977,6 +1989,18 @@ CLASS="PARAMETER"
><LI
><P
><A
+HREF="#NTSTATUSSUPPORT"
+><TT
+CLASS="PARAMETER"
+><I
+>nt status support</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
HREF="#NULLPASSWORDS"
><TT
CLASS="PARAMETER"
@@ -3011,7 +3035,7 @@ CLASS="PARAMETER"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN974"
+NAME="AEN982"
></A
><H2
>COMPLETE LIST OF SERVICE PARAMETERS</H2
@@ -3168,6 +3192,18 @@ CLASS="PARAMETER"
><LI
><P
><A
+HREF="#CSCPOLICY"
+><TT
+CLASS="PARAMETER"
+><I
+>csc policy</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
HREF="#DEFAULTCASE"
><TT
CLASS="PARAMETER"
@@ -4188,6 +4224,18 @@ CLASS="PARAMETER"
><LI
><P
><A
+HREF="#SHAREMODES"
+><TT
+CLASS="PARAMETER"
+><I
+>share modes</I
+></TT
+></A
+></P
+></LI
+><LI
+><P
+><A
HREF="#SHORTPRESERVECASE"
><TT
CLASS="PARAMETER"
@@ -4454,7 +4502,7 @@ CLASS="PARAMETER"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN1454"
+NAME="AEN1470"
></A
><H2
>EXPLANATION OF EACH PARAMETER</H2
@@ -4877,17 +4925,15 @@ HREF="smbd.8.html"
TARGET="_top"
>smbd</A
>
- must be set to <TT
-CLASS="PARAMETER"
-><I
->security = server</I
-></TT
-> or <TT
+ must <EM
+>NOT</EM
+> be set to <TT
CLASS="PARAMETER"
><I
-> security = domain</I
+>security = share</I
></TT
-> and <TT
+>
+ and <TT
CLASS="PARAMETER"
><I
>add user script</I
@@ -6399,6 +6445,40 @@ CLASS="PARAMETER"
></DD
><DT
><A
+NAME="CSCPOLICY"
+></A
+>csc policy (S)</DT
+><DD
+><P
+>This stands for <EM
+>client-side caching
+ policy</EM
+>, and specifies how clients capable of offline
+ caching will cache the files in the share. The valid values
+ are: manual, documents, programs, disable.</P
+><P
+>These values correspond to those used on Windows
+ servers.</P
+><P
+>For example, shares containing roaming profiles can have
+ offline caching disabled using <B
+CLASS="COMMAND"
+>csc policy = disable
+ </B
+>.</P
+><P
+>Default: <B
+CLASS="COMMAND"
+>csc policy = manual</B
+></P
+><P
+>Example: <B
+CLASS="COMMAND"
+>csc policy = programs</B
+></P
+></DD
+><DT
+><A
NAME="DEADTIME"
></A
>deadtime (G)</DT
@@ -7000,53 +7080,26 @@ CLASS="PARAMETER"
><I
>security = domain</I
></TT
-> and <TT
-CLASS="PARAMETER"
-><I
->delete
- user script</I
-></TT
-> must be set to a full pathname for a script
- that will delete a UNIX user given one argument of <TT
-CLASS="PARAMETER"
-><I
->%u
- </I
-></TT
->, which expands into the UNIX user name to delete.
- <EM
->NOTE</EM
-> that this is different to the <A
-HREF="#ADDUSERSCRIPT"
-><TT
-CLASS="PARAMETER"
-><I
->add user script</I
-></TT
-></A
->
- which will work with the <TT
+> or <TT
CLASS="PARAMETER"
><I
->security = server</I
+>security =
+ user</I
></TT
-> option
- as well as <TT
+> and <TT
CLASS="PARAMETER"
><I
->security = domain</I
+>delete user script</I
></TT
->. The reason for this
- is only when Samba is a domain member does it get the information
- on an attempted user logon that a user no longer exists. In the
- <TT
+>
+ must be set to a full pathname for a script
+ that will delete a UNIX user given one argument of <TT
CLASS="PARAMETER"
><I
->security = server</I
+>%u</I
></TT
-> mode a missing user
- is treated the same as an invalid password logon attempt. Deleting
- the user in this circumstance would not be a good idea.</P
+>,
+ which expands into the UNIX user name to delete.</P
><P
>When the Windows user attempts to access the Samba server,
at <EM
@@ -12707,20 +12760,20 @@ NAME="NTSMBSUPPORT"
HREF="smbd.8.html"
TARGET="_top"
>smbd(8)</A
-> will negotiate NT specific SMB
- support with Windows NT clients. Although this is a developer
- debugging option and should be left alone, benchmarking has discovered
- that Windows NT clients give faster performance with this option
+> will negotiate NT specific SMB
+ support with Windows NT/2k/XP clients. Although this is a developer
+ debugging option and should be left alone, benchmarking has discovered
+ that Windows NT clients give faster performance with this option
set to <TT
CLASS="CONSTANT"
>no</TT
->. This is still being investigated.
+>. This is still being investigated.
If this option is set to <TT
CLASS="CONSTANT"
>no</TT
-> then Samba offers
- exactly the same SMB calls that versions prior to Samba 2.0 offered.
- This information may be of use if any users are having problems
+> then Samba offers
+ exactly the same SMB calls that versions prior to Samba 2.0 offered.
+ This information may be of use if any users are having problems
with NT SMB support.</P
><P
>You should not need to ever disable this parameter.</P
@@ -12732,6 +12785,34 @@ CLASS="COMMAND"
></DD
><DT
><A
+NAME="NTSTATUSSUPPORT"
+></A
+>nt status support (G)</DT
+><DD
+><P
+>This boolean parameter controls whether <A
+HREF="smbd.8.html"
+TARGET="_top"
+>smbd(8)</A
+> will negotiate NT specific status
+ support with Windows NT/2k/XP clients. This is a developer
+ debugging option and should be left alone.
+ If this option is set to <TT
+CLASS="CONSTANT"
+>no</TT
+> then Samba offers
+ exactly the same DOS error codes that versions prior to Samba 2.2.3
+ reported.</P
+><P
+>You should not need to ever disable this parameter.</P
+><P
+>Default: <B
+CLASS="COMMAND"
+>nt status support = yes</B
+></P
+></DD
+><DT
+><A
NAME="NULLPASSWORDS"
></A
>null passwords (G)</DT
@@ -13800,6 +13881,27 @@ CLASS="COMMAND"
></DD
><DT
><A
+NAME="PIDDIRECTORY"
+></A
+>pid directory (G)</DT
+><DD
+><P
+>This option specifies the directory where pid
+ files will be placed. </P
+><P
+>Default: <B
+CLASS="COMMAND"
+>pid directory = ${prefix}/var/locks</B
+></P
+><P
+>Example: <B
+CLASS="COMMAND"
+>pid directory = /var/run/</B
+>
+ </P
+></DD
+><DT
+><A
NAME="POSIXLOCKING"
></A
>posix locking (S)</DT
@@ -14352,6 +14454,12 @@ HREF="#AEN79"
> section above for reasons
why you might want to do this.</P
><P
+>To use the CUPS printing interface set <B
+CLASS="COMMAND"
+>printcap name = cups
+ </B
+>.</P
+><P
>On System V systems that use <B
CLASS="COMMAND"
>lpstat</B
@@ -16170,6 +16278,64 @@ CLASS="COMMAND"
></DD
><DT
><A
+NAME="SHAREMODES"
+></A
+>share modes (S)</DT
+><DD
+><P
+>This enables or disables the honoring of
+ the <TT
+CLASS="PARAMETER"
+><I
+>share modes</I
+></TT
+> during a file open. These
+ modes are used by clients to gain exclusive read or write access
+ to a file.</P
+><P
+>These open modes are not directly supported by UNIX, so
+ they are simulated using shared memory, or lock files if your
+ UNIX doesn't support shared memory (almost all do).</P
+><P
+>The share modes that are enabled by this option are
+ <TT
+CLASS="CONSTANT"
+>DENY_DOS</TT
+>, <TT
+CLASS="CONSTANT"
+>DENY_ALL</TT
+>,
+ <TT
+CLASS="CONSTANT"
+>DENY_READ</TT
+>, <TT
+CLASS="CONSTANT"
+>DENY_WRITE</TT
+>,
+ <TT
+CLASS="CONSTANT"
+>DENY_NONE</TT
+> and <TT
+CLASS="CONSTANT"
+>DENY_FCB</TT
+>.
+ </P
+><P
+>This option gives full share compatibility and enabled
+ by default.</P
+><P
+>You should <EM
+>NEVER</EM
+> turn this parameter
+ off as many Windows applications will break if you do so.</P
+><P
+>Default: <B
+CLASS="COMMAND"
+>share modes = yes</B
+></P
+></DD
+><DT
+><A
NAME="SHORTPRESERVECASE"
></A
>short preserve case (S)</DT
@@ -18881,14 +19047,18 @@ CLASS="FILENAME"
> modules for UNIX services.
</P
><P
+>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.</P
+><P
>Example: <B
CLASS="COMMAND"
->winbind separator = \</B
+>winbind separator = \\</B
></P
><P
>Example: <B
CLASS="COMMAND"
->winbind separator = +</B
+>winbind separator = /</B
></P
></DD
><DT
@@ -19287,7 +19457,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6082"
+NAME="AEN6147"
></A
><H2
>WARNINGS</H2
@@ -19317,7 +19487,7 @@ TARGET="_top"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6088"
+NAME="AEN6153"
></A
><H2
>VERSION</H2
@@ -19328,7 +19498,7 @@ NAME="AEN6088"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6091"
+NAME="AEN6156"
></A
><H2
>SEE ALSO</H2
@@ -19407,7 +19577,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN6111"
+NAME="AEN6176"
></A
><H2
>AUTHOR</H2
diff --git a/docs/htmldocs/smbcontrol.1.html b/docs/htmldocs/smbcontrol.1.html
index c824a7cd093..5dc9854a848 100644
--- a/docs/htmldocs/smbcontrol.1.html
+++ b/docs/htmldocs/smbcontrol.1.html
@@ -24,7 +24,7 @@ NAME="AEN5"
></A
><H2
>Name</H2
->smbcontrol&nbsp;--&nbsp;send messages to smbd or nmbd processes</DIV
+>smbcontrol&nbsp;--&nbsp;send messages to smbd, nmbd or winbindd processes</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
@@ -65,18 +65,23 @@ CLASS="COMMAND"
HREF="smbd.8.html"
TARGET="_top"
>smbd(8)</A
-> or
+>,
an <A
HREF="nmbd.8.html"
TARGET="_top"
>nmbd(8)</A
-> daemon running on the
- system.</P
+>
+ or a <A
+HREF="winbindd.8.html"
+TARGET="_top"
+>winbindd(8)</A
+>
+ daemon running on the system.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN25"
+NAME="AEN26"
></A
><H2
>OPTIONS</H2
@@ -175,8 +180,9 @@ CLASS="CONSTANT"
message to smbd which will then close the client connections to
the named share. Note that this doesn't affect client connections
to any other shares. This message-type takes an argument of the
- share name for which client connections will be close, or the
+ share name for which client connections will be closed, or the
"*" character which will close all currently open shares.
+ This may be useful if you made changes to the access controls on the share.
This message can only be sent to <TT
CLASS="CONSTANT"
>smbd</TT
@@ -220,7 +226,7 @@ CLASS="CONSTANT"
collection, "off" to turn off profile stats collection, "count"
to enable only collection of count stats (time stats are
disabled), and "flush" to zero the current profile stats. This can
- be sent to any of the destinations.</P
+ be sent to any smbd or nmbd destinations.</P
><P
>The <TT
CLASS="CONSTANT"
@@ -236,7 +242,7 @@ CLASS="CONSTANT"
> message-type sends
a "request profile level" message. The current profile level
setting is returned by a "profilelevel" message. This can be sent
- to any of the destinations.</P
+ to any smbd or nmbd destinations.</P
><P
>The <TT
CLASS="CONSTANT"
@@ -249,14 +255,6 @@ CLASS="CONSTANT"
CLASS="CONSTANT"
>smbd</TT
>.</P
-><P
->The <TT
-CLASS="CONSTANT"
->close-share</TT
-> message-type sends a
- message to smbd which forces smbd to close the share that was
- specified as an argument. This may be useful if you made changes
- to the access controls on the share. </P
></DD
><DT
>parameters</DT
@@ -270,7 +268,7 @@ CLASS="CONSTANT"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN82"
+NAME="AEN81"
></A
><H2
>VERSION</H2
@@ -281,7 +279,7 @@ NAME="AEN82"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN85"
+NAME="AEN84"
></A
><H2
>SEE ALSO</H2
@@ -307,7 +305,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN92"
+NAME="AEN91"
></A
><H2
>AUTHOR</H2
diff --git a/docs/htmldocs/smbd.8.html b/docs/htmldocs/smbd.8.html
index 2a7d6d59f8d..368b3d7925e 100644
--- a/docs/htmldocs/smbd.8.html
+++ b/docs/htmldocs/smbd.8.html
@@ -265,7 +265,14 @@ TARGET="_top"
CLASS="FILENAME"
> smb.conf(5)</TT
></A
-> file.
+> file. <EM
+>Beware:</EM
+>
+ If the directory specified does not exist, <B
+CLASS="COMMAND"
+>smbd</B
+>
+ will log to the default debug log location defined at compile time.
</P
><P
>The default log directory is specified at
@@ -347,7 +354,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN115"
+NAME="AEN117"
></A
><H2
>FILES</H2
@@ -459,7 +466,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN151"
+NAME="AEN153"
></A
><H2
>LIMITATIONS</H2
@@ -478,7 +485,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN155"
+NAME="AEN157"
></A
><H2
>ENVIRONMENT VARIABLES</H2
@@ -509,7 +516,7 @@ CLASS="CONSTANT"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN164"
+NAME="AEN166"
></A
><H2
>PAM INTERACTION</H2
@@ -554,7 +561,7 @@ TARGET="_top"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN175"
+NAME="AEN177"
></A
><H2
>VERSION</H2
@@ -565,7 +572,7 @@ NAME="AEN175"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN178"
+NAME="AEN180"
></A
><H2
>DIAGNOSTICS</H2
@@ -588,7 +595,7 @@ NAME="AEN178"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN183"
+NAME="AEN185"
></A
><H2
>SIGNALS</H2
@@ -653,7 +660,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN200"
+NAME="AEN202"
></A
><H2
>SEE ALSO</H2
@@ -719,7 +726,7 @@ TARGET="_top"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN217"
+NAME="AEN219"
></A
><H2
>AUTHOR</H2
diff --git a/docs/htmldocs/smbpasswd.8.html b/docs/htmldocs/smbpasswd.8.html
index dfcb71baed2..6bff986f751 100644
--- a/docs/htmldocs/smbpasswd.8.html
+++ b/docs/htmldocs/smbpasswd.8.html
@@ -33,15 +33,24 @@ NAME="AEN8"
><H2
>Synopsis</H2
><P
+>When run by root:</P
+><P
><B
CLASS="COMMAND"
>smbpasswd</B
-> [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r &#60;remote machine&#62;] [-R &#60;name resolve order&#62;] [-m] [-j DOMAIN] [-U username[%password]] [-h] [-s] [-w pass] [username]</P
+> [options] [username] [password]</P
+><P
+>otherwise:</P
+><P
+><B
+CLASS="COMMAND"
+>smbpasswd</B
+> [options] [password]</P
></DIV
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN26"
+NAME="AEN20"
></A
><H2
>DESCRIPTION</H2
@@ -110,7 +119,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN42"
+NAME="AEN36"
></A
><H2
>OPTIONS</H2
@@ -120,13 +129,166 @@ NAME="AEN42"
CLASS="VARIABLELIST"
><DL
><DT
+>-L</DT
+><DD
+><P
+>Run the smbpasswd command in local mode. This
+ allows a non-root user to specify the root-only options. This
+ is used mostly in test environments where a non-root user needs
+ to make changes to the local <TT
+CLASS="FILENAME"
+>smbpasswd</TT
+> file.
+ The <TT
+CLASS="FILENAME"
+>smbpasswd</TT
+> file must have read/write
+ permissions for the user running the command.</P
+></DD
+><DT
+>-h</DT
+><DD
+><P
+>This option prints the help string for
+ <B
+CLASS="COMMAND"
+>smbpasswd</B
+>. </P
+></DD
+><DT
+>-s</DT
+><DD
+><P
+>This option causes smbpasswd to be silent (i.e.
+ not issue prompts) and to read its old and new passwords from
+ standard input, rather than from <TT
+CLASS="FILENAME"
+>/dev/tty</TT
+>
+ (like the <B
+CLASS="COMMAND"
+>passwd(1)</B
+> program does). This option
+ is to aid people writing scripts to drive smbpasswd</P
+></DD
+><DT
+>-c smb.conf file</DT
+><DD
+><P
+>This option specifies that the configuration
+ file specified should be used instead of the default value
+ specified at compile time. </P
+></DD
+><DT
+>-D debuglevel</DT
+><DD
+><P
+><TT
+CLASS="REPLACEABLE"
+><I
+>debuglevel</I
+></TT
+> is an integer
+ from 0 to 10. The default value if this parameter is not specified
+ is zero. </P
+><P
+>The higher this value, the more detail will be logged to the
+ log files about the activities of smbpasswd. At level 0, only
+ critical errors and serious warnings will be logged. </P
+><P
+>Levels above 1 will generate considerable amounts of log
+ data, and should only be used when investigating a problem. Levels
+ above 3 are designed for use only by developers and generate
+ HUGE amounts of log data, most of which is extremely cryptic.
+ </P
+></DD
+><DT
+>-r remote machine name</DT
+><DD
+><P
+>This option allows a user to specify what machine
+ they wish to change their password on. Without this parameter
+ smbpasswd defaults to the local host. The <TT
+CLASS="REPLACEABLE"
+><I
+>remote
+ machine name</I
+></TT
+> is the NetBIOS name of the SMB/CIFS
+ server to contact to attempt the password change. This name is
+ resolved into an IP address using the standard name resolution
+ mechanism in all programs of the Samba suite. See the <TT
+CLASS="PARAMETER"
+><I
+>-R
+ name resolve order</I
+></TT
+> parameter for details on changing
+ this resolving mechanism. </P
+><P
+>The username whose password is changed is that of the
+ current UNIX logged on user. See the <TT
+CLASS="PARAMETER"
+><I
+>-U username</I
+></TT
+>
+ parameter for details on changing the password for a different
+ username. </P
+><P
+>Note that if changing a Windows NT Domain password the
+ remote machine specified must be the Primary Domain Controller for
+ the domain (Backup Domain Controllers only have a read-only
+ copy of the user account database and will not allow the password
+ change).</P
+><P
+><EM
+>Note</EM
+> that Windows 95/98 do not have
+ a real password database so it is not possible to change passwords
+ specifying a Win95/98 machine as remote machine target. </P
+></DD
+><DT
+>-U username[%pass]</DT
+><DD
+><P
+>This option may only be used in conjunction
+ with the <TT
+CLASS="PARAMETER"
+><I
+>-r</I
+></TT
+> option. When changing
+ a password on a remote machine it allows the user to specify
+ the user name on that machine whose password will be changed. It
+ is present to allow users who have different user names on
+ different systems to change these passwords. The optional
+ %pass may be used to specify to old password.</P
+><P
+>In particular, this parameter specifies the username
+ used to create the machine account when invoked with -j</P
+></DD
+><DT
+><B
+CLASS="COMMAND"
+>NOTE:</B
+></DT
+><DD
+><P
+><B
+CLASS="COMMAND"
+>The following options are available only when the smbpasswd command is
+run as root or in local mode.</B
+></P
+></DD
+><DT
>-a</DT
><DD
><P
>This option specifies that the username
following should be added to the local smbpasswd file, with the
- new password typed (type &#60;Enter&#62; for the old password). This
- option is ignored if the username following already exists in
+ new password typed. This
+ option is ignored if the username specified already exists in
the smbpasswd file and it is treated like a regular change
password command. Note that the user to be added must already exist
in the system password file (usually <TT
@@ -134,20 +296,6 @@ CLASS="FILENAME"
>/etc/passwd</TT
>)
else the request to add the user will fail. </P
-><P
->This option is only available when running smbpasswd
- as root. </P
-></DD
-><DT
->-x</DT
-><DD
-><P
->This option specifies that the username
- following should be deleted from the local smbpasswd file.
- </P
-><P
->This option is only available when running smbpasswd as
- root.</P
></DD
><DT
>-d</DT
@@ -175,9 +323,6 @@ CLASS="COMMAND"
</B
> for details on the 'old' and new password file formats.
</P
-><P
->This option is only available when running smbpasswd as
- root.</P
></DD
><DT
>-e</DT
@@ -208,32 +353,14 @@ CLASS="COMMAND"
>smbpasswd (5)</B
> for
details on the 'old' and new password file formats. </P
-><P
->This option is only available when running smbpasswd as root.
- </P
></DD
><DT
->-D debuglevel</DT
+>-m</DT
><DD
><P
-><TT
-CLASS="REPLACEABLE"
-><I
->debuglevel</I
-></TT
-> is an integer
- from 0 to 10. The default value if this parameter is not specified
- is zero. </P
-><P
->The higher this value, the more detail will be logged to the
- log files about the activities of smbpasswd. At level 0, only
- critical errors and serious warnings will be logged. </P
-><P
->Levels above 1 will generate considerable amounts of log
- data, and should only be used when investigating a problem. Levels
- above 3 are designed for use only by developers and generate
- HUGE amounts of log data, most of which is extremely cryptic.
- </P
+>This option tells smbpasswd that the account
+ being changed is a MACHINE account. Currently this is used
+ when Samba is being used as an NT Primary Domain Controller.</P
></DD
><DT
>-n</DT
@@ -257,156 +384,54 @@ CLASS="FILENAME"
CLASS="COMMAND"
>null passwords = yes</B
></P
-><P
->This option is only available when running smbpasswd as
- root.</P
></DD
><DT
->-r remote machine name</DT
+>-w password</DT
><DD
><P
->This option allows a user to specify what machine
- they wish to change their password on. Without this parameter
- smbpasswd defaults to the local host. The <TT
-CLASS="REPLACEABLE"
-><I
->remote
- machine name</I
-></TT
-> is the NetBIOS name of the SMB/CIFS
- server to contact to attempt the password change. This name is
- resolved into an IP address using the standard name resolution
- mechanism in all programs of the Samba suite. See the <TT
-CLASS="PARAMETER"
-><I
->-R
- name resolve order</I
-></TT
-> parameter for details on changing
- this resolving mechanism. </P
-><P
->The username whose password is changed is that of the
- current UNIX logged on user. See the <TT
+>This parameter is only available is Samba
+ has been configured to use the experimental
+ <B
+CLASS="COMMAND"
+>--with-ldapsam</B
+> option. The <TT
CLASS="PARAMETER"
><I
->-U username</I
+>-w</I
></TT
->
- parameter for details on changing the password for a different
- username. </P
-><P
->Note that if changing a Windows NT Domain password the
- remote machine specified must be the Primary Domain Controller for
- the domain (Backup Domain Controllers only have a read-only
- copy of the user account database and will not allow the password
- change).</P
-><P
-><EM
->Note</EM
-> that Windows 95/98 do not have
- a real password database so it is not possible to change passwords
- specifying a Win95/98 machine as remote machine target. </P
-></DD
-><DT
->-R name resolve order</DT
-><DD
-><P
->This option allows the user of smbpasswd to determine
- what name resolution services to use when looking up the NetBIOS
- name of the host being connected to. </P
-><P
->The options are :"lmhosts", "host", "wins" and "bcast". They cause
- names to be resolved as follows : </P
-><P
-></P
-><UL
-><LI
-><P
-><TT
-CLASS="CONSTANT"
->lmhosts</TT
-> : Lookup an IP
- address in the Samba lmhosts file. If the line in lmhosts has
- no name type attached to the NetBIOS name (see the <A
-HREF="lmhosts.5.html"
-TARGET="_top"
->lmhosts(5)</A
-> for details) then
- any name type matches for lookup.</P
-></LI
-><LI
-><P
-><TT
-CLASS="CONSTANT"
->host</TT
-> : Do a standard host
- name to IP address resolution, using the system <TT
-CLASS="FILENAME"
->/etc/hosts
- </TT
->, NIS, or DNS lookups. This method of name resolution
- is operating system depended for instance on IRIX or Solaris this
- may be controlled by the <TT
-CLASS="FILENAME"
->/etc/nsswitch.conf</TT
>
- file). Note that this method is only used if the NetBIOS name
- type being queried is the 0x20 (server) name type, otherwise
- it is ignored.</P
-></LI
-><LI
-><P
+ switch is used to specify the password to be used with the
+ <A
+HREF="smb.conf.5.html#LDAPADMINDN"
+TARGET="_top"
><TT
-CLASS="CONSTANT"
->wins</TT
-> : Query a name with
- the IP address listed in the <TT
CLASS="PARAMETER"
><I
->wins server</I
+>ldap admin
+ dn</I
></TT
->
- parameter. If no WINS server has been specified this method
- will be ignored.</P
-></LI
-><LI
-><P
-><TT
-CLASS="CONSTANT"
->bcast</TT
-> : Do a broadcast on
- each of the known local interfaces listed in the
- <TT
+></A
+>. Note that the password is stored in
+ the <TT
+CLASS="FILENAME"
+>private/secrets.tdb</TT
+> and is keyed off
+ of the admin's DN. This means that if the value of <TT
CLASS="PARAMETER"
><I
->interfaces</I
+>ldap
+ admin dn</I
></TT
-> parameter. This is the least
- reliable of the name resolution methods as it depends on the
- target host being on a locally connected subnet.</P
-></LI
-></UL
-><P
->The default order is <B
-CLASS="COMMAND"
->lmhosts, host, wins, bcast</B
->
- and without this parameter or any entry in the
- <TT
-CLASS="FILENAME"
->smb.conf</TT
-> file the name resolution methods will
- be attempted in this order. </P
+> ever changes, the password will beed to be
+ manually updated as well.
+ </P
></DD
><DT
->-m</DT
+>-x</DT
><DD
><P
->This option tells smbpasswd that the account
- being changed is a MACHINE account. Currently this is used
- when Samba is being used as an NT Primary Domain Controller.</P
-><P
->This option is only available when running smbpasswd as root.
+>This option specifies that the username
+ following should be deleted from the local smbpasswd file.
</P
></DD
><DT
@@ -480,95 +505,97 @@ CLASS="COMMAND"
>winbindd(8)</B
> daemon can be used
to create UNIX accounts for NT users.</P
-><P
->This option is only available when running smbpasswd as root.
- </P
></DD
><DT
->-U username</DT
+>-R name resolve order</DT
><DD
><P
->This option may only be used in conjunction
- with the <TT
-CLASS="PARAMETER"
-><I
->-r</I
-></TT
-> option. When changing
- a password on a remote machine it allows the user to specify
- the user name on that machine whose password will be changed. It
- is present to allow users who have different user names on
- different systems to change these passwords. </P
+>This option allows the user of smbpasswd to determine
+ what name resolution services to use when looking up the NetBIOS
+ name of the host being connected to. </P
><P
->In particular, this parameter specifies the username
- used to create the machine account when invoked with -j</P
-></DD
-><DT
->-h</DT
-><DD
+>The options are :"lmhosts", "host", "wins" and "bcast". They cause
+ names to be resolved as follows : </P
><P
->This option prints the help string for <B
-CLASS="COMMAND"
-> smbpasswd</B
->, selecting the correct one for running as root
- or as an ordinary user. </P
-></DD
-><DT
->-s</DT
-><DD
+></P
+><UL
+><LI
><P
->This option causes smbpasswd to be silent (i.e.
- not issue prompts) and to read its old and new passwords from
- standard input, rather than from <TT
+><TT
+CLASS="CONSTANT"
+>lmhosts</TT
+> : Lookup an IP
+ address in the Samba lmhosts file. If the line in lmhosts has
+ no name type attached to the NetBIOS name (see the <A
+HREF="lmhosts.5.html"
+TARGET="_top"
+>lmhosts(5)</A
+> for details) then
+ any name type matches for lookup.</P
+></LI
+><LI
+><P
+><TT
+CLASS="CONSTANT"
+>host</TT
+> : Do a standard host
+ name to IP address resolution, using the system <TT
CLASS="FILENAME"
->/dev/tty</TT
+>/etc/hosts
+ </TT
+>, NIS, or DNS lookups. This method of name resolution
+ is operating system dependent. For instance, on IRIX or Solaris this
+ may be controlled by the <TT
+CLASS="FILENAME"
+>/etc/nsswitch.conf</TT
>
- (like the <B
-CLASS="COMMAND"
->passwd(1)</B
-> program does). This option
- is to aid people writing scripts to drive smbpasswd</P
-></DD
-><DT
->-w password</DT
-><DD
+ file). Note that this method is only used if the NetBIOS name
+ type being queried is the 0x20 (server) name type, otherwise
+ it is ignored.</P
+></LI
+><LI
><P
->This parameter is only available is Samba
- has been configured to use the experimental
- <B
-CLASS="COMMAND"
->--with-ldapsam</B
-> option. The <TT
+><TT
+CLASS="CONSTANT"
+>wins</TT
+> : Query a name with
+ the IP address listed in the <TT
CLASS="PARAMETER"
><I
->-w</I
+>wins server</I
></TT
>
- switch is used to specify the password to be used with the
- <A
-HREF="smb.conf.5.html#LDAPADMINDN"
-TARGET="_top"
+ parameter. If no WINS server has been specified this method
+ will be ignored.</P
+></LI
+><LI
+><P
><TT
+CLASS="CONSTANT"
+>bcast</TT
+> : Do a broadcast on
+ each of the known local interfaces listed in the
+ <TT
CLASS="PARAMETER"
><I
->ldap admin
- dn</I
+>interfaces</I
></TT
-></A
->. Note that the password is stored in
- the <TT
+> parameter. This is the least
+ reliable of the name resolution methods as it depends on the
+ target host being on a locally connected subnet.</P
+></LI
+></UL
+><P
+>The default order is <B
+CLASS="COMMAND"
+>lmhosts, host, wins, bcast</B
+>
+ and without this parameter or any entry in the
+ <TT
CLASS="FILENAME"
->private/secrets.tdb</TT
-> and is keyed off
- of the admin's DN. This means that if the value of <TT
-CLASS="PARAMETER"
-><I
->ldap
- admin dn</I
-></TT
-> ever changes, the password will beed to be
- manually updated as well.
- </P
+>smb.conf</TT
+> file the name resolution methods will
+ be attempted in this order. </P
></DD
><DT
>username</DT
@@ -582,13 +609,21 @@ CLASS="PARAMETER"
to modify attributes directly in the local smbpasswd file.
</P
></DD
+><DT
+>password</DT
+><DD
+><P
+>This specifies the new password. If this parameter
+ is specified you will not be prompted for the new password.
+ </P
+></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN188"
+NAME="AEN195"
></A
><H2
>NOTES</H2
@@ -631,7 +666,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN198"
+NAME="AEN205"
></A
><H2
>VERSION</H2
@@ -642,7 +677,7 @@ NAME="AEN198"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN201"
+NAME="AEN208"
></A
><H2
>SEE ALSO</H2
@@ -665,7 +700,7 @@ TARGET="_top"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN207"
+NAME="AEN214"
></A
><H2
>AUTHOR</H2
diff --git a/docs/manpages/nmbd.8 b/docs/manpages/nmbd.8
index e3bb68dea62..4f0a77e9e32 100644
--- a/docs/manpages/nmbd.8
+++ b/docs/manpages/nmbd.8
@@ -3,7 +3,7 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "NMBD" "8" "24 January 2002" "" ""
+.TH "NMBD" "8" "26 April 2002" "" ""
.SH NAME
nmbd \- NetBIOS name server to provide NetBIOS over IP naming services to clients
.SH SYNOPSIS
@@ -126,11 +126,11 @@ parameter in the \fI smb.conf\fRfile.
The -l parameter specifies a directory
into which the "log.nmbd" log file will be created
for operational data from the running
-\fBnmbd\fR server.
-
-The default log directory is compiled into Samba
+\fBnmbd\fR server. The default log directory is compiled into Samba
as part of the build process. Common defaults are \fI /usr/local/samba/var/log.nmb\fR, \fI /usr/samba/var/log.nmb\fR or
-\fI/var/log/log.nmb\fR.
+\fI/var/log/log.nmb\fR. \fBBeware:\fR
+If the directory specified does not exist, \fBnmbd\fR
+will log to the default debug log location defined at compile time.
.TP
\fB-n <primary NetBIOS name>\fR
This option allows you to override
diff --git a/docs/manpages/rpcclient.1 b/docs/manpages/rpcclient.1
index a29dbe28440..ad98b367e77 100644
--- a/docs/manpages/rpcclient.1
+++ b/docs/manpages/rpcclient.1
@@ -3,12 +3,12 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "RPCCLIENT" "1" "06 December 2001" "" ""
+.TH "RPCCLIENT" "1" "16 April 2002" "" ""
.SH NAME
rpcclient \- tool for executing client side MS-RPC functions
.SH SYNOPSIS
.sp
-\fBrpcclient\fR \fBserver\fR [ \fB-A authfile\fR ] [ \fB-c <command string>\fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s <smb config file>\fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ]
+\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c <command string>\fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s <smb config file>\fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] \fBserver\fR
.SH "DESCRIPTION"
.PP
This tool is part of the Sambasuite.
diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5
index 834ba66484b..03d10953bed 100644
--- a/docs/manpages/smb.conf.5
+++ b/docs/manpages/smb.conf.5
@@ -3,7 +3,7 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMB.CONF" "5" "01 February 2002" "" ""
+.TH "SMB.CONF" "5" "26 April 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.
@@ -381,7 +381,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
@@ -442,7 +442,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"
@@ -689,6 +689,9 @@ each parameter for details. Note that some are synonyms.
\fIlock directory\fR
.TP 0.2i
\(bu
+\fIpid directory\fR
+.TP 0.2i
+\(bu
\fIlog file\fR
.TP 0.2i
\(bu
@@ -782,6 +785,9 @@ each parameter for details. Note that some are synonyms.
\fInt smb support\fR
.TP 0.2i
\(bu
+\fInt status support\fR
+.TP 0.2i
+\(bu
\fInull passwords\fR
.TP 0.2i
\(bu
@@ -1080,6 +1086,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
@@ -1335,6 +1344,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
@@ -1551,7 +1563,8 @@ Windows NT PDC is an onerous task. This option allows smbdto create the required
\fBON DEMAND\fR when a user accesses the Samba server.
In order to use this option, smbd
-must be set to \fIsecurity = server\fR or \fI security = domain\fR and \fIadd user script\fR
+must \fBNOT\fR be set to \fIsecurity = share\fR
+and \fIadd user script\fR
must be set to a full pathname for a script that will create a UNIX
user given one argument of \fI%u\fR, which expands into
the UNIX user name to create.
@@ -2102,6 +2115,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
@@ -2329,18 +2359,11 @@ DEMAND\fR when a user accesses the Samba server and the
Windows NT user no longer exists.
In order to use this option, \fBsmbd\fR must be
-set to \fIsecurity = domain\fR and \fIdelete
-user script\fR must be set to a full pathname for a script
-that will delete a UNIX user given one argument of \fI%u
-\fR, which expands into the UNIX user name to delete.
-\fBNOTE\fR that this is different to the \fIadd user script\fR
-which will work with the \fIsecurity = server\fR option
-as well as \fIsecurity = domain\fR. The reason for this
-is only when Samba is a domain member does it get the information
-on an attempted user logon that a user no longer exists. In the
-\fIsecurity = server\fR mode a missing user
-is treated the same as an invalid password logon attempt. Deleting
-the user in this circumstance would not be a good idea.
+set to \fIsecurity = domain\fR or \fIsecurity =
+user\fR and \fIdelete user script\fR
+must be set to a full pathname for a script
+that will delete a UNIX user given one argument of \fI%u\fR,
+which expands into the UNIX user name to delete.
When the Windows user attempts to access the Samba server,
at \fBlogin\fR (session setup in the SMB protocol)
@@ -2879,7 +2902,7 @@ would force all created directories to have read and execute
permissions set for 'group' and 'other' as well as the
read/write/execute bits set for the 'user'.
.TP
-\fBforce directory\fR
+\fBforce directory security mode (S)\fR
This parameter controls what UNIX permission bits
can be modified when a Windows NT client is manipulating the UNIX
permission on a directory using the native NT security dialog box.
@@ -4649,20 +4672,32 @@ alone.
Default: \fBnt pipe support = yes\fR
.TP
\fBnt smb support (G)\fR
-This boolean parameter controls whether smbd(8)will negotiate NT specific SMB
-support with Windows NT clients. Although this is a developer
-debugging option and should be left alone, benchmarking has discovered
-that Windows NT clients give faster performance with this option
-set to no. This is still being investigated.
-If this option is set to no then Samba offers
-exactly the same SMB calls that versions prior to Samba 2.0 offered.
-This information may be of use if any users are having problems
+This boolean parameter controls whether smbd(8)will negotiate NT specific SMB
+support with Windows NT/2k/XP clients. Although this is a developer
+debugging option and should be left alone, benchmarking has discovered
+that Windows NT clients give faster performance with this option
+set to no. This is still being investigated.
+If this option is set to no then Samba offers
+exactly the same SMB calls that versions prior to Samba 2.0 offered.
+This information may be of use if any users are having problems
with NT SMB support.
You should not need to ever disable this parameter.
Default: \fBnt smb 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.
@@ -5076,6 +5111,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.
@@ -5284,6 +5327,9 @@ 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\&.
+
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
@@ -6007,6 +6053,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
@@ -7143,7 +7212,7 @@ again.
Default: \fBwinbind cache type = 15\fR
.TP
-\fBwinbind enum\fR
+\fBwinbind enum users\fR
On large installations using
winbindd(8)it may be
necessary to suppress the enumeration of users through the
@@ -7162,7 +7231,7 @@ usernames.
Default: \fBwinbind enum users = yes \fR
.TP
-\fBwinbind enum\fR
+\fBwinbind enum groups\fR
On large installations using
winbindd(8)it may be
necessary to suppress the enumeration of groups through the
@@ -7195,9 +7264,13 @@ used when listing a username of the form of \fIDOMAIN
is only applicable when using the \fIpam_winbind.so\fR
and \fInss_winbind.so\fR modules for UNIX services.
-Example: \fBwinbind separator = \\\fR
+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
-Example: \fBwinbind separator = +\fR
+Example: \fBwinbind separator = /\fR
.TP
\fBwinbind uid\fR
The winbind gid parameter specifies the range of group
diff --git a/docs/manpages/smbcontrol.1 b/docs/manpages/smbcontrol.1
index 4b27119673a..f93a4eb8097 100644
--- a/docs/manpages/smbcontrol.1
+++ b/docs/manpages/smbcontrol.1
@@ -3,9 +3,9 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBCONTROL" "1" "06 December 2001" "" ""
+.TH "SMBCONTROL" "1" "25 April 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 6f4a0ac1edf..1d6595e301f 100644
--- a/docs/manpages/smbd.8
+++ b/docs/manpages/smbd.8
@@ -3,7 +3,7 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBD" "8" "24 January 2002" "" ""
+.TH "SMBD" "8" "26 April 2002" "" ""
.SH NAME
smbd \- server to provide SMB/CIFS services to clients
.SH SYNOPSIS
@@ -120,7 +120,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/smbpasswd.8 b/docs/manpages/smbpasswd.8
index 290574831cd..6fc0a48a47b 100644
--- a/docs/manpages/smbpasswd.8
+++ b/docs/manpages/smbpasswd.8
@@ -3,12 +3,18 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBPASSWD" "8" "01 February 2002" "" ""
+.TH "SMBPASSWD" "8" "03 April 2002" "" ""
.SH NAME
smbpasswd \- change a user's SMB password
.SH SYNOPSIS
+.PP
+When run by root:
+.sp
+\fBsmbpasswd\fR [ \fBoptions\fR ] [ \fBusername\fR ] [ \fBpassword\fR ]
+.PP
+otherwise:
.sp
-\fBsmbpasswd\fR [ \fB-a\fR ] [ \fB-x\fR ] [ \fB-d\fR ] [ \fB-e\fR ] [ \fB-D debuglevel\fR ] [ \fB-n\fR ] [ \fB-r <remote machine>\fR ] [ \fB-R <name resolve order>\fR ] [ \fB-m\fR ] [ \fB-j DOMAIN\fR ] [ \fB-U username[%password]\fR ] [ \fB-h\fR ] [ \fB-s\fR ] [ \fB-w pass\fR ] [ \fBusername\fR ]
+\fBsmbpasswd\fR [ \fBoptions\fR ] [ \fBpassword\fR ]
.SH "DESCRIPTION"
.PP
This tool is part of the Sambasuite.
@@ -50,25 +56,95 @@ directly, thus enabling changes to be made even if smbd is not
running.
.SH "OPTIONS"
.TP
+\fB-L\fR
+Run the smbpasswd command in local mode. This
+allows a non-root user to specify the root-only options. This
+is used mostly in test environments where a non-root user needs
+to make changes to the local \fIsmbpasswd\fR file.
+The \fIsmbpasswd\fR file must have read/write
+permissions for the user running the command.
+.TP
+\fB-h\fR
+This option prints the help string for
+\fBsmbpasswd\fR.
+.TP
+\fB-s\fR
+This option causes smbpasswd to be silent (i.e.
+not issue prompts) and to read its old and new passwords from
+standard input, rather than from \fI/dev/tty\fR
+(like the \fBpasswd(1)\fR program does). This option
+is to aid people writing scripts to drive smbpasswd
+.TP
+\fB-c smb.conf file\fR
+This option specifies that the configuration
+file specified should be used instead of the default value
+specified at compile time.
+.TP
+\fB-D debuglevel\fR
+\fIdebuglevel\fR 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 to the
+log files about the activities of smbpasswd. At level 0, only
+critical errors and serious warnings will be logged.
+
+Levels above 1 will generate considerable amounts of log
+data, and should only be used when investigating a problem. Levels
+above 3 are designed for use only by developers and generate
+HUGE amounts of log data, most of which is extremely cryptic.
+.TP
+\fB-r remote machine name\fR
+This option allows a user to specify what machine
+they wish to change their password on. Without this parameter
+smbpasswd defaults to the local host. The \fIremote
+machine name\fR is the NetBIOS name of the SMB/CIFS
+server to contact to attempt the password change. This name is
+resolved into an IP address using the standard name resolution
+mechanism in all programs of the Samba suite. See the \fI-R
+name resolve order\fR parameter for details on changing
+this resolving mechanism.
+
+The username whose password is changed is that of the
+current UNIX logged on user. See the \fI-U username\fR
+parameter for details on changing the password for a different
+username.
+
+Note that if changing a Windows NT Domain password the
+remote machine specified must be the Primary Domain Controller for
+the domain (Backup Domain Controllers only have a read-only
+copy of the user account database and will not allow the password
+change).
+
+\fBNote\fR that Windows 95/98 do not have
+a real password database so it is not possible to change passwords
+specifying a Win95/98 machine as remote machine target.
+.TP
+\fB-U username[%pass]\fR
+This option may only be used in conjunction
+with the \fI-r\fR option. When changing
+a password on a remote machine it allows the user to specify
+the user name on that machine whose password will be changed. It
+is present to allow users who have different user names on
+different systems to change these passwords. The optional
+%pass may be used to specify to old password.
+
+In particular, this parameter specifies the username
+used to create the machine account when invoked with -j
+.TP
+\fBNOTE:\fR
+\fBThe following options are available only when the smbpasswd command is
+run as root or in local mode.\fR
+.TP
\fB-a\fR
This option specifies that the username
following should be added to the local smbpasswd file, with the
-new password typed (type <Enter> for the old password). This
-option is ignored if the username following already exists in
+new password typed. This
+option is ignored if the username specified already exists in
the smbpasswd file and it is treated like a regular change
password command. Note that the user to be added must already exist
in the system password file (usually \fI/etc/passwd\fR)
else the request to add the user will fail.
-
-This option is only available when running smbpasswd
-as root.
-.TP
-\fB-x\fR
-This option specifies that the username
-following should be deleted from the local smbpasswd file.
-
-This option is only available when running smbpasswd as
-root.
.TP
\fB-d\fR
This option specifies that the username following
@@ -83,9 +159,6 @@ format) there is no space in the user's password entry to write
this information and so the user is disabled by writing 'X' characters
into the password space in the smbpasswd file. See \fBsmbpasswd(5)
\fRfor details on the 'old' and new password file formats.
-
-This option is only available when running smbpasswd as
-root.
.TP
\fB-e\fR
This option specifies that the username following
@@ -98,22 +171,11 @@ If the smbpasswd file is in the 'old' format, then \fB smbpasswd\fR will prompt
otherwise the account will be enabled by removing the 'D'
flag from account control space in the \fI smbpasswd\fR file. See \fBsmbpasswd (5)\fR for
details on the 'old' and new password file formats.
-
-This option is only available when running smbpasswd as root.
.TP
-\fB-D debuglevel\fR
-\fIdebuglevel\fR 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 to the
-log files about the activities of smbpasswd. At level 0, only
-critical errors and serious warnings will be logged.
-
-Levels above 1 will generate considerable amounts of log
-data, and should only be used when investigating a problem. Levels
-above 3 are designed for use only by developers and generate
-HUGE amounts of log data, most of which is extremely cryptic.
+\fB-m\fR
+This option tells smbpasswd that the account
+being changed is a MACHINE account. Currently this is used
+when Samba is being used as an NT Primary Domain Controller.
.TP
\fB-n\fR
This option specifies that the username following
@@ -128,35 +190,62 @@ file the administrator must set the following parameter in the [global]
section of the \fIsmb.conf\fR file :
\fBnull passwords = yes\fR
-
-This option is only available when running smbpasswd as
-root.
.TP
-\fB-r remote machine name\fR
-This option allows a user to specify what machine
-they wish to change their password on. Without this parameter
-smbpasswd defaults to the local host. The \fIremote
-machine name\fR is the NetBIOS name of the SMB/CIFS
-server to contact to attempt the password change. This name is
-resolved into an IP address using the standard name resolution
-mechanism in all programs of the Samba suite. See the \fI-R
-name resolve order\fR parameter for details on changing
-this resolving mechanism.
+\fB-w password\fR
+This parameter is only available is Samba
+has been configured to use the experimental
+\fB--with-ldapsam\fR option. The \fI-w\fR
+switch is used to specify the password to be used with the
+\fIldap admin
+dn\fR. Note that the password is stored in
+the \fIprivate/secrets.tdb\fR and is keyed off
+of the admin's DN. This means that if the value of \fIldap
+admin dn\fR ever changes, the password will beed to be
+manually updated as well.
+.TP
+\fB-x\fR
+This option specifies that the username
+following should be deleted from the local smbpasswd file.
+.TP
+\fB-j DOMAIN\fR
+This option is used to add a Samba server
+into a Windows NT Domain, as a Domain member capable of authenticating
+user accounts to any Domain Controller in the same way as a Windows
+NT Server. See the \fBsecurity = domain\fR option in
+the \fIsmb.conf(5)\fR man page.
-The username whose password is changed is that of the
-current UNIX logged on user. See the \fI-U username\fR
-parameter for details on changing the password for a different
-username.
+This command can work both with and without the -U parameter.
-Note that if changing a Windows NT Domain password the
-remote machine specified must be the Primary Domain Controller for
-the domain (Backup Domain Controllers only have a read-only
-copy of the user account database and will not allow the password
-change).
+When invoked with -U, that username (and optional password) are
+used to contact the PDC (which must be specified with -r) to both
+create a machine account, and to set a password on it.
-\fBNote\fR that Windows 95/98 do not have
-a real password database so it is not possible to change passwords
-specifying a Win95/98 machine as remote machine target.
+Alternately, if -U is omitted, Samba will contact its PDC
+and attempt to change the password on a pre-existing account.
+
+In order to be used in this way, the Administrator for
+the Windows NT Domain must have used the program "Server Manager
+for Domains" to add the primary NetBIOS name of the Samba server
+as a member of the Domain.
+
+After this has been done, to join the Domain invoke \fB smbpasswd\fR with this parameter. smbpasswd will then
+look up the Primary Domain Controller for the Domain (found in
+the \fIsmb.conf\fR file in the parameter
+\fIpassword server\fR and change the machine account
+password used to create the secure Domain communication.
+
+Either way, this password is then stored by smbpasswd in a TDB,
+writeable only by root, called \fIsecrets.tdb\fR
+
+Once this operation has been performed the \fI smb.conf\fR file may be updated to set the \fB security = domain\fR option and all future logins
+to the Samba server will be authenticated to the Windows NT
+PDC.
+
+Note that even though the authentication is being
+done to the PDC all users accessing the Samba server must still
+have a valid UNIX account on that machine.
+The \fBwinbindd(8)\fR daemon can be used
+to create UNIX accounts for NT users.
.TP
\fB-R name resolve order\fR
This option allows the user of smbpasswd to determine
@@ -177,7 +266,7 @@ any name type matches for lookup.
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 depended for instance on IRIX or Solaris this
+is operating system dependent. For instance, on IRIX or Solaris this
may be controlled by the \fI/etc/nsswitch.conf\fR
file). Note that this method is only used if the NetBIOS name
type being queried is the 0x20 (server) name type, otherwise
@@ -203,94 +292,15 @@ and without this parameter or any entry in the
be attempted in this order.
.PP
.TP
-\fB-m\fR
-This option tells smbpasswd that the account
-being changed is a MACHINE account. Currently this is used
-when Samba is being used as an NT Primary Domain Controller.
-
-This option is only available when running smbpasswd as root.
-.TP
-\fB-j DOMAIN\fR
-This option is used to add a Samba server
-into a Windows NT Domain, as a Domain member capable of authenticating
-user accounts to any Domain Controller in the same way as a Windows
-NT Server. See the \fBsecurity = domain\fR option in
-the \fIsmb.conf(5)\fR man page.
-
-This command can work both with and without the -U parameter.
-
-When invoked with -U, that username (and optional password) are
-used to contact the PDC (which must be specified with -r) to both
-create a machine account, and to set a password on it.
-
-Alternately, if -U is omitted, Samba will contact its PDC
-and attempt to change the password on a pre-existing account.
-
-In order to be used in this way, the Administrator for
-the Windows NT Domain must have used the program "Server Manager
-for Domains" to add the primary NetBIOS name of the Samba server
-as a member of the Domain.
-
-After this has been done, to join the Domain invoke \fB smbpasswd\fR with this parameter. smbpasswd will then
-look up the Primary Domain Controller for the Domain (found in
-the \fIsmb.conf\fR file in the parameter
-\fIpassword server\fR and change the machine account
-password used to create the secure Domain communication.
-
-Either way, this password is then stored by smbpasswd in a TDB,
-writeable only by root, called \fIsecrets.tdb\fR
-
-Once this operation has been performed the \fI smb.conf\fR file may be updated to set the \fB security = domain\fR option and all future logins
-to the Samba server will be authenticated to the Windows NT
-PDC.
-
-Note that even though the authentication is being
-done to the PDC all users accessing the Samba server must still
-have a valid UNIX account on that machine.
-The \fBwinbindd(8)\fR daemon can be used
-to create UNIX accounts for NT users.
-
-This option is only available when running smbpasswd as root.
-.TP
-\fB-U username\fR
-This option may only be used in conjunction
-with the \fI-r\fR option. When changing
-a password on a remote machine it allows the user to specify
-the user name on that machine whose password will be changed. It
-is present to allow users who have different user names on
-different systems to change these passwords.
-
-In particular, this parameter specifies the username
-used to create the machine account when invoked with -j
-.TP
-\fB-h\fR
-This option prints the help string for \fB smbpasswd\fR, selecting the correct one for running as root
-or as an ordinary user.
-.TP
-\fB-s\fR
-This option causes smbpasswd to be silent (i.e.
-not issue prompts) and to read its old and new passwords from
-standard input, rather than from \fI/dev/tty\fR
-(like the \fBpasswd(1)\fR program does). This option
-is to aid people writing scripts to drive smbpasswd
-.TP
-\fB-w password\fR
-This parameter is only available is Samba
-has been configured to use the experimental
-\fB--with-ldapsam\fR option. The \fI-w\fR
-switch is used to specify the password to be used with the
-\fIldap admin
-dn\fR. Note that the password is stored in
-the \fIprivate/secrets.tdb\fR and is keyed off
-of the admin's DN. This means that if the value of \fIldap
-admin dn\fR ever changes, the password will beed to be
-manually updated as well.
-.TP
\fBusername\fR
This specifies the username for all of the
\fBroot only\fR options to operate on. Only root
can specify this parameter as only root has the permission needed
to modify attributes directly in the local smbpasswd file.
+.TP
+\fBpassword\fR
+This specifies the new password. If this parameter
+is specified you will not be prompted for the new password.
.SH "NOTES"
.PP
Since \fBsmbpasswd\fR works in client-server
diff --git a/examples/LDAP/samba.schema b/examples/LDAP/samba.schema
index 28828f4f940..be088c74033 100644
--- a/examples/LDAP/samba.schema
+++ b/examples/LDAP/samba.schema
@@ -6,8 +6,8 @@
## Prerequisite schemas - uid (cosine.schema)
## - displayName (inetorgperson.schema)
##
-## 1.3.1.5.1.4.1.7165.2.1.x - attributetypes
-## 1.3.1.5.1.4.1.7165.2.2.x - objectclasses
+## 1.3.6.1.4.1.7165.2.1.x - attributetypes
+## 1.3.6.1.4.1.7165.2.2.x - objectclasses
##
##
@@ -114,12 +114,12 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID'
## The smbPasswordEntry objectclass has been depreciated in favor of the
## sambaAccount objectclass
##
-#objectclass ( 1.3.1.5.1.4.1.7165.2.2.1 NAME 'smbPasswordEntry' SUP top AUXILIARY
+#objectclass ( 1.3.6.1.4.1.7165.2.2.1 NAME 'smbPasswordEntry' SUP top AUXILIARY
# DESC 'Samba smbpasswd entry'
# MUST ( uid $ uidNumber )
# MAY ( lmPassword $ ntPassword $ pwdLastSet $ acctFlags ))
-objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
+objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
DESC 'Samba Account'
MUST ( uid $ rid )
MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
@@ -130,11 +130,11 @@ objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
##
## Used for Winbind experimentation
##
-objectclass ( 1.3.1.5.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY
+objectclass ( 1.3.6.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY
DESC 'Pool for allocating UNIX uids'
MUST ( uidNumber $ cn ) )
-objectclass ( 1.3.1.5.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY
+objectclass ( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY
DESC 'Pool for allocating UNIX gids'
MUST ( gidNumber $ cn ) )
diff --git a/examples/VFS/Makefile b/examples/VFS/Makefile
index 9c216cd29b8..eaa1ffbb54e 100644
--- a/examples/VFS/Makefile
+++ b/examples/VFS/Makefile
@@ -13,7 +13,7 @@ SAMBA_INCL = ../../source/include
UBIQX_SRC = ../../source/ubiqx
SMBWR_SRC = ../../source/smbwrapper
CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g
-VFS_OBJS = audit.so skel.so
+VFS_OBJS = audit.so skel.so recycle.so
# Default target
diff --git a/examples/VFS/README b/examples/VFS/README
index 825f8a961ff..91ef37a2ac3 100644
--- a/examples/VFS/README
+++ b/examples/VFS/README
@@ -17,10 +17,14 @@ construction. The following VFS modules are given:
connect/disconnect, directory opens/create/remove,
file open/close/rename/unlink/chmod.
+ recycle
+ Add a recycle bin facility to a samba share
+
block/
A directory containing a sample module by Ronald Kuetemeier
<ronald@kuetemeier.com> to block named symbolic link following.
+ Note: Config file is in /etc/samba/samba-block.conf
The libtool program, available from your favourite GNU software
archive, is required to compile these programs.
diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c
index ce2aa52250e..aad483c295a 100644
--- a/examples/VFS/audit.c
+++ b/examples/VFS/audit.c
@@ -47,16 +47,19 @@
/* Function prototypes */
-int audit_connect(struct connection_struct *conn, char *svc, char *user);
+int audit_connect(struct connection_struct *conn, const char *svc, const char *user);
void audit_disconnect(struct connection_struct *conn);
-DIR *audit_opendir(struct connection_struct *conn, char *fname);
-int audit_mkdir(struct connection_struct *conn, char *path, mode_t mode);
-int audit_rmdir(struct connection_struct *conn, char *path);
-int audit_open(struct connection_struct *conn, char *fname, int flags, mode_t mode);
+DIR *audit_opendir(struct connection_struct *conn, const char *fname);
+int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode);
+int audit_rmdir(struct connection_struct *conn, const char *path);
+int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode);
int audit_close(struct files_struct *fsp, int fd);
-int audit_rename(struct connection_struct *conn, char *old, char *new);
-int audit_unlink(struct connection_struct *conn, char *path);
-int audit_chmod(struct connection_struct *conn, char *path, mode_t mode);
+int audit_rename(struct connection_struct *conn, const char *old, const char *new);
+int audit_unlink(struct connection_struct *conn, const char *path);
+int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode);
+int audit_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode);
+int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode);
+int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode);
/* VFS operations */
@@ -92,32 +95,86 @@ struct vfs_ops audit_ops = {
NULL, /* lstat */
audit_unlink,
audit_chmod,
+ audit_fchmod,
NULL, /* chown */
+ NULL, /* fchown */
NULL, /* chdir */
NULL, /* getwd */
NULL, /* utime */
NULL, /* ftruncate */
NULL, /* lock */
+ NULL, /* symlink */
+ NULL, /* readlink */
+ NULL, /* link */
+ NULL, /* mknod */
+ NULL, /* realpath */
NULL, /* fget_nt_acl */
NULL, /* get_nt_acl */
NULL, /* fset_nt_acl */
- NULL /* set_nt_acl */
+ NULL, /* set_nt_acl */
+
+ audit_chmod_acl, /* chmod_acl */
+ audit_fchmod_acl, /* fchmod_acl */
+
+ NULL, /* sys_acl_get_entry */
+ NULL, /* sys_acl_get_tag_type */
+ NULL, /* sys_acl_get_permset */
+ NULL, /*sys_acl_get_qualifier */
+ NULL, /* sys_acl_get_file */
+ NULL, /* sys_acl_get_fd */
+ NULL, /* sys_acl_clear_perms */
+ NULL, /* sys_acl_add_perm */
+ NULL, /* sys_acl_to_text */
+ NULL, /* sys_acl_init */
+ NULL, /* sys_acl_create_entry */
+ NULL, /* sys_acl_set_tag_type */
+ NULL, /* sys_acl_set_qualifier */
+ NULL, /* sys_acl_set_permset */
+ NULL, /* sys_acl_valid */
+ NULL, /* sys_acl_set_file */
+ NULL, /* sys_acl_set_fd */
+ NULL, /* sys_acl_delete_def_file */
+ NULL, /* sys_acl_get_perm */
+ NULL, /* sys_acl_free_text */
+ NULL, /* sys_acl_free_acl */
+ NULL /* sys_acl_free_qualifier */
};
/* VFS initialisation function. Return initialised vfs_ops structure
back to SAMBA. */
-BOOL vfs_init(connection_struct *conn)
+struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops)
{
+ struct vfs_ops tmp_ops;
+
+ *vfs_version = SMB_VFS_INTERFACE_VERSION;
+ memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops));
+
+ tmp_ops.connect = audit_connect;
+ tmp_ops.disconnect = audit_disconnect;
+ tmp_ops.opendir = audit_opendir;
+ tmp_ops.mkdir = audit_mkdir;
+ tmp_ops.rmdir = audit_rmdir;
+ tmp_ops.open = audit_open;
+ tmp_ops.close = audit_close;
+ tmp_ops.rename = audit_rename;
+ tmp_ops.unlink = audit_unlink;
+ tmp_ops.chmod = audit_chmod;
+ tmp_ops.chmod_acl = audit_chmod_acl;
+ tmp_ops.fchmod = audit_fchmod;
+ tmp_ops.fchmod_acl = audit_fchmod_acl;
+
+ memcpy(&audit_ops, &tmp_ops, sizeof(struct vfs_ops));
+
openlog("smbd_audit", LOG_PID, SYSLOG_FACILITY);
syslog(SYSLOG_PRIORITY, "VFS_INIT: vfs_ops loaded\n");
- return True;
+ return &audit_ops;
}
/* Implementation of vfs_ops. Pass everything on to the default
operation but log event first. */
-int audit_connect(struct connection_struct *conn, char *svc, char *user)
+int audit_connect(struct connection_struct *conn, const char *svc, const char *user)
{
syslog(SYSLOG_PRIORITY, "connect to service %s by user %s\n",
svc, user);
@@ -131,7 +188,7 @@ void audit_disconnect(struct connection_struct *conn)
default_vfs_ops.disconnect(conn);
}
-DIR *audit_opendir(struct connection_struct *conn, char *fname)
+DIR *audit_opendir(struct connection_struct *conn, const char *fname)
{
DIR *result = default_vfs_ops.opendir(conn, fname);
@@ -143,7 +200,7 @@ DIR *audit_opendir(struct connection_struct *conn, char *fname)
return result;
}
-int audit_mkdir(struct connection_struct *conn, char *path, mode_t mode)
+int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode)
{
int result = default_vfs_ops.mkdir(conn, path, mode);
@@ -155,7 +212,7 @@ int audit_mkdir(struct connection_struct *conn, char *path, mode_t mode)
return result;
}
-int audit_rmdir(struct connection_struct *conn, char *path)
+int audit_rmdir(struct connection_struct *conn, const char *path)
{
int result = default_vfs_ops.rmdir(conn, path);
@@ -167,7 +224,7 @@ int audit_rmdir(struct connection_struct *conn, char *path)
return result;
}
-int audit_open(struct connection_struct *conn, char *fname, int flags, mode_t mode)
+int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode)
{
int result = default_vfs_ops.open(conn, fname, flags, mode);
@@ -192,7 +249,7 @@ int audit_close(struct files_struct *fsp, int fd)
return result;
}
-int audit_rename(struct connection_struct *conn, char *old, char *new)
+int audit_rename(struct connection_struct *conn, const char *old, const char *new)
{
int result = default_vfs_ops.rename(conn, old, new);
@@ -204,7 +261,7 @@ int audit_rename(struct connection_struct *conn, char *old, char *new)
return result;
}
-int audit_unlink(struct connection_struct *conn, char *path)
+int audit_unlink(struct connection_struct *conn, const char *path)
{
int result = default_vfs_ops.unlink(conn, path);
@@ -216,7 +273,7 @@ int audit_unlink(struct connection_struct *conn, char *path)
return result;
}
-int audit_chmod(struct connection_struct *conn, char *path, mode_t mode)
+int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode)
{
int result = default_vfs_ops.chmod(conn, path, mode);
@@ -228,3 +285,38 @@ int audit_chmod(struct connection_struct *conn, char *path, mode_t mode)
return result;
}
+int audit_chmod_acl(struct connection_struct *conn, const char *path, mode_t mode)
+{
+ int result = default_vfs_ops.chmod_acl(conn, path, mode);
+
+ syslog(SYSLOG_PRIORITY, "chmod_acl %s mode 0x%x %s%s\n",
+ path, mode,
+ (result < 0) ? "failed: " : "",
+ (result < 0) ? strerror(errno) : "");
+
+ return result;
+}
+
+int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode)
+{
+ int result = default_vfs_ops.fchmod(fsp, fd, mode);
+
+ syslog(SYSLOG_PRIORITY, "fchmod %s mode 0x%x %s%s\n",
+ fsp->fsp_name, mode,
+ (result < 0) ? "failed: " : "",
+ (result < 0) ? strerror(errno) : "");
+
+ return result;
+}
+
+int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode)
+{
+ int result = default_vfs_ops.fchmod_acl(fsp, fd, mode);
+
+ syslog(SYSLOG_PRIORITY, "fchmod_acl %s mode 0x%x %s%s\n",
+ fsp->fsp_name, mode,
+ (result < 0) ? "failed: " : "",
+ (result < 0) ? strerror(errno) : "");
+
+ return result;
+}
diff --git a/examples/VFS/block/Makefile b/examples/VFS/block/Makefile
index dcc7c077936..4887915fb4f 100644
--- a/examples/VFS/block/Makefile
+++ b/examples/VFS/block/Makefile
@@ -8,11 +8,11 @@
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
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g -D_LARGEFILE63_SOURCE -D_GNU_SOURCE -fno-builtin
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g
VFS_OBJS = block.so
diff --git a/examples/VFS/block/block.c b/examples/VFS/block/block.c
index 3c4f736e849..8c0fa61d506 100644
--- a/examples/VFS/block/block.c
+++ b/examples/VFS/block/block.c
@@ -47,8 +47,8 @@
-DIR *block_opendir(struct connection_struct *conn, char *fname);
-int block_connect(struct connection_struct *conn, char *service, char *user);
+DIR *block_opendir(struct connection_struct *conn, const char *fname);
+int block_connect(struct connection_struct *conn, const char *service, const char *user);
void block_disconnect(struct connection_struct *conn);
@@ -63,49 +63,82 @@ struct vfs_ops execute_vfs_ops = {
block_connect,
block_disconnect,
- NULL, /* disk free */
+ NULL, /* disk free */
/* Directory operations */
block_opendir,
- NULL, /* readdir */
- NULL,
- NULL,
- NULL, /* closedir */
+ NULL, /* readdir */
+ NULL, /* mkdir */
+ NULL, /* rmdir */
+ NULL, /* closedir */
/* File operations */
- NULL,
- NULL,
- NULL, /* read */
- NULL, /* write */
- NULL, /* lseek */
- NULL,
- NULL, /* fsync */
- NULL, /* stat */
- NULL, /* fstat */
- NULL, /* lstat */
- NULL,
- NULL,
- NULL,
- NULL, /* chown */
- NULL,
- NULL, /* chdir */
- NULL, /* getwd */
- NULL, /* utime */
- NULL, /* ftruncate */
- NULL, /* lock */
- NULL, /* fget_nt_acl */
- NULL, /* get_nt_acl */
- NULL, /* fset_nt_acl */
- NULL, /* set_nt_acl */
- NULL,
- NULL
+ NULL, /* open */
+ NULL, /* close */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* lseek */
+ NULL, /* rename */
+ NULL, /* fsync */
+ NULL, /* stat */
+ NULL, /* fstat */
+ NULL, /* lstat */
+ NULL, /* unlink */
+ NULL, /* chmod */
+ NULL, /* fchmod */
+ NULL, /* chown */
+ NULL, /* fchown */
+ NULL, /* chdir */
+ NULL, /* getwd */
+ NULL, /* utime */
+ NULL, /* ftruncate */
+ NULL, /* lock */
+ NULL, /* symlink */
+ NULL, /* readlink */
+ NULL, /* link */
+ NULL, /* mknod */
+ NULL, /* realpath */
+
+ /* NT ACL operations */
+
+ NULL, /* fget_nt_acl */
+ NULL, /* get_nt_acl */
+ NULL, /* fset_nt_acl */
+ NULL, /* set_nt_acl */
+
+ /* POSIX ACL operations. */
+
+ NULL, /* chmod_acl */
+ NULL, /* fchmod_acl */
+ NULL, /* sys_acl_get_entry */
+ NULL, /* sys_acl_get_tag_type */
+ NULL, /* sys_acl_get_permset */
+ NULL, /* sys_acl_get_qualifier */
+ NULL, /* sys_acl_get_file */
+ NULL, /* sys_acl_get_fd */
+ NULL, /* sys_acl_clear_perms */
+ NULL, /* sys_acl_add_perm */
+ NULL, /* sys_acl_to_text */
+ NULL, /* sys_acl_init */
+ NULL, /* sys_acl_create_entry */
+ NULL, /* sys_acl_set_tag_type */
+ NULL, /* sys_acl_set_qualifier */
+ NULL, /* sys_acl_set_permset */
+ NULL, /* sys_acl_valid */
+ NULL, /* sys_acl_set_file */
+ NULL, /* sys_acl_set_fd */
+ NULL, /* sys_acl_delete_def_file */
+ NULL, /* sys_acl_get_perm */
+ NULL, /* sys_acl_free_text */
+ NULL, /* sys_acl_free_acl */
+ NULL /* sys_acl_free_qualifier */
};
#ifndef PARAMCONF
-#define PARAMCONF "/etc/samba-block.conf"
+#define PARAMCONF "/etc/samba/samba-block.conf"
#endif
extern BOOL pm_process(char *FileName, BOOL (*sfunc)(char *), BOOL(*pfunc)(char * , char *));
@@ -117,7 +150,7 @@ BOOL get_section(char *sect);
BOOL get_parameter_value(char *param, char *value);
BOOL load_param(void);
BOOL search(struct stat *stat_buf);
-BOOL dir_search(char *link, char *dir);
+BOOL dir_search(char *link, const char *dir);
BOOL enter_pblock_dir(char *dir);
@@ -297,10 +330,20 @@ BOOL get_parameter_value(char *param, char *value)
/* VFS initialisation function. Return initialised vfs_ops structure
back to SAMBA. */
-struct vfs_ops *vfs_init(int *vfs_version)
+struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops)
{
+ struct vfs_ops tmp_ops;
+
*vfs_version = SMB_VFS_INTERFACE_VERSION;
+ memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops));
+
+ /* Override the ones we want. */
+ tmp_ops.connect = block_connect;
+ tmp_ops.disconnect = block_disconnect;
+ tmp_ops.opendir = block_opendir;
+
+ memcpy(&execute_vfs_ops, &tmp_ops, sizeof(struct vfs_ops));
return(&execute_vfs_ops);
}
@@ -309,7 +352,7 @@ struct vfs_ops *vfs_init(int *vfs_version)
* VFS connect and param file loading
*/
-int block_connect(struct connection_struct *conn, char *service, char *user)
+int block_connect(struct connection_struct *conn, const char *service, const char *user)
{
if((load_param()) == FALSE)
{
@@ -360,7 +403,7 @@ void block_disconnect(struct connection_struct *conn)
* VFS opendir
*/
-DIR *block_opendir(struct connection_struct *conn, char *fname)
+DIR *block_opendir(struct connection_struct *conn, const char *fname)
{
char *dir_name = NULL;
@@ -416,7 +459,7 @@ BOOL search(struct stat *stat_buf)
* Find dir in list to block id the starting point is link from a share
*/
-BOOL dir_search(char *link, char *dir)
+BOOL dir_search(char *link, const char *dir)
{
char buf[PATH_MAX +1], *ext_path;
int len = 0;
@@ -457,90 +500,3 @@ BOOL dir_search(char *link, char *dir)
return FALSE;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c
index 65cb4bfe0d5..bb5486e690b 100644
--- a/examples/VFS/skel.c
+++ b/examples/VFS/skel.c
@@ -39,31 +39,19 @@
#include <vfs.h>
extern struct vfs_ops default_vfs_ops; /* For passthrough operation */
-struct vfs_ops skel_ops;
+extern struct vfs_ops skel_ops;
-
-
-/* VFS initialisation - return vfs_ops function pointer structure */
-
-BOOL vfs_init(connection_struct *conn)
-{
- DEBUG(3, ("Initialising default vfs hooks\n"));
-
- memcpy(&conn->vfs_ops, &skel_ops, sizeof(struct vfs_ops));
- return True;
-}
-
-int skel_connect(struct connection_struct *conn, char *service, char *user)
+static int skel_connect(struct connection_struct *conn, const char *service, const char *user)
{
return default_vfs_ops.connect(conn, service, user);
}
-void skel_disconnect(struct connection_struct *conn)
+static void skel_disconnect(struct connection_struct *conn)
{
default_vfs_ops.disconnect(conn);
}
-SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path,
+static SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, const char *path,
BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
@@ -71,171 +59,383 @@ SMB_BIG_UINT skel_disk_free(struct connection_struct *conn, char *path,
dfree, dsize);
}
-DIR *skel_opendir(struct connection_struct *conn, char *fname)
+static DIR *skel_opendir(struct connection_struct *conn, const char *fname)
{
return default_vfs_ops.opendir(conn, fname);
}
-struct dirent *skel_readdir(struct connection_struct *conn, DIR *dirp)
+static struct dirent *skel_readdir(struct connection_struct *conn, DIR *dirp)
{
return default_vfs_ops.readdir(conn, dirp);
}
-int skel_mkdir(struct connection_struct *conn, char *path, mode_t mode)
+static int skel_mkdir(struct connection_struct *conn, const char *path, mode_t mode)
{
return default_vfs_ops.mkdir(conn, path, mode);
}
-int skel_rmdir(struct connection_struct *conn, char *path)
+static int skel_rmdir(struct connection_struct *conn, const char *path)
{
return default_vfs_ops.rmdir(conn, path);
}
-int skel_closedir(struct connection_struct *conn, DIR *dir)
+static int skel_closedir(struct connection_struct *conn, DIR *dir)
{
return default_vfs_ops.closedir(conn, dir);
}
-int skel_open(struct connection_struct *conn, char *fname, int flags, mode_t mode)
+static int skel_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode)
{
return default_vfs_ops.open(conn, fname, flags, mode);
}
-int skel_close(struct files_struct *fsp, int fd)
+static int skel_close(struct files_struct *fsp, int fd)
{
return default_vfs_ops.close(fsp, fd);
}
-ssize_t skel_read(struct files_struct *fsp, int fd, char *data, size_t n)
+static ssize_t skel_read(struct files_struct *fsp, int fd, void *data, size_t n)
{
return default_vfs_ops.read(fsp, fd, data, n);
}
-ssize_t skel_write(struct files_struct *fsp, int fd, char *data, size_t n)
+static ssize_t skel_write(struct files_struct *fsp, int fd, const void *data, size_t n)
{
return default_vfs_ops.write(fsp, fd, data, n);
}
-SMB_OFF_T skel_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
+static SMB_OFF_T skel_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
{
return default_vfs_ops.lseek(fsp, filedes, offset, whence);
}
-int skel_rename(struct connection_struct *conn, char *old, char *new)
+static int skel_rename(struct connection_struct *conn, const char *old, const char *new)
{
return default_vfs_ops.rename(conn, old, new);
}
-int skel_fsync(struct files_struct *fsp, int fd)
+static int skel_fsync(struct files_struct *fsp, int fd)
{
return default_vfs_ops.fsync(fsp, fd);
}
-int skel_stat(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf)
+static int skel_stat(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf)
{
return default_vfs_ops.stat(conn, fname, sbuf);
}
-int skel_fstat(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf)
+static int skel_fstat(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf)
{
return default_vfs_ops.fstat(fsp, fd, sbuf);
}
-int skel_lstat(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf)
+static int skel_lstat(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf)
{
return default_vfs_ops.lstat(conn, path, sbuf);
}
-int skel_unlink(struct connection_struct *conn, char *path)
+static int skel_unlink(struct connection_struct *conn, const char *path)
{
return default_vfs_ops.unlink(conn, path);
}
-int skel_chmod(struct connection_struct *conn, char *path, mode_t mode)
+static int skel_chmod(struct connection_struct *conn, const char *path, mode_t mode)
{
return default_vfs_ops.chmod(conn, path, mode);
}
-int skel_fchmod(struct files_struct *fsp, int fd, mode_t mode)
+static int skel_fchmod(struct files_struct *fsp, int fd, mode_t mode)
{
return default_vfs_ops.fchmod(fsp, fd, mode);
}
-int skel_chown(struct connection_struct *conn, char *path, uid_t uid, gid_t gid)
+static int skel_chown(struct connection_struct *conn, const char *path, uid_t uid, gid_t gid)
{
return default_vfs_ops.chown(conn, path, uid, gid);
}
-int skel_fchown(struct files_struct *fsp, int fd, uid_t uid, gid_t gid)
+static int skel_fchown(struct files_struct *fsp, int fd, uid_t uid, gid_t gid)
{
return default_vfs_ops.fchown(fsp, fd, uid, gid);
}
-int skel_chdir(struct connection_struct *conn, char *path)
+static int skel_chdir(struct connection_struct *conn, const char *path)
{
return default_vfs_ops.chdir(conn, path);
}
-char *skel_getwd(struct connection_struct *conn, char *buf)
+static char *skel_getwd(struct connection_struct *conn, char *buf)
{
return default_vfs_ops.getwd(conn, buf);
}
-int skel_utime(struct connection_struct *conn, char *path, struct utimbuf *times)
+static int skel_utime(struct connection_struct *conn, const char *path, struct utimbuf *times)
{
return default_vfs_ops.utime(conn, path, times);
}
-int skel_ftruncate(struct files_struct *fsp, int fd, SMB_OFF_T offset)
+static int skel_ftruncate(struct files_struct *fsp, int fd, SMB_OFF_T offset)
{
return default_vfs_ops.ftruncate(fsp, fd, offset);
}
-BOOL skel_lock(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+static BOOL skel_lock(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
return default_vfs_ops.lock(fsp, fd, op, offset, count, type);
}
-BOOL skel_symlink(struct connection_struct *conn, const char *oldpath, const char *newpath)
+static BOOL skel_symlink(struct connection_struct *conn, const char *oldpath, const char *newpath)
{
return default_vfs_ops.symlink(conn, oldpath, newpath);
}
-BOOL skel_readlink(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz)
+static BOOL skel_readlink(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz)
{
return default_vfs_ops.readlink(conn, path, buf, bufsiz);
}
-size_t skel_fget_nt_acl(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc)
+static int skel_link(struct connection_struct *conn, const char *oldpath, const char *newpath)
+{
+ return default_vfs_ops.link(conn, oldpath, newpath);
+}
+
+static int skel_mknod(struct connection_struct *conn, const char *path, mode_t mode, SMB_DEV_T dev)
+{
+ return default_vfs_ops.mknod(conn, path, mode, dev);
+}
+
+static char *skel_realpath(struct connection_struct *conn, const char *path, char *resolved_path)
+{
+ return default_vfs_ops.realpath(conn, path, resolved_path);
+}
+
+static size_t skel_fget_nt_acl(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc)
{
return default_vfs_ops.fget_nt_acl(fsp, fd, ppdesc);
}
-size_t skel_get_nt_acl(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc)
+static size_t skel_get_nt_acl(struct files_struct *fsp, const char *name, struct security_descriptor_info **ppdesc)
{
return default_vfs_ops.get_nt_acl(fsp, name, ppdesc);
}
-BOOL skel_fset_nt_acl(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd)
+static BOOL skel_fset_nt_acl(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd)
{
return default_vfs_ops.fset_nt_acl(fsp, fd, security_info_sent, psd);
}
-BOOL skel_set_nt_acl(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd)
+static BOOL skel_set_nt_acl(struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd)
{
return default_vfs_ops.set_nt_acl(fsp, name, security_info_sent, psd);
}
-BOOL skel_chmod_acl(struct connection_struct *conn, char *name, mode_t mode)
+static BOOL skel_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode)
{
return default_vfs_ops.chmod_acl(conn, name, mode);
}
-BOOL skel_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode)
+static BOOL skel_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode)
{
return default_vfs_ops.fchmod_acl(fsp, fd, mode);
}
+static int skel_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
+{
+ return default_vfs_ops.sys_acl_get_entry(conn, theacl, entry_id, entry_p);
+}
+
+static int skel_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p)
+{
+ return default_vfs_ops.sys_acl_get_tag_type(conn, entry_d, tag_type_p);
+}
+
+static int skel_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p)
+{
+ return default_vfs_ops.sys_acl_get_permset(conn, entry_d, permset_p);
+}
+
+static void *skel_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d)
+{
+ return default_vfs_ops.sys_acl_get_qualifier(conn, entry_d);
+}
+
+static SMB_ACL_T skel_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type)
+{
+ return default_vfs_ops.sys_acl_get_file(conn, path_p, type);
+}
+
+static SMB_ACL_T skel_sys_acl_get_fd(struct files_struct *fsp, int fd)
+{
+ return default_vfs_ops.sys_acl_get_fd(fsp, fd);
+}
+
+static int skel_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset)
+{
+ return default_vfs_ops.sys_acl_clear_perms(conn, permset);
+}
+
+static int skel_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
+{
+ return default_vfs_ops.sys_acl_add_perm(conn, permset, perm);
+}
+
+static char *skel_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen)
+{
+ return default_vfs_ops.sys_acl_to_text(conn, theacl, plen);
+}
+
+static SMB_ACL_T skel_sys_acl_init(struct connection_struct *conn, int count)
+{
+ return default_vfs_ops.sys_acl_init(conn, count);
+}
+
+static int skel_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
+{
+ return default_vfs_ops.sys_acl_create_entry(conn, pacl, pentry);
+}
+
+static int skel_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype)
+{
+ return default_vfs_ops.sys_acl_set_tag_type(conn, entry, tagtype);
+}
+
+static int skel_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual)
+{
+ return default_vfs_ops.sys_acl_set_qualifier(conn, entry, qual);
+}
+
+static int skel_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
+{
+ return default_vfs_ops.sys_acl_set_permset(conn, entry, permset);
+}
+
+static int skel_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl )
+{
+ return default_vfs_ops.sys_acl_valid(conn, theacl );
+}
+
+static int skel_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
+{
+ return default_vfs_ops.sys_acl_set_file(conn, name, acltype, theacl);
+}
+
+static int skel_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl)
+{
+ return default_vfs_ops.sys_acl_set_fd(fsp, fd, theacl);
+}
+
+static int skel_sys_acl_delete_def_file(struct connection_struct *conn, const char *path)
+{
+ return default_vfs_ops.sys_acl_delete_def_file(conn, path);
+}
+
+static int skel_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
+{
+ return default_vfs_ops.sys_acl_get_perm(conn, permset, perm);
+}
+
+static int skel_sys_acl_free_text(struct connection_struct *conn, char *text)
+{
+ return default_vfs_ops.sys_acl_free_text(conn, text);
+}
+
+static int skel_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl)
+{
+ return default_vfs_ops.sys_acl_free_acl(conn, posix_acl);
+}
+
+static int skel_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype)
+{
+ return default_vfs_ops.sys_acl_free_qualifier(conn, qualifier, tagtype);
+}
+
+/* VFS initialisation - return vfs_ops function pointer structure */
+
+struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops)
+{
+ struct vfs_ops tmp_ops;
+
+ DEBUG(3, ("Initialising default vfs hooks\n"));
+
+ *vfs_version = SMB_VFS_INTERFACE_VERSION;
+ memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops));
+
+ tmp_ops.connect = skel_connect;
+ tmp_ops.disconnect = skel_disconnect;
+ tmp_ops.disk_free = skel_disk_free;
+
+ /* Directory operations */
+
+ tmp_ops.opendir = skel_opendir;
+ tmp_ops.readdir = skel_readdir;
+ tmp_ops.mkdir = skel_mkdir;
+ tmp_ops.rmdir = skel_rmdir;
+ tmp_ops.closedir = skel_closedir;
+
+ /* File operations */
+
+ tmp_ops.open = skel_open;
+ tmp_ops.close = skel_close;
+ tmp_ops.read = skel_read;
+ tmp_ops.write = skel_write;
+ tmp_ops.lseek = skel_lseek;
+ tmp_ops.rename = skel_rename;
+ tmp_ops.fsync = skel_fsync;
+ tmp_ops.stat = skel_stat;
+ tmp_ops.fstat = skel_fstat;
+ tmp_ops.lstat = skel_lstat;
+ tmp_ops.unlink = skel_unlink;
+ tmp_ops.chmod = skel_chmod;
+ tmp_ops.fchmod = skel_fchmod;
+ tmp_ops.chown = skel_chown;
+ tmp_ops.fchown = skel_fchown;
+ tmp_ops.chdir = skel_chdir;
+ tmp_ops.getwd = skel_getwd;
+ tmp_ops.utime = skel_utime;
+ tmp_ops.ftruncate = skel_ftruncate;
+ tmp_ops.lock = skel_lock;
+ tmp_ops.symlink = skel_symlink;
+ tmp_ops.readlink = skel_readlink;
+ tmp_ops.link = skel_link;
+ tmp_ops.mknod = skel_mknod;
+ tmp_ops.realpath = skel_realpath;
+
+ tmp_ops.fget_nt_acl = skel_fget_nt_acl;
+ tmp_ops.get_nt_acl = skel_get_nt_acl;
+ tmp_ops.fset_nt_acl = skel_fset_nt_acl;
+ tmp_ops.set_nt_acl = skel_set_nt_acl;
+
+ /* POSIX ACL operations. */
+
+ tmp_ops.chmod_acl = skel_chmod_acl;
+ tmp_ops.fchmod_acl = skel_fchmod_acl;
+ tmp_ops.sys_acl_get_entry = skel_sys_acl_get_entry;
+ tmp_ops.sys_acl_get_tag_type = skel_sys_acl_get_tag_type;
+ tmp_ops.sys_acl_get_permset = skel_sys_acl_get_permset;
+ tmp_ops.sys_acl_get_qualifier = skel_sys_acl_get_qualifier;
+ tmp_ops.sys_acl_get_file = skel_sys_acl_get_file;
+ tmp_ops.sys_acl_get_fd = skel_sys_acl_get_fd;
+ tmp_ops.sys_acl_clear_perms = skel_sys_acl_clear_perms;
+ tmp_ops.sys_acl_add_perm = skel_sys_acl_add_perm;
+ tmp_ops.sys_acl_to_text = skel_sys_acl_to_text;
+ tmp_ops.sys_acl_init = skel_sys_acl_init;
+ tmp_ops.sys_acl_create_entry = skel_sys_acl_create_entry;
+ tmp_ops.sys_acl_set_tag_type = skel_sys_acl_set_tag_type;
+ tmp_ops.sys_acl_set_qualifier = skel_sys_acl_set_qualifier;
+ tmp_ops.sys_acl_set_permset = skel_sys_acl_set_permset;
+ tmp_ops.sys_acl_valid = skel_sys_acl_valid;
+ tmp_ops.sys_acl_set_file = skel_sys_acl_set_file;
+ tmp_ops.sys_acl_set_fd = skel_sys_acl_set_fd;
+ tmp_ops.sys_acl_delete_def_file = skel_sys_acl_delete_def_file;
+ tmp_ops.sys_acl_get_perm = skel_sys_acl_get_perm;
+ tmp_ops.sys_acl_free_text = skel_sys_acl_free_text;
+ tmp_ops.sys_acl_free_acl = skel_sys_acl_free_acl;
+ tmp_ops.sys_acl_free_qualifier = skel_sys_acl_free_qualifier;
+
+ memcpy(&skel_ops, &tmp_ops, sizeof(struct vfs_ops));
+
+ return &skel_ops;
+}
/* VFS operations structure */
@@ -270,23 +470,51 @@ struct vfs_ops skel_ops = {
skel_unlink,
skel_chmod,
skel_fchmod,
- skel_chown,
- skel_fchown,
- skel_chdir,
- skel_getwd,
+ skel_chown,
+ skel_fchown,
+ skel_chdir,
+ skel_getwd,
skel_utime,
skel_ftruncate,
skel_lock,
skel_symlink,
skel_readlink,
+ skel_link,
+ skel_mknod,
+ skel_realpath,
/* NT File ACL operations */
- skel_fget_nt_acl,
- skel_get_nt_acl,
- skel_fset_nt_acl,
- skel_set_nt_acl,
+ skel_fget_nt_acl,
+ skel_get_nt_acl,
+ skel_fset_nt_acl,
+ skel_set_nt_acl,
+
+ /* POSIX ACL operations */
skel_chmod_acl,
- skel_fchmod_acl
+ skel_fchmod_acl,
+
+ skel_sys_acl_get_entry,
+ skel_sys_acl_get_tag_type,
+ skel_sys_acl_get_permset,
+ skel_sys_acl_get_qualifier,
+ skel_sys_acl_get_file,
+ skel_sys_acl_get_fd,
+ skel_sys_acl_clear_perms,
+ skel_sys_acl_add_perm,
+ skel_sys_acl_to_text,
+ skel_sys_acl_init,
+ skel_sys_acl_create_entry,
+ skel_sys_acl_set_tag_type,
+ skel_sys_acl_set_qualifier,
+ skel_sys_acl_set_permset,
+ skel_sys_acl_valid,
+ skel_sys_acl_set_file,
+ skel_sys_acl_set_fd,
+ skel_sys_acl_delete_def_file,
+ skel_sys_acl_get_perm,
+ skel_sys_acl_free_text,
+ skel_sys_acl_free_acl,
+ skel_sys_acl_free_qualifier
};
diff --git a/examples/printing/smbprint b/examples/printing/smbprint
index 5a00a2a8aa8..68bd66a13fe 100755
--- a/examples/printing/smbprint
+++ b/examples/printing/smbprint
@@ -25,6 +25,11 @@
#
# -t now causes translate to be used when sending files
#
+# Further modifications by Alfred Perlstein to fix some problems and
+# improve the quality of the code (3-Dec-2001).
+#
+# More hacking by Richard Sharpe to improve portability. 9-Dec-2001.
+#
# In order for this to work the /etc/printcap entry must include an
# accounting file (af=...):
#
@@ -46,12 +51,10 @@
# service=CJET_371
# password=""
-#
-# Debugging log file, change to /dev/null if you like.
-#
-logfile=/tmp/smb-print.log
-# logfile=/dev/null
+#smbclient=/usr/pkg/bin/smbclient
+# Assume that smbclient will be in the same place as smbprint
+smbclient="`dirname $0`/smbclient"
#
# The last parameter to the filter is the accounting file name.
@@ -67,29 +70,76 @@ config_file=$spool_dir/.config
# server
# service
# password
-eval `cat $config_file`
+# username (optional)
+# IP (optional)
+# debug (optional)
+# debugsmb (optional)
+# debugfile (optional)
+. $config_file
+
+if [ "x$password" = "x" ] ; then
+ password="-N"
+fi
-while getopts t c; do
- case $c in
- t)
- TRANS=1
- ;;
+if [ "x$username" == "x" ] ; then
+ username="$server";
+fi
- '?') # Bad parameters, ignore it ...
- ;;
- esac
+while test $# -gt 0; do
+ case "$1" in
+ -t)
+ TRANS=1
+ ;;
+
+ *) # Bad Parameters, ignore them ...
+ ;;
+ esac
+ shift
done
+
+command="print - ;"
+if [ $TRANS -eq 1 ]; then
+ command="translate;$command";
+fi
+
+debugfile="/tmp/smb-print.log"
+if [ "x$debug" = "x" ] ; then
+ debugfile=/dev/null debugargs=
+else
+ if [ $debug -eq 0 ] ; then
+ debugfile=/dev/null debugargs=
+ else
+ set -x; exec >>$debugfile 2>&1
+ debugargs="$debugfile."
+ #[ "x$debugsmb" == "x" ] || debugargs="$debugargs -d $debugsmb"
+ fi
+fi
+
+if [ "x$smbconf" != "x" ]; then
+
+ smbconf="-s $smbconf"
+
+fi
+
+if [ "x$IP" != "x" ]; then
+
+ IP="-I $IP"
+
+fi
+
+if [ "x$debugargs" != "x" ]; then
+
+ debugargs="-l $debugargs"
+
+fi
+
+$smbclient \
+ "\\\\$server\\$service" \
+ $password \
+ $smbconf \
+ $IP \
+ $debugargs \
+ -U $username \
+ -P \
+ -c "$command"
#
-# Some debugging help, change the >> to > if you want to same space.
-#
-echo "server $server, service $service" >> $logfile
-
-(
-# NOTE You may wish to add the line `echo translate' if you want automatic
-# CR/LF translation when printing.
- if [ $TRANS -eq 1 ]; then
- echo translate
- fi
- echo "print -"
- cat
-) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
diff --git a/packaging/Caldera/OpenLinux/samba.init-lsb b/packaging/Caldera/OpenLinux/samba.init-lsb
index 615e17b21fc..80913c3340e 100755
--- a/packaging/Caldera/OpenLinux/samba.init-lsb
+++ b/packaging/Caldera/OpenLinux/samba.init-lsb
@@ -40,7 +40,6 @@ status() {
return 0 # seems to be up and running
}
-# this function is dedicated to Jan Terpstra. -- Klaus Singvogel, Sep. 2001.
WinbdConfig() {
# returns 0 if winbindd is not configured,
# and 1 if winbindd is configured.
@@ -77,7 +76,7 @@ case "$1" in
echo -n "Starting $SVIsubsys services: "
ssd -S -n $NAME_S -x $DAEMON_S -- $OPTIONS_SMB
- WinbdConfig $config_file || ssd -S -n $NAME_W -x $DAEMON_W -- $OPTIONS_WINBD
+ WinbdConfig $config_file || SVIstatus winbindd || ssd -S -n $NAME_W -x $DAEMON_W -- $OPTIONS_WINBD
ssd -S -n $NAME_N -x $DAEMON_N -- $OPTIONS_NMB
ret=$?
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
index 737f91aefcd..df0b6bff4d2 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
@@ -274,6 +274,7 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
--libdir='$(DESTDIR)%{EtcSamba}' \
--with-privatedir='$(LIBDIR)' \
--with-lockdir='$(DESTDIR)/var/lock/samba.d' \
+ --with-piddir='$(DESTDIR)/var/run/samba' \
--with-swatdir='$(DESTDIR)/usr/share/swat' \
--with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \
--with-configdir='$(DESTDIR)'%{EtcSamba} \
@@ -291,6 +292,14 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
# --with-tdbsam
make LOGFILEBASE=/var/log/samba.d all nsswitch/libnss_wins.so debug2html bin/smbspool
+
+# Now build the VFS modules
+cd ../examples/VFS
+make
+cd block
+mv block.c block.c.old
+sed 's/etc\/samba/etc\/samba\.d/g' < block.c.old > block.c
+make
%Install
@@ -298,14 +307,14 @@ make LOGFILEBASE=/var/log/samba.d all nsswitch/libnss_wins.so debug2html bin/smb
VVS=packaging/%{Vendor}/%{Dist}
mkdir -p $DESTDIR/etc/{{logrotate,pam}.d,sysconfig/daemons}
-mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
+mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba,run/samba}
mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs}
mkdir -p $DESTDIR/lib/security
mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
mkdir -p $DESTDIR/etc/skel/Samba
mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
mkdir -p $DESTDIR/%{SVIdir}
-mkdir -p $DESTDIR/usr/{include,lib}
+mkdir -p $DESTDIR/usr/{include,lib/samba}
make LOGFILEBASE=/var/log/samba.d -C source install
@@ -328,6 +337,12 @@ install -m 755 source/nsswitch/libnss_winbind.so $DESTDIR/lib/libnss_winbind.so.
ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so.2
ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so
+# Adding VFS modules
+install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/recycle.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba
+
install -m 755 source/nsswitch/pam_winbind.so $DESTDIR/lib/security
install -m 755 source/bin/wbinfo $DESTDIR/usr/bin
install -m 755 source/bin/debug2html $DESTDIR/usr/sbin/debug2html
@@ -350,6 +365,7 @@ cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser
cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
+cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt
@@ -358,7 +374,8 @@ cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt
#lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
-install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name}
+install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/samba
+install -m 755 $VVS/winbind.init $DESTDIR/%{SVIdir}/winbind
ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
for f in testparm testprns; do
@@ -431,6 +448,7 @@ done
cat << 'EOF' | %{mkLists} -d samba
Samba base
/lib/$ base
+/usr/lib/samba/$ base
%{LSBservedir} config-IGNORED
^/(etc|var|home|tmp) config-IGNORED
swat swat
@@ -449,6 +467,8 @@ Samba/README.txt base
%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
libnss_* base
pam_* base
+winbind* base
+/usr/lib/samba/* base
%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
%{_defaultdocdir}/samba- doc
smb(mount|mnt|umount) smbfs
@@ -500,13 +520,16 @@ test "$1" = "0" || exit 0
%Files -f files-samba-base
%defattr(-,root,root)
%config %attr(0755,root,root) %{SVIdir}/samba
+%config %attr(0755,root,root) %{SVIdir}/winbind
%config %attr(644,root,root) /etc/sysconfig/daemons/samba
+%config %attr(644,root,root) /etc/sysconfig/daemons/winbind
%config %attr(644,root,root) /etc/pam.d/samba
%config %attr(644,root,root) /etc/logrotate.d/samba
%config %attr(-,root,root) %{EtcSamba}
%dir %attr(755,root,root) /var/lock/samba.d
%dir %attr(755,root,root) /var/log/samba.d
%dir %attr(1777,root,root) /var/spool/samba
+%dir %attr(755,root,root) /var/run/samba
%dir %attr(755,root,root) %{LSBservedir}
%dir %attr(755,root,root) %{LSBservedir}/netlogon
%dir %attr(755,root,root) %{LSBservedir}/profiles
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
index 756633e9310..a46d4cac062 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
@@ -270,6 +270,7 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
--libdir='$(DESTDIR)%{EtcSamba}' \
--with-privatedir='$(LIBDIR)' \
--with-lockdir='$(DESTDIR)/var/lock/samba.d' \
+ --with-piddir='$(DESTDIR)/var/run/samba' \
--with-swatdir='$(DESTDIR)/usr/share/swat' \
--with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \
--with-configdir='$(DESTDIR)'%{EtcSamba} \
@@ -290,13 +291,22 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so
+# Now build the VFS modules
+cd ../examples/VFS
+make
+cd block
+mv block.c block.c.old
+sed 's/etc\/samba/etc\/samba\.d/g' < block.c.old > block.c
+make
+
+
%Install
%{mkDESTDIR}
VVS=packaging/%{Vendor}/%{Dist}
mkdir -p $DESTDIR/etc/{{logrotate,pam}.d,sysconfig/daemons}
-mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
+mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba,run/samba}
mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs}
mkdir -p $DESTDIR/lib/security
mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
@@ -342,12 +352,19 @@ install -m 755 source/bin/smbsh $DESTDIR/usr/bin
install -m 755 source/bin/smbwrapper.so $DESTDIR/usr/bin
install -m 755 source/bin/smbtorture $DESTDIR/usr/sbin
+# Adding VFS modules
+install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/recycle.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba
+
cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf
cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
cp -p $VVS/smbprint $DESTDIR/usr/bin
cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
+cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt
@@ -357,6 +374,7 @@ cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt
install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name}
#lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
+#lsb: cp -p $VVS/winbind.init $DESTDIR/etc/rc.d/init.d/winbind
ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
@@ -423,6 +441,7 @@ done
cat << 'EOF' | %{mkLists} -d samba
Samba base
/lib/$ base
+/usr/lib/samba/$ base
%{LSBservedir} config-IGNORED
^/(etc|var|home|tmp) config-IGNORED
swat swat
@@ -441,6 +460,8 @@ Samba/README.txt base
%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
libnss_* base
pam_* base
+winbind* base
+/usr/lib/samba/$ base
%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
%{_defaultdocdir}/samba- doc
smb(mount|mnt|umount) smbfs
@@ -486,7 +507,9 @@ test "$1" = "0" || exit 0
%Files -f files-samba-base
%defattr(-,root,root)
%config %attr(0755,root,root) %{SVIdir}/samba
+%config %attr(0755,root,root) %{SVIdir}/winbind
%config %attr(644,root,root) /etc/sysconfig/daemons/samba
+%config %attr(644,root,root) /etc/sysconfig/daemons/winbind
%config %attr(644,root,root) /etc/pam.d/samba
%config %attr(644,root,root) /etc/logrotate.d/samba
%config %attr(-,root,root) %{EtcSamba}
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
index ef9564ceef2..b4842fc3f79 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
@@ -192,9 +192,6 @@ a clean and stable API for SMB client application development.
%Prep
%setup
-#%patch0 -p1
-#%patch1 -p1
-#%patch2 -p1
# instead of patch (to help configuration) ... ;^)
%{fixUP} -vbT source/Makefile.in -e '
@@ -271,6 +268,7 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
--libdir='$(DESTDIR)%{EtcSamba}' \
--with-privatedir='$(LIBDIR)' \
--with-lockdir='$(DESTDIR)/var/lock/samba.d' \
+ --with-piddir='$(DESTDIR)/var/run/samba' \
--with-swatdir='$(DESTDIR)/usr/share/swat' \
--with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \
--with-configdir='$(DESTDIR)'%{EtcSamba} \
@@ -290,20 +288,28 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so
+# Now build the VFS modules
+cd ../examples/VFS
+make
+cd block
+mv block.c block.c.old
+sed 's/etc\/samba/etc\/samba\.d/g' < block.c.old > block.c
+make
+
%Install
%{mkDESTDIR}
VVS=packaging/%{Vendor}/%{Dist}
mkdir -p $DESTDIR/etc/{{logrotate,pam}.d,sysconfig/daemons}
-mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
+mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba,run/samba}
mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs}
mkdir -p $DESTDIR/lib/security
mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
mkdir -p $DESTDIR/etc/skel/Samba
mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
mkdir -p $DESTDIR/%{SVIdir}
-mkdir -p $DESTDIR/usr/{include,lib}
+mkdir -p $DESTDIR/usr/{include,lib/samba}
make LOGFILEBASE=/var/log/samba.d -C source install
@@ -343,12 +349,19 @@ install -m 755 source/bin/smbwrapper.so $DESTDIR/usr/bin
install -m 755 source/bin/smbtorture $DESTDIR/usr/sbin
install -m 755 $VVS/smbadduser $DESTDIR/usr/bin
+# Adding VFS modules
+install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/recycle.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba
+
cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf
cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
cp -p $VVS/smbprint $DESTDIR/usr/bin
cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
+cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt
@@ -357,6 +370,7 @@ cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt
install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name}
+install -m 755 $VVS/winbind.init $DESTDIR/%{SVIdir}/winbind
#lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
@@ -424,6 +438,7 @@ done
cat << 'EOF' | %{mkLists} -d samba
Samba base
/lib/$ base
+/usr/lib/samba/$ base
%{LSBservedir} config-IGNORED
^/(etc|var|home|tmp) config-IGNORED
swat swat
@@ -442,6 +457,8 @@ Samba/README.txt base
%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
libnss_* base
pam_* base
+winbind* base
+/usr/lib/samba/* base
%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
%{_defaultdocdir}/samba- doc
smb(mount|mnt|umount) smbfs
@@ -487,13 +504,16 @@ test "$1" = "0" || exit 0
%Files -f files-samba-base
%defattr(-,root,root)
%config %attr(0755,root,root) %{SVIdir}/samba
+%config %attr(0755,root,root) %{SVIdir}/winbind
%config %attr(644,root,root) /etc/sysconfig/daemons/samba
+%config %attr(644,root,root) /etc/sysconfig/daemons/winbind
%config %attr(644,root,root) /etc/pam.d/samba
%config %attr(644,root,root) /etc/logrotate.d/samba
%config %attr(-,root,root) %{EtcSamba}
%dir %attr(755,root,root) /var/lock/samba.d
%dir %attr(755,root,root) /var/log/samba.d
%dir %attr(1777,root,root) /var/spool/samba
+%dir %attr(755,root,root) /var/run/samba
%dir %attr(755,root,root) %{LSBservedir}
%dir %attr(755,root,root) %{LSBservedir}/netlogon
%dir %attr(755,root,root) %{LSBservedir}/profiles
diff --git a/packaging/Caldera/OpenServer/Compile b/packaging/Caldera/OpenServer/Compile
index cba414ec743..7628704f0d3 100755
--- a/packaging/Caldera/OpenServer/Compile
+++ b/packaging/Caldera/OpenServer/Compile
@@ -12,7 +12,7 @@ CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib"
CXX="g++"
CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
RANLIB=true
-MAKE=/usr/local/bin/make
+MAKE=/usr/gnu/bin/make
if [ "$V" = "echo" ]
then
echo "exporting the following shell variables:"
@@ -31,18 +31,18 @@ then
echo "cd ../../../source"
echo "rm -f mout-1 mout-2 mout-3 mout-4"
echo "make all 2>&1 | tee mout-1"
- echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2"
- echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3"
- echo "make masktest locktest locktest2 2>&1 | tee mout-3"
+ echo "make smbfilter debug2html 2>&1 | tee mout-2"
+ echo "make bin/smbspool bin/wbinfo 2>&1 | tee mout-3"
else
cd ../../../source
rm -f mout-1 mout-2 mout-3 mout-4
make all 2>&1 | tee mout-1
- make smbfilter smbtorture debug2html 2>&1 | tee mout-2
- make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3
- make masktest locktest locktest2 2>&1 | tee mout-3
+ make smbfilter debug2html 2>&1 | tee mout-2
+ make bin/smbspool bin/wbinfo 2>&1 | tee mout-3
fi
#
# Not building :
# nsswitch - no <nss.h>
# rpctorture - improper use of client_info struct, dunno
+# smbtorture, locktest, locktest2, masktest - used for dev. only
+# smbwrapper, smbsh - untested and unlikely to work on osr5
diff --git a/packaging/Caldera/OpenServer/Configure b/packaging/Caldera/OpenServer/Configure
index 11826339d73..9e303c1dd2e 100755
--- a/packaging/Caldera/OpenServer/Configure
+++ b/packaging/Caldera/OpenServer/Configure
@@ -17,6 +17,7 @@ PREFIX=/usr/lib/samba
LIBDIR=/etc/samba.d
PRIVATEDIR=/etc/samba.d
LOCKDIR=/var/locks/samba.d
+LOGDIR=/var/log/samba.d
if [ "$V" = "echo" ]
then
echo "exporting the following shell variables:"
@@ -46,7 +47,8 @@ then
--prefix=${PREFIX} \
--libdir=${LIBDIR} \
--with-privatedir=${PRIVATEDIR} \
- --with-lockdir={$LOCKDIR} \
+ --with-lockdir=${LOCKDIR} \
+ --with-logfilebase=${LOGDIR} \
--with-profile \
--with-syslog \
--with-utmp \
@@ -59,7 +61,8 @@ else
--prefix=${PREFIX} \
--libdir=${LIBDIR} \
--with-privatedir=${PRIVATEDIR} \
- --with-lockdir={$LOCKDIR} \
+ --with-lockdir=${LOCKDIR} \
+ --with-logfilebase=${LOGDIR} \
--with-profile \
--with-syslog \
--with-utmp \
diff --git a/packaging/Caldera/OpenServer/Install b/packaging/Caldera/OpenServer/Install
index 0df78034c7b..8fc79bcac5c 100755
--- a/packaging/Caldera/OpenServer/Install
+++ b/packaging/Caldera/OpenServer/Install
@@ -20,6 +20,7 @@ BUILD_ROOT=${HERE}/dist
BLDFIX=${BUILD_ROOT}/${PREFIX}
$V rm -rf $BUILD_ROOT
$V mkdir -p $BUILD_ROOT/etc/init.d
+$V mkdir -p $BUILD_ROOT/etc/samba.d
$V mkdir -p $BUILD_ROOT/usr/lib/mkdev
$V mkdir -p $BUILD_ROOT/doc
$V mkdir -p ${BLDFIX}/bin
@@ -51,8 +52,7 @@ cd ../../..
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
- make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
- smbsh
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool
do
$V install -m755 -s source/bin/$i ${BLDFIX}/bin
done
@@ -62,7 +62,7 @@ $V install -m755 source/script/$i ${BLDFIX}/bin
done
# Install secure binary files
-for i in smbd nmbd swat debug2html smbtorture smbfilter locktest2 masktest
+for i in smbd nmbd swat debug2html smbfilter
do
$V install -m755 -s source/bin/$i ${BLDFIX}/sbin
done
@@ -126,6 +126,7 @@ $V install -m644 docs/manpages/smbmnt.8 ${BLDFIX}/man/man.8
$V install -m644 docs/manpages/smbumount.8 ${BLDFIX}/man/man.8
$V install -m644 ${PKGDIR}/smb.conf $BUILD_ROOT/etc/samba.d/smb.conf.default
$V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/samba.d/smbusers
+$V install -m644 ${PKGDIR}/lmhosts $BUILD_ROOT/etc/samba.d/lmhosts
$V install -m755 ${PKGDIR}/smbprint ${BLDFIX}/bin
$V install -m755 ${PKGDIR}/findsmb ${BLDFIX}/bin
$V install -m755 ${PKGDIR}/smbadduser ${BLDFIX}/bin
@@ -133,6 +134,9 @@ $V install -m755 ${PKGDIR}/initconfig ${BLDFIX}/bin
$V install -m755 ${PKGDIR}/smb.init $BUILD_ROOT/etc/init.d/samba
$V install -m755 ${PKGDIR}/smb.mkdev $BUILD_ROOT/usr/lib/mkdev/samba
$V install -m644 ${PKGDIR}/docview.html $BUILD_ROOT/doc/index.html
+$V install -m644 ${PKGDIR}/osr5config.html $BUILD_ROOT/doc
+$V install -m644 ${PKGDIR}/callogo.gif $BUILD_ROOT/doc
+$V install -m644 ${PKGDIR}/samba.desktop $BUILD_ROOT/doc
$V install -m644 ${PKGDIR}/swat.readme ${BLDFIX}/swat/README
# The following is now done in the postinstall script
diff --git a/packaging/Caldera/OpenServer/README b/packaging/Caldera/OpenServer/README
index 6e8915161c1..678e45a90cf 100644
--- a/packaging/Caldera/OpenServer/README
+++ b/packaging/Caldera/OpenServer/README
@@ -1,26 +1,11 @@
-Preparation Date: April 13, 2001
-Preparer: Ronald Joe Record <rr@sco.com>
+Preparation Date: January 24, 2002
+Preparer: Evan Hunt <evanh@caldera.com>
Instructions: Preparing Samba Packages for SCO OpenServer
===============================================================
We provide support only for current versions of SCO OpenServer
-The file samba-2.2.3-osr5.patch is a patch file suitable for use
-with the patch command as follows:
-
- # cd ../../../source
- # patch -p 0 -i ../packaging/Caldera/OpenServer/samba-2.2-osr5.patch
-
-The files modified by this patch are:
- utils/torture.c
- utils/locktest.c
- utils/locktest2.c
-
-This patch should only be necessary until these changes are accepted
-back into the 2.2 source tree. Until then, this patch must be applied
-prior to building Samba 2.2 on SCO OpenServer 5.
-
To produce the custom installable media images simply type (in this directory):
# ./Makevol
diff --git a/packaging/Caldera/OpenServer/docview.html b/packaging/Caldera/OpenServer/docview.html
index bf25f412308..585e0161533 100644
--- a/packaging/Caldera/OpenServer/docview.html
+++ b/packaging/Caldera/OpenServer/docview.html
@@ -11,18 +11,28 @@
Samba is a suite of networking products that implement the
Windows SMB and CIFS protocols on UNIX and Linux operating
systems. Samba enables your SCO OpenServer from Caldera system
-as a file and print server for Windows and OS/2 systems.
+as a file and print server for Windows and OS/2 clients.
<p>
-We recommend that you use the O'Reilly & Associates publication
+To order to activate Samba software, you must first configure it
+according to the instructions in
+<a href="./osr5config.html">"Configuring Samba on SCO OpenServer
+systems"</a>.
+We recommend that you consult the O'Reilly & Associates publication
<a href="../using_samba/index.html" target="docs">"Using Samba"</a>
-to configure and administer your Samba server. Links to Samba
-HOWTO documents and manual pages are also provided below.
+for further information on configuring and administering your Samba
+server. Links to Samba HOWTO documents and manual pages are also
+provided below.
<h3><a href="./samba.7.html" target="docs">Samba</a> Documentation</h3>
<ul>
+ <li><b>Initial Configuration Instructions</b>
+ <ul>
+ <li><a href="./osr5config.html">Configuring
+ Samba on SCO OpenServer systems</a>
+ </ul>
<li><b>Books</b>
<ul>
<li><a href="../using_samba/index.html" target="docs">Using Samba</a> - by Robert Eckstein, David Collier-Brown and Peter Kelly.
@@ -35,7 +45,8 @@ HOWTO documents and manual pages are also provided below.
<li><a href="./NT_Security.html">UNIX Permission Bits and Samba 2.x</a>
<li><a href="./OS2-Client-HOWTO.html">OS/2 Clients and Samba</a>
<li><a href="./printer_driver2.html">Printing under Samba 2.2.x</a>
- <li><a href="./Integrating-with-Windows.html">Integrating Name Resolution and Authentication Services</a>
+ <li><a href="./Integrating-with-Windows.html">Integrating
+MS Windows networks with Samba</a>
<li><a href="./Samba-HOWTO-Collection.html">Entire Collection (one file; includes developer information)</a>
</ul>
<li><b>Daemons</b>
diff --git a/packaging/Caldera/OpenServer/findsmb b/packaging/Caldera/OpenServer/findsmb
index 5d399123952..2e831c5f11a 100755
--- a/packaging/Caldera/OpenServer/findsmb
+++ b/packaging/Caldera/OpenServer/findsmb
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
#
# Prints info on all smb responding machines on a subnet.
# This script needs to be run on a machine without nmbd running and be
@@ -15,7 +15,7 @@
# that workgroup.
#
-$SAMBABIN = "/usr/local/samba/bin";
+$SAMBABIN = "/usr/lib/samba/bin";
for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
$_ = shift;
@@ -65,15 +65,6 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00>/,@nmblookup);
$_ = @name[0];
- if (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- }
if ($_) { # we have a netbios name
if (/GROUP/) { # is it a group name
($name, $aliases, $type, $length, @addresses) =
@@ -88,7 +79,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
# do an smbclient command on the netbios name.
- open(SMB,"$SAMBABIN/smbclient -N -L '$name' -I $ip -U% |") ||
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
die("Can't do smbclient command.\n");
@smb = <SMB>;
close SMB;
@@ -104,7 +95,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@info = grep(/OS=/,@smb);
$_ = @info[0];
if ($_) { # we found response
- s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
} else { # no OS= string in response (WIN95 client)
diff --git a/packaging/Caldera/OpenServer/initconfig b/packaging/Caldera/OpenServer/initconfig
index b391cf9444d..518d5962c43 100755
--- a/packaging/Caldera/OpenServer/initconfig
+++ b/packaging/Caldera/OpenServer/initconfig
@@ -8,8 +8,8 @@
# do the initial configuration as well, and this script will become
# unnecessary.
-CONF_SRC=/usr/lib/samba/lib/smb.conf.default
-CONF=/usr/lib/samba/lib/smb.conf
+CONF_SRC=/etc/samba.d/smb.conf.default
+CONF=/etc/samba.d/smb.conf
# getyn: ask a question, return value indicates response
diff --git a/packaging/Caldera/OpenServer/pkg/cdmt.config b/packaging/Caldera/OpenServer/pkg/cdmt.config
index 8ea7e8c1ab6..9bf3f203f93 100644
--- a/packaging/Caldera/OpenServer/pkg/cdmt.config
+++ b/packaging/Caldera/OpenServer/pkg/cdmt.config
@@ -1,7 +1,7 @@
MACROS:
Samba_NAME = Samba File and Print Server
-Samba_VER = 2.2.2a
+Samba_VER = 2.2.4a
DEFAULT_EXEC_MODE = 0755
diff --git a/packaging/Caldera/OpenServer/pkg/cntl/ccs b/packaging/Caldera/OpenServer/pkg/cntl/ccs
index a01690712ac..c5e69e1b167 100755
--- a/packaging/Caldera/OpenServer/pkg/cntl/ccs
+++ b/packaging/Caldera/OpenServer/pkg/cntl/ccs
@@ -11,93 +11,8 @@ pkglist="$3"
# Source in the standard functions library, ccsSetup.sh
. ccsSetup.sh
-SPOOL=/var/spool/samba
-SVCS=/etc/services
-INET=/etc/inetd.conf
-LMHOST=/etc/lmhosts
-PREFIX=/usr/lib/samba
-
PKG_DIR=${SSO_SHARED_ROOT}/cntl/packages
-#
-# Create /var/spool/samba, create an initial /etc/lmhosts, build the
-# codepages and setup swat to be run out of inetd on port 901
-#
-PostExport()
-{
- [ -d $SPOOL ] || {
- mkdir -p $SPOOL
- chmod 1777 $SPOOL
- }
- if [ -f $LMHOST ]
- then
- grep localhost $LMHOST > /dev/null || {
- echo 127.0.0.1 localhost >> $LMHOST
- }
- else
- echo 127.0.0.1 localhost > $LMHOST
- fi
-
- cd ${PREFIX}/lib/codepages
- for i in 437 737 775 850 852 861 866 932 936 949 950 1251
- do
- ${PREFIX}/bin/make_smbcodepage c $i \
- ${PREFIX}/lib/codepages/src/codepage_def.$i \
- ${PREFIX}/lib/codepages/codepage.$i
- done
- for i in 437 737 850 852 861 866 932 936 949 950 \
- ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
- do
- ${PREFIX}/bin/make_unicodemap $i \
- ${PREFIX}/lib/codepages/src/CP$i.TXT \
- ${PREFIX}/lib/codepages/unicode_map.$i
- done
-
- grep swat $SVCS > /dev/null || {
- echo "swat 901/tcp # Samba Web Administration Tool " >> $SVCS
- }
-
- grep swat $INET > /dev/null || {
- echo "swat stream tcp nowait root /usr/lib/samba/bin/swat swat " >> $INET
- }
-
- kill -1 `ps -e | grep inetd | awk ' { print $1 } '`
-}
-
-DisableStop()
-{
- /etc/init.d/samba disable > /dev/null 2>&1
- /etc/init.d/samba stop > /dev/null 2>&1
-}
-
-#
-# Remove /var/spool/samba and delete inetd entries for swat
-#
-PostUnexport()
-{
- [ -d $SPOOL ] && {
- rm -rf $SPOOL
- }
-
- grep swat $SVCS > /dev/null && {
- B=`basename $SVCS`
- T=$B$$
- grep -v swat $SVCS > /tmp/$T
- cp /tmp/$T $SVCS
- rm -f /tmp/$T
- }
-
- grep swat $INET > /dev/null || {
- B=`basename $INET`
- T=$B$$
- grep -v swat $INET > /tmp/$T
- cp /tmp/$T $INET
- rm -f /tmp/$T
- }
-
- kill -1 `ps -e | grep inetd | awk ' { print $1 } '`
-}
-
# call ccs in subsidiary packages with same arguments we were called with
pkgCodes=`getPackageCode $pkglist`
returnCode=$OK
@@ -114,11 +29,5 @@ for pkg in $pkgCodes; do
fi
done
-case "$step" in
- POST_EXPORT) PostExport ;;
- PRE_UNEXPORT) DisableStop ;;
- POST_UNEXPORT) PostUnexport ;;
-esac
-
exit $returnCode
diff --git a/packaging/Caldera/OpenServer/pkg/cntl/cqs b/packaging/Caldera/OpenServer/pkg/cntl/cqs
index 2edcae6f2c7..fec327a298d 100755
--- a/packaging/Caldera/OpenServer/pkg/cntl/cqs
+++ b/packaging/Caldera/OpenServer/pkg/cntl/cqs
@@ -49,56 +49,31 @@ cleanup()
#
Save_SSO_Upgrade_Config()
{
- if [ -f /etc/smbusers ]; then
- ex_cmd cp -f /etc/smbusers $CCS_PERSISTENT_STORAGE/smbusers
+ if [ -f /etc/samba.d/smbusers ]; then
+ ex_cmd cp -f /etc/samba.d/smbusers $CCS_PERSISTENT_STORAGE/smbusers
fi
- if [ -f /usr/lib/samba/lib/smb.conf ]; then
- ex_cmd cp -f /usr/lib/samba/lib/smb.conf $CCS_PERSISTENT_STORAGE/smb.conf
+ if [ -f /etc/samba.d/smbpasswd ]; then
+ ex_cmd cp -f /etc/samba.d/smbpasswd ${CCS_PERSISTENT_STORAGE}/smbpasswd
+ fi
+ if [ -f /etc/samba.d/smb.conf ]; then
+ ex_cmd cp -f /etc/samba.d/smb.conf ${CCS_PERSISTENT_STORAGE}/smb.conf
+ fi
+ if [ -f /etc/samba.d/lmhosts ]; then
+ ex_cmd cp -f /etc/samba.d/lmhosts ${CCS_PERSISTENT_STORAGE}/lmhosts
+ fi
+ if [ -f /etc/samba.d/printers.def ]; then
+ ex_cmd cp -f /etc/samba.d/printers.def \
+ ${CCS_PERSISTENT_STORAGE}/printers.def
fi
return 0
}
-#******************************************************************************
-# check_libsocket
-#
-# Check to see if libsocket.so.2 is installed on this system. If not, print
-# a warning message and ask if the user wants to continue installation anyway.
-#******************************************************************************
-
-MSG_missLibrary="WARNING: Samba requires the library /usr/lib/libsocket.so.2
- to install and run correctly. That library does not exist
- on this system. It is provided in OpenServer releases
- 5.0.6a and higher."
-
-check_libsocket() {
- if [ -f "/usr/lib/libsocket.so.2" ]; then
- return $OK
- else
- echo "${MSG_missLibrary}"
-
- while echo "\n\tContinue installation? \c"
- do read yn rest
- case $yn in
- +x|-x) set $yn ;;
- [yY]*) return $OK ;;
- [nN]*) cleanup $FAIL ;;
- *) echo "\tPlease answer y or n" ;;
- esac
- done
- fi
-}
-
-
################################################################################
# main Main MAIN
#
trap "cleanup $FAIL" 1 2 3 15
-[ "$customMode" = "LAYERED" ] && {
- check_libsocket
-}
-
# Parse keyword list to determine how custom was invoked, the installation type,
# whether we running on the target CPU, and finally if we have access to
# the target's root filesystem.
diff --git a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs
index 4b4ef6de517..ea86e009025 100755
--- a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs
+++ b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs
@@ -12,16 +12,16 @@ ccs_return_value=0
PostExport()
{
- if [ -x /usr/bin/doctool ]; then
- /usr/bin/doctool --add NetworkDoc/WinConnect/samba.desktop
- fi
+ if [ -x /usr/bin/doctool ]; then
+ /usr/bin/doctool --add NetworkDoc/WinConnect/samba.desktop >&- 2>&-
+ fi
}
PreUnexport()
{
- if [ -x /usr/bin/doctool ]; then
- /usr/bin/doctool --remove NetworkDoc/WinConnect/samba.desktop
- fi
+ if [ -x /usr/bin/doctool ]; then
+ /usr/bin/doctool --remove NetworkDoc/WinConnect/samba.desktop >&- 2>&-
+ fi
}
case "$step" in
diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
index f4a72dac36c..eabf026eb4d 100644
--- a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
+++ b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
@@ -29,6 +29,30 @@ owner = root
group = sys
flags =
+DIR:Control:SHARED:cntl/packages/Samba:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Control:SHARED:cntl/packages/Samba/ccs:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Control:SHARED:cntl/packages/SambaSWAT:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Control:SHARED:cntl/packages/SambaSWAT/ccs:
+mode = 0755
+owner = root
+group = sys
+flags =
+
DIR:Control:SHARED:cntl/packages/SambaDOC:
mode = 0755
owner = root
@@ -187,13 +211,6 @@ group = sys
flags =
exportPath = /usr/lib/samba/bin/smbspool
-FILE:Samba:SHARED:usr/lib/samba/bin/smbsh:
-mode = 0755
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/bin/smbsh
-
FILE:Samba:SHARED:usr/lib/samba/bin/mksmbpasswd.sh:
mode = 0755
owner = root
@@ -256,13 +273,6 @@ group = sys
flags =
exportPath = /usr/lib/samba/sbin/debug2html
-FILE:Samba:SHARED:usr/lib/samba/sbin/smbtorture:
-mode = 0755
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/sbin/smbtorture
-
FILE:Samba:SHARED:usr/lib/samba/sbin/smbfilter:
mode = 0755
owner = root
@@ -270,20 +280,6 @@ group = sys
flags =
exportPath = /usr/lib/samba/sbin/smbfilter
-FILE:Samba:SHARED:usr/lib/samba/sbin/locktest2:
-mode = 0755
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/sbin/locktest2
-
-FILE:Samba:SHARED:usr/lib/samba/sbin/masktest:
-mode = 0755
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/sbin/masktest
-
DIR:Samba:SHARED:usr/lib/samba/lib:
mode = 0755
owner = root
@@ -505,6 +501,13 @@ group = sys
flags =
exportPath = /etc/samba.d/smbusers
+FILE:Samba:CLIENT:etc/samba.d/lmhosts:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /etc/samba.d/lmhosts
+
DIR:Samba:CLIENT:usr/lib/samba/var:
mode = 0755
owner = root
@@ -517,10 +520,20 @@ owner = root
group = sys
flags =
exportPath = /var/log/samba.d
+exportPath = /usr/lib/samba/var/log
DIR:Samba:CLIENT:usr/lib/samba/var/locks:
+mode = 1777
+owner = root
+group = sys
+flags =
+exportPath = /var/locks/samba.d
+exportPath = /usr/lib/samba/var/locks
+
+DIR:Samba:CLIENT:usr/lib/samba/var/spool:
mode = 0755
owner = root
group = sys
flags =
-exportPath = /var/locks/samba
+exportPath = /var/spool/samba
+exportPath = /usr/lib/samba/var/spool
diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg
index df96635bccd..0ed9bdb72b8 100644
--- a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg
+++ b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg
@@ -11,6 +11,13 @@ owner = root
group = sys
flags =
+FILE:SambaDOC:SHARED:doc/samba.desktop:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/share/meta/doc/NetworkDoc/WinConnect/samba.desktop
+
FILE:SambaDOC:SHARED:doc/index.html:
mode = 0644
owner = root
@@ -18,6 +25,20 @@ group = sys
flags =
exportPath = /usr/share/doc/samba/help/index.html
+FILE:SambaDOC:SHARED:doc/osr5config.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/share/doc/samba/help/osr5config.html
+
+FILE:SambaDOC:SHARED:doc/callogo.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/share/doc/samba/help/callogo.gif
+
DIR:SambaDOC:SHARED:usr/lib:
mode = 0755
owner = root
@@ -98,20 +119,6 @@ group = sys
flags =
exportPath = /usr/man/man.1/smbcontrol.1
-FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbrun.1:
-mode = 0644
-owner = root
-group = sys
-flags =
-exportPath = /usr/man/man.1/smbrun.1
-
-FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbsh.1:
-mode = 0644
-owner = root
-group = sys
-flags =
-exportPath = /usr/man/man.1/smbsh.1
-
FILE:SambaDOC:SHARED:usr/lib/samba/man/man.1/smbstatus.1:
mode = 0644
owner = root
diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg
index e50c6f20a2d..46dcc23c244 100644
--- a/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg
+++ b/packaging/Caldera/OpenServer/pkg/input/SambaSWAT.pkg
@@ -125,6 +125,14 @@ flags =
exportPath = /usr/lib/samba/swat/help/Samba-HOWTO-Collection.html
exportPath = /usr/share/doc/samba/help/Samba-HOWTO-Collection.html
+FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/Samba-LDAP-HOWTO.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/lib/samba/swat/help/Samba-LDAP-HOWTO.html
+exportPath = /usr/share/doc/samba/help/Samba-LDAP-HOWTO.html
+
FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/UNIX_INSTALL.html:
mode = 0644
owner = root
@@ -181,6 +189,14 @@ flags =
exportPath = /usr/lib/samba/swat/help/nmblookup.1.html
exportPath = /usr/share/doc/samba/help/nmblookup.1.html
+FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/pdbedit.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/lib/samba/swat/help/pdbedit.1.html
+exportPath = /usr/share/doc/samba/help/pdbedit.1.html
+
FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/printer_driver2.html:
mode = 0644
owner = root
@@ -197,22 +213,6 @@ flags =
exportPath = /usr/lib/samba/swat/help/rpcclient.1.html
exportPath = /usr/share/doc/samba/help/rpcclient.1.html
-FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba-pdc-faq.html:
-mode = 0644
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/swat/help/samba-pdc-faq.html
-exportPath = /usr/share/doc/samba/help/samba-pdc-faq.html
-
-FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba-pdc-howto.html:
-mode = 0644
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/swat/help/samba-pdc-howto.html
-exportPath = /usr/share/doc/samba/help/samba-pdc-howto.html
-
FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/samba.7.html:
mode = 0644
owner = root
@@ -293,22 +293,6 @@ flags =
exportPath = /usr/lib/samba/swat/help/smbpasswd.8.html
exportPath = /usr/share/doc/samba/help/smbpasswd.8.html
-FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbrun.1.html:
-mode = 0644
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/swat/help/smbrun.1.html
-exportPath = /usr/share/doc/samba/help/smbrun.1.html
-
-FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbsh.1.html:
-mode = 0644
-owner = root
-group = sys
-flags =
-exportPath = /usr/lib/samba/swat/help/smbsh.1.html
-exportPath = /usr/share/doc/samba/help/smbsh.1.html
-
FILE:SambaSWAT:SHARED:usr/lib/samba/swat/help/smbspool.8.html:
mode = 0644
owner = root
diff --git a/packaging/Caldera/OpenServer/smb.conf b/packaging/Caldera/OpenServer/smb.conf
index 1dab1e54dfb..973fac4539e 100644
--- a/packaging/Caldera/OpenServer/smb.conf
+++ b/packaging/Caldera/OpenServer/smb.conf
@@ -46,7 +46,7 @@
# this tells Samba to use a separate log file for each machine
# that connects
- log file = /usr/lib/samba/var/log.%m
+ log file = /var/log/samba.d/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
diff --git a/packaging/Caldera/OpenServer/smb.init b/packaging/Caldera/OpenServer/smb.init
index 535179a25a9..194b8a2bb29 100755
--- a/packaging/Caldera/OpenServer/smb.init
+++ b/packaging/Caldera/OpenServer/smb.init
@@ -8,22 +8,17 @@
# Modified 17-Jul-99 by Ron Record (rr@sco.com) for use in SCO Skunkware
#
-SAMBADIR=/usr/local/samba
+SAMBADIR=/usr/lib/samba
RCSCRIPT=/etc/rc2.d/S99samba
-if [ ! -d /usr/bin ]
-then # /usr not mounted
- exit
-fi
-
killproc() { # kill the named process(es)
- if [ -f $SAMBADIR/var/locks/$1.pid ]
+ if [ -f /var/locks/samba.d/$1.pid ]
then
- kill `cat $SAMBADIR/var/locks/$1.pid`
+ kill `cat /var/locks/samba.d/$1.pid`
else
- pid=`/usr/bin/ps -e |
- /usr/bin/grep $1 |
- /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ pid=`/bin/ps -e |
+ /bin/grep $1 |
+ /bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] && kill $pid
fi
}
@@ -32,15 +27,13 @@ start() {
#
# Edit these lines to suit your installation (paths, workgroup, host)
#
- $SAMBADIR/sbin/smbd -D -s $SAMBADIR/lib/smb.conf
- $SAMBADIR/sbin/nmbd -D -s $SAMBADIR/lib/smb.conf
- $SAMBADIR/sbin/winbindd
+ $SAMBADIR/sbin/smbd -D -s /etc/samba.d/smb.conf
+ $SAMBADIR/sbin/nmbd -D -s /etc/samba.d/smb.conf
}
stop() {
killproc nmbd
killproc smbd
- killproc winbindd
}
# Start/stop processes required for samba server
diff --git a/packaging/Caldera/OpenServer/smb.mkdev b/packaging/Caldera/OpenServer/smb.mkdev
index f474e9f8b76..df7e0adcc81 100755
--- a/packaging/Caldera/OpenServer/smb.mkdev
+++ b/packaging/Caldera/OpenServer/smb.mkdev
@@ -36,10 +36,12 @@ while true ; do
prompt || exit 1
case $cmd in
1) /usr/lib/samba/bin/initconfig
- cp -f /etc/init.d/samba /etc/rc2.d/S92samba
+ /etc/init.d/samba enable
+ /etc/init.d/samba start
exit 0
;;
- 2) rm -f /etc/rc2.d/S92samba
+ 2) /etc/init.d/samba disable
+ /etc/init.d/samba stop
exit 0
;;
esac
diff --git a/packaging/Caldera/OpenServer/smbadduser b/packaging/Caldera/OpenServer/smbadduser
index 2f38bf28f1a..d7a19626369 100755
--- a/packaging/Caldera/OpenServer/smbadduser
+++ b/packaging/Caldera/OpenServer/smbadduser
@@ -5,8 +5,8 @@
unalias *
set path = ($path)
-set smbpasswd = /etc/smbpasswd
-set user_map = /etc/smbusers
+set smbpasswd = /etc/samba.d/smbpasswd
+set user_map = /etc/samba.d/smbusers
#
# Set to site specific passwd command
#
diff --git a/packaging/Caldera/OpenServer/smbprint b/packaging/Caldera/OpenServer/smbprint
index ec083eede62..7f50aadb46e 100755
--- a/packaging/Caldera/OpenServer/smbprint
+++ b/packaging/Caldera/OpenServer/smbprint
@@ -5,7 +5,7 @@
# server and service.
# For example you could have a printcap entry like this
#
-# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/lib/samba/smbprint
#
# which would create a unix printer called "smb" that will print via this
# script. You will need to create the spool directory /usr/spool/smb with
@@ -27,7 +27,7 @@
# :cm=CD IBM Colorjet on 6th:\
# :sd=/var/spool/lpd/cdcolour:\
# :af=/var/spool/lpd/cdcolour/acct:\
-# :if=/usr/local/etc/smbprint:\
+# :if=/usr/lib/samba/smbprint:\
# :mx=0:\
# :lp=/dev/null:
#
diff --git a/packaging/Caldera/UnixWare/Compile b/packaging/Caldera/UnixWare/Compile
index 2867e4d5ad5..c4870163053 100755
--- a/packaging/Caldera/UnixWare/Compile
+++ b/packaging/Caldera/UnixWare/Compile
@@ -7,14 +7,32 @@
V=
[ "$1" = "-n" ] && V=echo
-CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
+#CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
+CC="cc -Kthread -Kalloca"
CPP="$CC -E"
CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3"
-LDFLAGS="-L/usr/local/lib"
-CXX="CC -I/usr/local/include"
-CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
+#LDFLAGS="-L/usr/local/lib"
+LDFLAGS=
+#CXX="CC -I/usr/local/include"
+CXX="CC"
+#CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
+CXXFLAGS="-O3"
RANLIB=true
-MAKE=/usr/local/bin/make
+
+if [ -x /usr/gnu/bin/make ]
+then
+ MAKE=/usr/gnu/bin/make
+elif [ -x /usr/local/bin/make ]
+then
+ MAKE=/usr/local/bin/make
+elif [ -x /usr/bin/make ]
+then
+ MAKE=/usr/bin/make
+else
+ echo "Can't find make - exiting"
+ exit 1
+fi
+
if [ "$V" = "echo" ]
then
echo "exporting the following shell variables:"
@@ -34,17 +52,17 @@ if [ "$V" = "echo" ]
then
echo "cd ../../../source"
echo "rm -f mout-1 mout-2 mout-3 mout-4"
- echo "make all 2>&1 | tee mout-1"
- echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2"
- echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3"
- echo "make masktest locktest locktest2 2>&1 | tee mout-3"
+ echo "$MAKE all 2>&1 | tee mout-1"
+ echo "$MAKE smbfilter smbtorture debug2html 2>&1 | tee mout-2"
+ echo "$MAKE bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3"
+ echo "$MAKE masktest locktest locktest2 2>&1 | tee mout-3"
else
cd ../../../source
rm -f mout-1 mout-2 mout-3 mout-4
- make all 2>&1 | tee mout-1
- make smbfilter smbtorture debug2html 2>&1 | tee mout-2
- make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3
- make masktest locktest locktest2 2>&1 | tee mout-3
+ $MAKE all 2>&1 | tee mout-1
+ $MAKE smbfilter smbtorture debug2html 2>&1 | tee mout-2
+ $MAKE bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3
+ $MAKE masktest locktest locktest2 2>&1 | tee mout-3
fi
#
# Not building :
diff --git a/packaging/Caldera/UnixWare/Configure b/packaging/Caldera/UnixWare/Configure
index 3914195606f..e899742ce90 100755
--- a/packaging/Caldera/UnixWare/Configure
+++ b/packaging/Caldera/UnixWare/Configure
@@ -7,15 +7,33 @@
V=
[ "$1" = "-n" ] && V=echo
-CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
+#CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
+CC="cc -Kthread -Kalloca"
CPP="$CC -E"
CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3"
-LDFLAGS="-L/usr/local/lib"
-CXX="CC -I/usr/local/include"
-CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
+#LDFLAGS="-L/usr/local/lib"
+LDFLAGS=
+#CXX="CC -I/usr/local/include"
+CXX="CC"
+#CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
+CXXFLAGS="-O3"
RANLIB=true
-MAKE=/usr/local/bin/make
-PREFIX=/usr/local/samba
+PREFIX=/usr/lib/samba
+
+if [ -x /usr/gnu/bin/make ]
+then
+ MAKE=/usr/gnu/bin/make
+elif [ -x /usr/local/bin/make ]
+then
+ MAKE=/usr/local/bin/make
+elif [ -x /usr/bin/make ]
+then
+ MAKE=/usr/bin/make
+else
+ echo "Can't find make - exiting"
+ exit 1
+fi
+
if [ "$V" = "echo" ]
then
echo "exporting the following shell variables:"
diff --git a/packaging/Caldera/UnixWare/Install b/packaging/Caldera/UnixWare/Install
index 3fffc37d25a..a2d8da12eaa 100755
--- a/packaging/Caldera/UnixWare/Install
+++ b/packaging/Caldera/UnixWare/Install
@@ -7,7 +7,7 @@
V=
[ "$1" = "-n" ] && V=echo
-PREFIX=/usr/local/samba
+PREFIX=/usr/lib/samba
HERE=`pwd`
PKGDIR=packaging/Caldera/UnixWare
@@ -39,8 +39,7 @@ cd ../../..
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
- make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
- smbsh smbwrapper.so
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool
do
$V install -m755 -s source/bin/$i ${BLDFIX}/bin
done
diff --git a/packaging/Caldera/UnixWare/pkg/pkginfo b/packaging/Caldera/UnixWare/pkg/pkginfo
index c4d8bff0bb9..c35373d3523 100644
--- a/packaging/Caldera/UnixWare/pkg/pkginfo
+++ b/packaging/Caldera/UnixWare/pkg/pkginfo
@@ -1,9 +1,8 @@
PKG="samba"
NAME="Samba - A Windows SMB/CIFS fileserver for UNIX"
-VERSION="2.2"
-VENDOR="SCO"
-HOTLINE="1-800-SCO-UNIX"
-EMAIL="rr@sco.com"
+VERSION="2.2.4"
+VENDOR="Caldera"
+EMAIL="rr@caldera.com"
CATEGORY="skunkware"
CLASSES="samba"
ARCH="i386"
diff --git a/packaging/Caldera/UnixWare/pkg/postinstall b/packaging/Caldera/UnixWare/pkg/postinstall
index 4e202ae3543..0cbdfad238e 100755
--- a/packaging/Caldera/UnixWare/pkg/postinstall
+++ b/packaging/Caldera/UnixWare/pkg/postinstall
@@ -3,13 +3,13 @@
# Create /var/spool/samba, setup swat to be run out of inetd on port 901,
# initialize the lmhosts file and create the codepage load files
#
-# Written 10-Aug-1999 by Ronald Joe Record (rr@sco.com)
+# Written 10-Aug-1999 by Ronald Joe Record (rr@caldera.com)
#
SPOOL=/var/spool/samba
SVCS=/etc/services
INET=/etc/inetd.conf
-PREFIX=/usr/local/samba
+PREFIX=/usr/lib/samba
LMHOST=/etc/lmhosts
[ -d $SPOOL ] || {
@@ -22,7 +22,7 @@ grep swat $SVCS > /dev/null || {
}
grep swat $INET > /dev/null || {
- echo "swat stream tcp nowait root /usr/local/samba/bin/swat swat " >> $INET
+ echo "swat stream tcp nowait root /usr/lib/samba/sbin/swat swat " >> $INET
}
if [ -f $LMHOST ]
diff --git a/packaging/Caldera/UnixWare/pkg/prototype b/packaging/Caldera/UnixWare/pkg/prototype
index 13a64b6feb1..5424e2cfc9e 100644
--- a/packaging/Caldera/UnixWare/pkg/prototype
+++ b/packaging/Caldera/UnixWare/pkg/prototype
@@ -8,303 +8,296 @@ d samba etc/init.d 0755 root sys
f samba etc/init.d/samba 0755 root sys
f samba etc/smbusers 0644 root sys
d samba usr 0755 root sys
-d samba usr/local 0755 root sys
-d samba usr/local/samba 0755 root sys
-d samba usr/local/samba/bin 0755 root sys
-f samba usr/local/samba/bin/nmblookup 0755 root sys
-f samba usr/local/samba/bin/smbclient 0755 root sys
-f samba usr/local/samba/bin/smbpasswd 0755 root sys
-f samba usr/local/samba/bin/smbstatus 0755 root sys
-f samba usr/local/samba/bin/testparm 0755 root sys
-f samba usr/local/samba/bin/testprns 0755 root sys
-f samba usr/local/samba/bin/make_smbcodepage 0755 root sys
-f samba usr/local/samba/bin/make_unicodemap 0755 root sys
-f samba usr/local/samba/bin/make_printerdef 0755 root sys
-f samba usr/local/samba/bin/rpcclient 0755 root sys
-f samba usr/local/samba/bin/smbspool 0755 root sys
-f samba usr/local/samba/bin/smbsh 0755 root sys
-f samba usr/local/samba/bin/smbwrapper.so 0755 root sys
-f samba usr/local/samba/bin/mksmbpasswd.sh 0755 root sys
-f samba usr/local/samba/bin/smbtar 0755 root sys
-f samba usr/local/samba/bin/smbprint 0755 root sys
-f samba usr/local/samba/bin/findsmb 0755 root sys
-f samba usr/local/samba/bin/smbadduser 0755 root sys
-d samba usr/local/samba/sbin 0755 root sys
-f samba usr/local/samba/sbin/smbd 0755 root sys
-f samba usr/local/samba/sbin/nmbd 0755 root sys
-f samba usr/local/samba/sbin/swat 0755 root sys
-f samba usr/local/samba/sbin/debug2html 0755 root sys
-f samba usr/local/samba/sbin/smbtorture 0755 root sys
-f samba usr/local/samba/sbin/smbfilter 0755 root sys
-f samba usr/local/samba/sbin/locktest2 0755 root sys
-f samba usr/local/samba/sbin/masktest 0755 root sys
-d samba usr/local/samba/swat 0755 root sys
-d samba usr/local/samba/swat/using_samba 0755 root sys
-d samba usr/local/samba/swat/using_samba/gifs 0755 root sys
-f samba usr/local/samba/swat/using_samba/gifs/index.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/gifs/samba.s.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/gifs/txthome.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/gifs/txtnexta.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/gifs/txtpreva.gif 0644 root sys
-d samba usr/local/samba/swat/using_samba/figs 0755 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0101.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0102.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0103.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0104.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0105.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0106.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0107.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0108.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0109.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0110.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0111.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0112.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0113.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0114.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0201.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0202.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0203.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0204.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0301.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0302.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0303.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0304.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0305.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0306.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0307.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0308.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0309.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0310.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0311.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0312.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0313.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0314.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0315.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0316.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0317.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0318.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0319.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0320.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0321.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0322.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0323.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0324.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0325.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0326.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0327.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0328.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0401.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0402.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0403.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0404.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0405.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0406.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0407.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0501.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0502.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0503.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0504.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0505.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0506.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0507.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0508.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0601.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0602.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0603.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0604.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0605.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0606.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0701.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0702.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0703.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0704.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0705.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0706.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0707.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0708.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0709.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0801.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0802.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0803.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0804.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0805.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0901.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0902.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0903.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0904.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.0905.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.aa01.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.ab01.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/figs/sam.ab02.gif 0644 root sys
-f samba usr/local/samba/swat/using_samba/appa_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appa_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appa_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appa_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appa_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appb_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appb_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appb_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appc_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appd_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appe_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/appf_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_06.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_07.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch01_08.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch02_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch02_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch02_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch02_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch02_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch02_06.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch03_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch03_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch03_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_06.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_07.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch04_08.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch05_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch05_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch05_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch05_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch05_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch06_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch06_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch06_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch06_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch06_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch06_06.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch07_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch07_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch07_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_04.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_05.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_06.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch08_07.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch09_01.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch09_02.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/ch09_03.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/index.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/inx.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/licenseinfo.html 0644 root sys
-f samba usr/local/samba/swat/using_samba/this_edition.html 0644 root sys
-d samba usr/local/samba/swat/images 0755 root sys
-f samba usr/local/samba/swat/images/globals.gif 0644 root sys
-f samba usr/local/samba/swat/images/home.gif 0644 root sys
-f samba usr/local/samba/swat/images/passwd.gif 0644 root sys
-f samba usr/local/samba/swat/images/printers.gif 0644 root sys
-f samba usr/local/samba/swat/images/samba.gif 0644 root sys
-f samba usr/local/samba/swat/images/shares.gif 0644 root sys
-f samba usr/local/samba/swat/images/status.gif 0644 root sys
-f samba usr/local/samba/swat/images/viewconfig.gif 0644 root sys
-d samba usr/local/samba/swat/help 0755 root sys
-f samba usr/local/samba/swat/help/welcome.html 0644 root sys
-f samba usr/local/samba/swat/help/DOMAIN_MEMBER.html 0644 root sys
-f samba usr/local/samba/swat/help/NT_Security.html 0644 root sys
-f samba usr/local/samba/swat/help/findsmb.1.html 0644 root sys
-f samba usr/local/samba/swat/help/lmhosts.5.html 0644 root sys
-f samba usr/local/samba/swat/help/make_smbcodepage.1.html 0644 root sys
-f samba usr/local/samba/swat/help/nmbd.8.html 0644 root sys
-f samba usr/local/samba/swat/help/nmblookup.1.html 0644 root sys
-f samba usr/local/samba/swat/help/rpcclient.1.html 0644 root sys
-f samba usr/local/samba/swat/help/samba-pdc-faq.html 0644 root sys
-f samba usr/local/samba/swat/help/samba-pdc-howto.html 0644 root sys
-f samba usr/local/samba/swat/help/samba.7.html 0644 root sys
-f samba usr/local/samba/swat/help/smb.conf.5.html 0644 root sys
-f samba usr/local/samba/swat/help/smbclient.1.html 0644 root sys
-f samba usr/local/samba/swat/help/smbcontrol.1.html 0644 root sys
-f samba usr/local/samba/swat/help/smbd.8.html 0644 root sys
-f samba usr/local/samba/swat/help/smbpasswd.5.html 0644 root sys
-f samba usr/local/samba/swat/help/smbpasswd.8.html 0644 root sys
-f samba usr/local/samba/swat/help/smbrun.1.html 0644 root sys
-f samba usr/local/samba/swat/help/smbsh.1.html 0644 root sys
-f samba usr/local/samba/swat/help/smbspool.8.html 0644 root sys
-f samba usr/local/samba/swat/help/smbstatus.1.html 0644 root sys
-f samba usr/local/samba/swat/help/smbtar.1.html 0644 root sys
-f samba usr/local/samba/swat/help/swat.8.html 0644 root sys
-f samba usr/local/samba/swat/help/testparm.1.html 0644 root sys
-f samba usr/local/samba/swat/help/testprns.1.html 0644 root sys
-f samba usr/local/samba/swat/help/wbinfo.1.html 0644 root sys
-f samba usr/local/samba/swat/help/winbindd.8.html 0644 root sys
-d samba usr/local/samba/swat/include 0755 root sys
-f samba usr/local/samba/swat/include/footer.html 0644 root sys
-f samba usr/local/samba/swat/include/header.html 0644 root sys
-f samba usr/local/samba/swat/README 0644 root sys
-d samba usr/local/samba/man 0755 root sys
-d samba usr/local/samba/man/man1 0755 root sys
-f samba usr/local/samba/man/man1/findsmb.1 0644 root sys
-f samba usr/local/samba/man/man1/make_smbcodepage.1 0644 root sys
-f samba usr/local/samba/man/man1/make_unicodemap.1 0644 root sys
-f samba usr/local/samba/man/man1/nmblookup.1 0644 root sys
-f samba usr/local/samba/man/man1/smbclient.1 0644 root sys
-f samba usr/local/samba/man/man1/smbcontrol.1 0644 root sys
-f samba usr/local/samba/man/man1/smbrun.1 0644 root sys
-f samba usr/local/samba/man/man1/smbsh.1 0644 root sys
-f samba usr/local/samba/man/man1/smbstatus.1 0644 root sys
-f samba usr/local/samba/man/man1/smbtar.1 0644 root sys
-f samba usr/local/samba/man/man1/testparm.1 0644 root sys
-f samba usr/local/samba/man/man1/testprns.1 0644 root sys
-f samba usr/local/samba/man/man1/wbinfo.1 0644 root sys
-d samba usr/local/samba/man/man5 0755 root sys
-f samba usr/local/samba/man/man5/smb.conf.5 0644 root sys
-f samba usr/local/samba/man/man5/lmhosts.5 0644 root sys
-f samba usr/local/samba/man/man5/smbpasswd.5 0644 root sys
-d samba usr/local/samba/man/man7 0755 root sys
-f samba usr/local/samba/man/man7/samba.7 0644 root sys
-d samba usr/local/samba/man/man8 0755 root sys
-f samba usr/local/samba/man/man8/smbd.8 0644 root sys
-f samba usr/local/samba/man/man8/nmbd.8 0644 root sys
-f samba usr/local/samba/man/man8/smbpasswd.8 0644 root sys
-f samba usr/local/samba/man/man8/swat.8 0644 root sys
-f samba usr/local/samba/man/man8/smbmount.8 0644 root sys
-f samba usr/local/samba/man/man8/smbmnt.8 0644 root sys
-f samba usr/local/samba/man/man8/smbumount.8 0644 root sys
-d samba usr/local/samba/var 0755 root sys
-d samba usr/local/samba/var/locks 0755 root sys
-d samba usr/local/samba/lib 0755 root sys
-d samba usr/local/samba/lib/codepages 0755 root sys
-d samba usr/local/samba/lib/codepages/src 0755 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.437 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.737 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.775 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.850 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.852 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.861 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.866 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.932 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.936 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.949 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.950 0644 root sys
-f samba usr/local/samba/lib/codepages/src/codepage_def.1251 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP437.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP737.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP850.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP852.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP861.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP866.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP932.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP936.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP949.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CP950.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CPISO8859-1.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CPISO8859-2.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CPISO8859-5.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CPISO8859-7.TXT 0644 root sys
-f samba usr/local/samba/lib/codepages/src/CPKOI8-R.TXT 0644 root sys
-f samba usr/local/samba/lib/smb.conf 0644 root sys
-d samba usr/local/man 0755 root sys
-d samba usr/local/man/html 0755 root sys
-s samba usr/local/man/html/samba=/usr/local/samba/swat/using_samba
+d samba usr/lib 0755 root sys
+d samba usr/lib/samba 0755 root sys
+d samba usr/lib/samba/bin 0755 root sys
+f samba usr/lib/samba/bin/nmblookup 0755 root sys
+f samba usr/lib/samba/bin/smbclient 0755 root sys
+f samba usr/lib/samba/bin/smbpasswd 0755 root sys
+f samba usr/lib/samba/bin/smbstatus 0755 root sys
+f samba usr/lib/samba/bin/testparm 0755 root sys
+f samba usr/lib/samba/bin/testprns 0755 root sys
+f samba usr/lib/samba/bin/make_smbcodepage 0755 root sys
+f samba usr/lib/samba/bin/make_unicodemap 0755 root sys
+f samba usr/lib/samba/bin/make_printerdef 0755 root sys
+f samba usr/lib/samba/bin/rpcclient 0755 root sys
+f samba usr/lib/samba/bin/smbspool 0755 root sys
+f samba usr/lib/samba/bin/mksmbpasswd.sh 0755 root sys
+f samba usr/lib/samba/bin/smbtar 0755 root sys
+f samba usr/lib/samba/bin/smbprint 0755 root sys
+f samba usr/lib/samba/bin/findsmb 0755 root sys
+f samba usr/lib/samba/bin/smbadduser 0755 root sys
+d samba usr/lib/samba/sbin 0755 root sys
+f samba usr/lib/samba/sbin/smbd 0755 root sys
+f samba usr/lib/samba/sbin/nmbd 0755 root sys
+f samba usr/lib/samba/sbin/swat 0755 root sys
+f samba usr/lib/samba/sbin/debug2html 0755 root sys
+f samba usr/lib/samba/sbin/smbtorture 0755 root sys
+f samba usr/lib/samba/sbin/smbfilter 0755 root sys
+f samba usr/lib/samba/sbin/locktest2 0755 root sys
+f samba usr/lib/samba/sbin/masktest 0755 root sys
+d samba usr/lib/samba/swat 0755 root sys
+d samba usr/lib/samba/swat/using_samba 0755 root sys
+d samba usr/lib/samba/swat/using_samba/gifs 0755 root sys
+f samba usr/lib/samba/swat/using_samba/gifs/index.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/gifs/samba.s.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/gifs/txthome.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/gifs/txtnexta.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/gifs/txtpreva.gif 0644 root sys
+d samba usr/lib/samba/swat/using_samba/figs 0755 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0101.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0102.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0103.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0104.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0105.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0106.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0107.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0108.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0109.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0110.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0111.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0112.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0113.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0114.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0201.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0202.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0203.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0204.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0301.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0302.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0303.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0304.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0305.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0306.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0307.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0308.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0309.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0310.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0311.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0312.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0313.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0314.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0315.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0316.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0317.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0318.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0319.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0320.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0321.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0322.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0323.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0324.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0325.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0326.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0327.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0328.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0401.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0402.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0403.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0404.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0405.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0406.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0407.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0501.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0502.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0503.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0504.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0505.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0506.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0507.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0508.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0601.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0602.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0603.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0604.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0605.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0606.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0701.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0702.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0703.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0704.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0705.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0706.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0707.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0708.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0709.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0801.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0802.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0803.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0804.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0805.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0901.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0902.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0903.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0904.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.0905.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.aa01.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.ab01.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/figs/sam.ab02.gif 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appa_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appa_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appa_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appa_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appa_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appb_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appb_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appb_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appc_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appd_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appe_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/appf_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_06.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_07.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch01_08.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch02_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch02_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch02_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch02_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch02_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch02_06.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch03_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch03_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch03_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_06.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_07.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch04_08.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch05_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch05_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch05_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch05_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch05_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch06_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch06_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch06_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch06_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch06_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch06_06.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch07_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch07_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch07_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_04.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_05.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_06.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch08_07.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch09_01.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch09_02.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/ch09_03.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/index.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/inx.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/licenseinfo.html 0644 root sys
+f samba usr/lib/samba/swat/using_samba/this_edition.html 0644 root sys
+d samba usr/lib/samba/swat/images 0755 root sys
+f samba usr/lib/samba/swat/images/globals.gif 0644 root sys
+f samba usr/lib/samba/swat/images/home.gif 0644 root sys
+f samba usr/lib/samba/swat/images/passwd.gif 0644 root sys
+f samba usr/lib/samba/swat/images/printers.gif 0644 root sys
+f samba usr/lib/samba/swat/images/samba.gif 0644 root sys
+f samba usr/lib/samba/swat/images/shares.gif 0644 root sys
+f samba usr/lib/samba/swat/images/status.gif 0644 root sys
+f samba usr/lib/samba/swat/images/viewconfig.gif 0644 root sys
+d samba usr/lib/samba/swat/help 0755 root sys
+f samba usr/lib/samba/swat/help/welcome.html 0644 root sys
+f samba usr/lib/samba/swat/help/DOMAIN_MEMBER.html 0644 root sys
+f samba usr/lib/samba/swat/help/NT_Security.html 0644 root sys
+f samba usr/lib/samba/swat/help/findsmb.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/lmhosts.5.html 0644 root sys
+f samba usr/lib/samba/swat/help/make_smbcodepage.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/nmbd.8.html 0644 root sys
+f samba usr/lib/samba/swat/help/nmblookup.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/rpcclient.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/samba.7.html 0644 root sys
+f samba usr/lib/samba/swat/help/smb.conf.5.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbclient.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbcontrol.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbd.8.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbpasswd.5.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbpasswd.8.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbsh.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbspool.8.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbstatus.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/smbtar.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/swat.8.html 0644 root sys
+f samba usr/lib/samba/swat/help/testparm.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/testprns.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/wbinfo.1.html 0644 root sys
+f samba usr/lib/samba/swat/help/winbindd.8.html 0644 root sys
+d samba usr/lib/samba/swat/include 0755 root sys
+f samba usr/lib/samba/swat/include/footer.html 0644 root sys
+f samba usr/lib/samba/swat/include/header.html 0644 root sys
+f samba usr/lib/samba/swat/README 0644 root sys
+d samba usr/lib/samba/man 0755 root sys
+d samba usr/lib/samba/man/man1 0755 root sys
+f samba usr/lib/samba/man/man1/findsmb.1 0644 root sys
+f samba usr/lib/samba/man/man1/make_smbcodepage.1 0644 root sys
+f samba usr/lib/samba/man/man1/make_unicodemap.1 0644 root sys
+f samba usr/lib/samba/man/man1/nmblookup.1 0644 root sys
+f samba usr/lib/samba/man/man1/smbclient.1 0644 root sys
+f samba usr/lib/samba/man/man1/smbcontrol.1 0644 root sys
+f samba usr/lib/samba/man/man1/smbsh.1 0644 root sys
+f samba usr/lib/samba/man/man1/smbstatus.1 0644 root sys
+f samba usr/lib/samba/man/man1/smbtar.1 0644 root sys
+f samba usr/lib/samba/man/man1/testparm.1 0644 root sys
+f samba usr/lib/samba/man/man1/testprns.1 0644 root sys
+f samba usr/lib/samba/man/man1/wbinfo.1 0644 root sys
+d samba usr/lib/samba/man/man5 0755 root sys
+f samba usr/lib/samba/man/man5/smb.conf.5 0644 root sys
+f samba usr/lib/samba/man/man5/lmhosts.5 0644 root sys
+f samba usr/lib/samba/man/man5/smbpasswd.5 0644 root sys
+d samba usr/lib/samba/man/man7 0755 root sys
+f samba usr/lib/samba/man/man7/samba.7 0644 root sys
+d samba usr/lib/samba/man/man8 0755 root sys
+f samba usr/lib/samba/man/man8/smbd.8 0644 root sys
+f samba usr/lib/samba/man/man8/nmbd.8 0644 root sys
+f samba usr/lib/samba/man/man8/smbpasswd.8 0644 root sys
+f samba usr/lib/samba/man/man8/swat.8 0644 root sys
+f samba usr/lib/samba/man/man8/smbmount.8 0644 root sys
+f samba usr/lib/samba/man/man8/smbmnt.8 0644 root sys
+f samba usr/lib/samba/man/man8/smbumount.8 0644 root sys
+d samba usr/lib/samba/var 0755 root sys
+d samba usr/lib/samba/var/locks 0755 root sys
+d samba usr/lib/samba/lib 0755 root sys
+d samba usr/lib/samba/lib/codepages 0755 root sys
+d samba usr/lib/samba/lib/codepages/src 0755 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.437 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.737 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.775 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.850 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.852 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.861 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.866 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.932 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.936 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.949 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.950 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/codepage_def.1251 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP437.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP737.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP850.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP852.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP861.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP866.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP932.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP936.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP949.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CP950.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CPISO8859-1.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CPISO8859-2.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CPISO8859-5.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CPISO8859-7.TXT 0644 root sys
+f samba usr/lib/samba/lib/codepages/src/CPKOI8-R.TXT 0644 root sys
+f samba usr/lib/samba/lib/smb.conf 0644 root sys
+d samba usr/man 0755 root sys
+s samba usr/man/html.1samba=/usr/lib/samba/swat/using_samba
diff --git a/packaging/Caldera/UnixWare/smb.init b/packaging/Caldera/UnixWare/smb.init
index 535179a25a9..ce6c6fa4b38 100755
--- a/packaging/Caldera/UnixWare/smb.init
+++ b/packaging/Caldera/UnixWare/smb.init
@@ -34,13 +34,11 @@ start() {
#
$SAMBADIR/sbin/smbd -D -s $SAMBADIR/lib/smb.conf
$SAMBADIR/sbin/nmbd -D -s $SAMBADIR/lib/smb.conf
- $SAMBADIR/sbin/winbindd
}
stop() {
killproc nmbd
killproc smbd
- killproc winbindd
}
# Start/stop processes required for samba server
diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl
index dd0e6d32f0d..06ea4499247 100644
--- a/packaging/Mandrake/makerpms.sh.tmpl
+++ b/packaging/Mandrake/makerpms.sh.tmpl
@@ -4,27 +4,19 @@
# Changed for a generic tar file rebuild by abartlet@pcug.org.au
# Taken from Red Hat build area by JHT
# Changed by John H Terpstra to build on RH8.1 - should also work for earlier versions jht@samba.org
+# Changes from Buchan Milne <bgmilne@cae.co.za>
# The following allows environment variables to override the target directories
# the alternative is to have a file in your home directory calles .rpmmacros
# containing the following:
# %_topdir /home/mylogin/RPM
#
-# Note: Under this directory rpm expects to find the same directories that are under the
-# /usr/src/redhat directory
-#
-if [ -x ~/.rpmmacros ]; then
- TOPDIR=`awk '/topdir/ {print $2}' < ~/.rpmmacros`
- if [ z$TOPDIR <> "z" ]; then
- SPECDIR=${TOPDIR}/SPECS
- SRCDIR=${TOPDIR}/SOURCES
- fi
-fi
-SPECDIR=${SPECDIR:-/usr/src/RPM/SPECS}
-SRCDIR=${SRCDIR:-/usr/src/RPM/SOURCES}
+# rpm --eval should always give a correct answer for this
+SPECDIR=`rpm --eval "%{_specdir}"`
+SRCDIR=`rpm --eval "%{_sourcedir}"`
-# At this point the SPECDIR and SRCDIR vaiables must have a value!
+# At this point the (SPECDIR and) SRCDIR vaiables must have a value!
USERID=`id -u`
GRPID=`id -g`
@@ -54,11 +46,34 @@ esac
( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
-( cd ../../.. ; tar --exclude=CVS -cvf ${SRCDIR}/samba-${VERSION}.tar.gz samba-${VERSION} )
-( cd ${SRCDIR}; bzip2 samba-$VERSION.tar )
+echo "Compressing the source as bzip2, may take a while ..."
+( cd ../../.. ; tar --exclude=CVS -cjf ${SRCDIR}/samba-${VERSION}.tar.bz2 samba-${VERSION} )
cp -av samba.spec ${SPECDIR}
-cp -a *.patch smb.* samba.log $SRCDIR
+cp -a *.patch.bz2 *.xpm.bz2 smb.* samba.xinetd samba.log $SRCDIR
+# Prepare to allow straight patches synced from Mandrake cvs:
+# This section is taken from my own build_from_cvs script, which
+# did all the same things. Buchan Milne <bgmilne@cae.co.za>, 20020422.
+#create new snapshots of the patches from distributions tree:
+PATCHES=$(find . -name '*.patch')
+ICONS=$(find '.' -name '*.xpm')
+CONFIGS=$(find `pwd` -name '*'|grep -v ".patch"|grep -v ".xpm"|grep -v "CVS")
+#for PATCH in $PATCHES;do
+bzip2 -kf $PATCHES
+bzip2 -kf $ICONS
+
+#Copy bzip2'ed new snapshots to SOURCES:
+for PATCH in $PATCHES $ICONS;do
+ echo "Updating patch or icon: `basename $PATCH`"
+ cp -f $PATCH.bz2 $SRCDIR
+ rm -f $PATCH.bz2;
+done
+
+#copy configs to SOURCES
+for CONFIG in $CONFIGS;do
+ echo "Updating config file: `basename $CONFIG`"
+ cp -f $CONFIG $SRCDIR;
+done
echo Getting Ready to build release package
cd ${SPECDIR}
diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl
index 363b40fe2b3..0ba49db0833 100644
--- a/packaging/Mandrake/samba2.spec.tmpl
+++ b/packaging/Mandrake/samba2.spec.tmpl
@@ -1,11 +1,95 @@
+%define ver 2.2.3a
+%define rel 11
+
+# PVERSION and PRELEASE replace by samba-team at release
+%define pversion PVERSION
+%define prelease PRELEASE
+# For testing this setup:
+#%define pversion 2.2.4
+#%define prelease %(date +%Y%m%d)
+
+#Check to see if p(version|release) has been replaced (1 if replaced)
+%define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
+%define have_prelease %(if [ "%prelease" = `echo "prelease" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
+
+# We now do detection of the Mandrake release we are building on:
+%define build_cooker %(if [ `awk '{print $3}' /etc/mandrake-release` = "Cooker" ];then echo 1; else echo 0; fi)
+%define build_mdk82 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.2 ];then echo 1; else echo 0; fi)
+%define build_mdk81 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.1 ];then echo 1; else echo 0; fi)
+%define build_mdk80 %(if [ `awk '{print $4}' /etc/mandrake-release` = 8.0 ];then echo 1; else echo 0; fi)
+%define build_mdk72 %(if [ `awk '{print $4}' /etc/mandrake-release` = 7.2 ];then echo 1; else echo 0; fi)
+%define build_non_default 0
+
+# Set defaults for each version
+%if %build_cooker
+%define build_acl 1
+%define build_winbind 1
+%define build_wins 1
+%define build_ldap 1
+%endif
+
+%if %build_mdk82
+%define build_acl 1
+%define build_winbind 1
+%define build_wins 1
+%define build_ldap 0
+%endif
+
+%if %build_mdk81
+%define build_acl 1
+%define build_winbind 0
+%define build_wins 0
+%define build_ldap 0
+%endif
+
+%if %build_mdk80
+%define build_acl 0
+%define build_winbind 0
+%define build_wins 0
+%define build_ldap 0
+%endif
+
+%if %build_mdk72
+%define build_acl 0
+%define build_winbind 0
+%define build_wins 0
+%define build_ldap 0
+%endif
+
+# Allow commandline option overrides (borrowed from Vince's qmail srpm):
+# To use it, do rpm [-ba|--rebuild] --with 'xxx'
+# Check if the rpm was built with the defaults, otherwise we inform the user
+%{?_with_acl: %{expand: %%define build_acl 1}}
+%{?_with_acl: %{expand: %%define build_non_default 1}}
+%{?_without_acl: %{expand: %%define build_acl 0}}
+%{?_without_acl: %{expand: %%define build_non_default 1}}
+%{?_with_winbind: %{expand: %%define build_winbind 1}}
+%{?_with_winbind: %{expand: %%define build_non_default 1}}
+%{?_without_winbind: %{expand: %%define build_winbind 0}}
+%{?_without_winbind: %{expand: %%define build_non_default 1}}
+%{?_with_wins: %{expand: %%define build_wins 1}}
+%{?_with_wins: %{expand: %%define build_non_default 1}}
+%{?_without_wins: %{expand: %%define build_wins 0}}
+%{?_without_wins: %{expand: %%define build_non_default 1}}
+%{?_with_ldap: %{expand: %%define build_ldap 1}}
+%{?_with_ldap: %{expand: %%define build_non_default 1}}
+%{?_without_ldap: %{expand: %%define build_ldap 0}}
+%{?_without_ldap: %{expand: %%define build_non_default 1}}
+
Summary: Samba SMB server.
Name: samba
-Version: PVERSION
-Release: PRELEASE
-License: GNU GPL version 2
+%if %have_pversion
+Version: %{pversion}
+%else
+Version: %{ver}
+%endif
+%if %have_prelease
+Release: 0.%{prelease}.1mdk
+%else
+Release: %{rel}
+%endif
+License: GPL
Group: System/Servers
-Packager: John H Terpstra [samba-team] <jht@samba.org>
-
Source: ftp://samba.org/pub/samba/samba-%{version}.tar.bz2
Source1: samba.log
Source2: mount.smb
@@ -13,18 +97,51 @@ Source3: samba.xinetd
Source4: swat_48.xpm.bz2
Source5: swat_32.xpm.bz2
Source6: swat_16.xpm.bz2
-
-Patch: smbw.patch.bz2
-Patch1: samba-2.2.0-gawk.patch.bz2
-Patch2: samba-2.2.0-buildroot.patch.bz2
-Patch3: smbmount-sbin.patch.bz2
-
-Requires: samba-common = %{version} pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
-Prereq: xinetd chkconfig fileutils sed /bin/grep
-Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall
-BuildRequires: libcups-devel pam-devel
+Source7: README.samba-%{ver}-%{rel}
+#The japanese language patches are large, ignoring them now
+#Patch100: samba-j.patch.bz2
+# For some reason this won't apply as part of the -j patch
+# Seems to have been applied in samba-2.2.3
+#Patch111: samba-2.2.0-ook.patch.bz2
+#Patch200: samba-j-2.patch.bz2
+Patch: samba-2.2.0-makefilepath.patch.bz2
+Patch1: smbw.patch.bz2
+Patch2: samba-glibc21.patch.bz2
+#Patch3: network-recycle_bin.patch.bz2
+#Patch4: samba-nsl.patch.bz2
+Patch5: samba-2.2.0-gawk.patch.bz2
+Patch6: system-auth-winbind.pamd.patch.bz2
+#Patch11: samba-2.0.7-smbspool-guest.patch.bz2
+Patch12: samba-2.2.0-buildroot.patch.bz2
+#Patch16: samba-mkdir.patch.bz2
+Patch17: smbmount-sbin.patch.bz2
+%if !%have_pversion
+# Version specific patches: current version
+Patch7: samba-2.2.3a-init.patch.bz2
+Patch20: samba-2.2.3a-LDAP-schema.patch.bz2
+Patch21: samba-2.2.3a-cli_spoolss_notify.patch.bz2
+Patch22: samba-2.2.3a-pam_smbpass.patch.bz2
+Patch23: samba-2.2.3a-srv_spoolss_nt.patch.bz2
+%else
+# Version specific patches: upcoming version
+%endif
+Requires: pam >= 0.64, samba-common = %{version}
+BuildRequires: pam-devel autoconf
+%if %build_acl
+BuildRequires: libacl-devel
+%endif
+%if %build_mdk72
+BuildRequires: cups-devel
+%else
+BuildRequires: libcups-devel
+%endif
+%if %build_ldap
+BuildRequires: libldap-devel
+%endif
BuildRoot: %{_tmppath}/%{name}-root
Prefix: /usr
+Prereq: /sbin/chkconfig /bin/mktemp /usr/bin/killall
+Prereq: fileutils sed /bin/grep
%description
Samba provides an SMB server which can be used to provide
@@ -40,7 +157,8 @@ Samba-2.2 features working NT Domain Control capability and
includes the SWAT (Samba Web Administration Tool) that
allows samba's smb.conf file to be remotely managed using your
favourite web browser. For the time being this is being
-enabled on TCP port 901 via xinetd.
+enabled on TCP port 901 via xinetd. SWAT is now included in
+it's own subpackage, samba-swat.
Users are advised to use Samba-2.2 as a Windows NT4
Domain Controller only on networks that do NOT have a Windows
@@ -53,6 +171,12 @@ This binary release includes encrypted password support.
Please read the smb.conf file and ENCRYPTION.txt in the
docs directory for implementation details.
+%if %build_non_default
+WARNING: This RPM was built with command-line options. Please
+see README.samba-%{ver}-%{rel} in the documentation for
+more information.
+%endif
+
%package client
Summary: Samba (SMB) client programs.
Group: Networking/Other
@@ -81,44 +205,135 @@ Requires: samba-common = %{version}
Samba-doc provides documentation files for both the server and client
packages of Samba.
+%package swat
+Summary: The Samba Web Administration Tool.
+Group: System/Servers
+Requires: samba = %{version} xinetd
+
+%description swat
+SWAT (the Samba Web Administration Tool) allows samba's smb.conf file
+to be remotely managed using your favourite web browser. For the time
+being this is being enabled on TCP port 901 via xinetd. Note that
+SWAT does not use SSL encryption, nor does it preserve comments in
+your smb.conf file. Webmin uses SSL encryption by default, and
+preserves comments in configuration files, even if it does not display
+them, and is therefore the preferred method for remotely managing
+Samba.
+
+
+%if %build_winbind
+%package winbind
+Summary: Samba-winbind daemon, utilities and documentation
+Group: System/Servers
+Requires: samba-common = %{version}
+%description winbind
+Provides the winbind daemon and testing tools to allow authentication
+and group/user enumeration from a Windows or Samba domain controller.
+%endif
+
+%if %build_wins
+%package -n nss_wins
+Summary: Name Service Switch service for WINS
+Group: System/Servers
+Requires: samba-common = %{version}
+PreReq: glibc
+%description -n nss_wins
+Provides the libnss_wins shared library which resolves NetBIOS names to
+IP addresses.
+%endif
+
%prep
+# Build a summary of how this RPM was built:
+%if %build_acl
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --with acl"
+%else
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --without acl"
+%endif
+%if %build_winbind
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --with winbind"
+%else
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --without winbind"
+%endif
+%if %build_wins
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --with wins"
+%else
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --without wins"
+%endif
+%if %build_ldap
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --with ldap"
+%else
+RPM_EXTRA_OPTIONS="$RPM_EXTRA_OPTIONS --without ldap"
+%endif
+
+%if %build_non_default
+echo "Building a non-default rpm with the following command-line arguments:"
+echo "$RPM_EXTRA_OPTIONS"
+echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7}
+echo "an identical rpm, you need to supply the following options">>%{SOURCE7}
+echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7}
+%else
+echo "This rpm was built with default options">%{SOURCE7}
+%endif
+
%setup -q
-%patch -p1 -b .smbw
-%patch1 -p1 -b .gawk
-%patch2 -p1 -b .buildroot
-%patch3 -p1
+#%patch111 -p1
+%patch1 -p1 -b .smbw
+#%patch3 -p1 -b .net-r_bin
+#%patch4 -p1 -b .nsl
+%patch5 -p1 -b .gawk
+#%patch6 -p1
+#%patch7 -p1
+#%patch11 -p0 -b .smbspool
+%patch12 -p1 -b .buildroot
+%patch17 -p1
+# Version specific patches: current version
+%if !%have_pversion
+echo "Applying patches for current version: %{ver}"
+%patch20 -p1
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
+%else
+# Version specific patches: upcoming version
+echo "Applying patches for new verions: %{pversion}"
+%endif
+
+cp %{SOURCE7} .
%build
+#%serverbuild
cd source
autoconf
-
-NUMCPU=`grep processor /proc/cpuinfo | wc -l`
-
+CPPFLAGS="-I/usr/include/openssl"; export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS"
%configure --prefix=%{prefix} \
+ --with-fhs \
--libdir=/etc/samba \
- --localstatedir=/var \
--sysconfdir=/etc/samba \
- --with-acl-support \
- --with-automount \
- --with-codepagedir=/var/lib/samba/codepages \
+ --localstatedir=/var \
--with-configdir=/etc/samba \
- --with-fhs \
- --with-mmap \
- --with-netatalk \
- --with-pam \
- --with-pam_smbpass \
- --with-privatedir=/etc/samba \
- --with-quotas \
- --with-sambabook=%{prefix}/share/swat/using_samba \
- --with-smbmount \
- --with-smbwrapper \
+ --with-codepagedir=/var/lib/samba/codepages \
+ --with-privatedir=/etc/samba \
--with-swatdir=%{prefix}/share/swat \
+ --with-smbmount \
--with-syslog \
- --with-utmp
+ --with-automount \
+ --with-pam \
+ --with-pam_smbpass \
+ --with-vfs \
+ --with-utmp \
+ --with-msdfs \
+ --with-smbwrapper \
+%if %build_acl
+ --with-acl-support \
+%endif
+%if %build_ldap
+ --with-ldapsam \
+%endif
+ --with-quotas
-make -j${NUMCPU} proto
-make -j${NUMCPU} CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html
+#make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" all
+make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html
%install
rm -rf $RPM_BUILD_ROOT
@@ -133,8 +348,10 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/swat/using_samba/{figs,gifs}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man1,man5,man7,man8}
mkdir -p $RPM_BUILD_ROOT/var/cache/samba
mkdir -p $RPM_BUILD_ROOT/var/log/samba
+mkdir -p $RPM_BUILD_ROOT/var/run/samba
mkdir -p $RPM_BUILD_ROOT/var/spool/samba
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/{netlogon,profiles,printers}
+mkdir -p $RPM_BUILD_ROOT/var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/codepages/src
mkdir -p $RPM_BUILD_ROOT/lib/security
mkdir -p $RPM_BUILD_ROOT%prefix/lib
@@ -143,13 +360,14 @@ mkdir -p $RPM_BUILD_ROOT%prefix/lib
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
- smbcacls smbclient smbmount smbumount smbsh
+ smbcacls smbclient smbmount smbumount smbsh wbinfo
do
install -m755 source/bin/$i $RPM_BUILD_ROOT/%{prefix}/bin
done
install -m 755 source/bin/smbwrapper.so $RPM_BUILD_ROOT%prefix/lib/smbwrapper.so
install -m 755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/pam_smbpass.so
+install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/pam_winbind.so
#for i in addtosmbpass mksmbpasswd.sh smbtar convert_smbpasswd
@@ -160,7 +378,7 @@ done
# Install secure binary files
-for i in smbd nmbd swat smbfilter debug2html smbmnt smbcontrol
+for i in smbd nmbd swat smbfilter debug2html smbmnt smbcontrol winbindd
do
install -m755 source/bin/$i $RPM_BUILD_ROOT/%{prefix}/sbin
done
@@ -176,31 +394,33 @@ done
# Install codepage source files
-for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+for i in 437 737 775 850 852 857 861 866 932 936 949 950 1251
do
install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT/var/lib/samba/codepages/src
done
-for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+for i in 437 737 775 850 852 857 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R
do
install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT/var/lib/samba/codepages/src
done
# Build codepage load files
-for i in 437 737 775 850 852 861 866 932 936 949 950 1251; do
+for i in 437 737 775 850 852 857 861 866 932 936 949 950 1251; do
$RPM_BUILD_ROOT/%{prefix}/bin/make_smbcodepage c $i $RPM_BUILD_ROOT/var/lib/samba/codepages/src/codepage_def.$i $RPM_BUILD_ROOT/var/lib/samba/codepages/codepage.$i
done
# Build unicode load files
-for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R; do
+for i in 437 737 775 850 852 857 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R; do
$RPM_BUILD_ROOT/%{prefix}/bin/make_unicodemap $i $RPM_BUILD_ROOT/var/lib/samba/codepages/src/CP$i.TXT $RPM_BUILD_ROOT/var/lib/samba/codepages/unicode_map.$i
done
rm -rf $RPM_BUILD_ROOT/var/lib/samba/codepages/src
# 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; )
+for i in wins winbind; do
+ install -m755 source/nsswitch/libnss_$i.so $RPM_BUILD_ROOT/lib
+done
+# Make link for wins and winbind resolvers
+( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2)
# Install SWAT helper files
for i in swat/help/*.html docs/htmldocs/*.html; do
@@ -238,7 +458,11 @@ install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT/usr/bin
install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/usr/sbin/samba
+ install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/etc/rc.d/init.d/winbind
+ install -m755 packaging/Mandrake/winbind.init $RPM_BUILD_ROOT/usr/sbin/winbind
install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+ install -m644 packaging/Mandrake/system-auth-winbind.pamd $RPM_BUILD_ROOT/etc/pam.d/system-auth-winbind
+#
install -m644 $RPM_SOURCE_DIR/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
@@ -278,17 +502,25 @@ bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_miconsdir}/swat.xpm
%clean
rm -rf $RPM_BUILD_ROOT
-%post
-
-/sbin/chkconfig --level 35 smb on
-
-if [ -f /var/lock/subsys/xinetd ]; then
- service xinetd reload >/dev/null 2>&1 || :
-fi
+%post -n samba
+%_post_service smb
+#/sbin/chkconfig --level 35 smb on
# Add a unix group for samba machine accounts
groupadd -frg 421 machines
+%post -n samba-common
+# Basic migration script for pre-2.2.1 users,
+# since smb config moved from /etc to /etc/samba
+
+mkdir -p /etc/samba
+for s in smb.conf smbusers smbpasswd printers.def secrets.tdb lmhosts; do
+[ -f /etc/$s ] && {
+ cp -f /etc/$s /etc/$s.OLD
+ mv -f /etc/$s /etc/samba/
+}
+done
+
# Migrate tdb's from /var/lock/samba (taken from official samba spec file):
for i in /var/lock/samba/*.tdb
do
@@ -309,22 +541,16 @@ done
if [ -d /var/lock/samba ]; then
rm -rf /var/lock/samba
fi
+# Make a symlink on /usr/lib/smbwrapper.so in /usr/bin
+# to fix smbsh problem (another way to do that, anyone???)
-%post common
-# Basic migration script for pre-2.2.1 users,
-# since smb config moved from /etc to /etc/samba
-
-mkdir -p /etc/samba
-for s in smb.conf smbusers smbpasswd printers.def secrets.tdb lmhosts; do
-[ -f /etc/$s ] && {
- cp -f /etc/$s /etc/$s.OLD
- mv -f /etc/$s /etc/samba/
-}
-done
+ln -sf /usr/lib/smbwrapper.so /usr/bin/smbwrapper.so
# Let's create a proper /etc/samba/smbpasswd file
-touch /etc/samba/smbpasswd
-
+[ -f /etc/samba/smbpasswd ] || {
+ echo "Creating password file for samba..."
+ touch /etc/samba/smbpasswd
+}
# Let's define the proper paths for config files
perl -pi -e 's/(\/etc\/)(smb)/\1samba\/\2/' /etc/samba/smb.conf
@@ -334,32 +560,85 @@ if [ -f /etc/logrotate.d/samba ]; then
perl -pi -e 's/nmb /nmbd /' /etc/logrotate.d/samba
fi
-# And not loose our machine account SIDs
-[ -f /etc/*.SID ] && cp -f /etc/*.SID /etc/samba/
+# And not loose our machine account SID
+[ -f /etc/MACHINE.SID ] && mv -f /etc/MACHINE.SID /etc/samba/ ||:
+
+%if %build_winbind
+%post -n samba-winbind
+%_post_service winbind
+if [ $1 = 1 ]; then
+# /sbin/chkconfig winbind on
+ cp -af /etc/nsswitch.conf /etc/nsswitch.conf.rpmsave
+ cp -af /etc/nsswitch.conf /etc/nsswitch.conf.rpmtemp
+ for i in passwd group;do
+ grep ^$i /etc/nsswitch.conf |grep -v 'winbind' 1>/dev/null 2>/dev/null
+ if [ $? = 0 ];then
+ echo "Adding a winbind entry to the $i section of /etc/nsswitch.conf"
+ awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' /etc/nsswitch.conf.rpmtemp >/etc/nsswitch.conf;
+ cp -af /etc/nsswitch.conf /etc/nsswitch.conf.rpmtemp
+ else
+ echo "$i entry found in /etc/nsswitch.conf"
+ fi
+ done
+ if [ -f /etc/nsswitch.conf.rpmtemp ];then
+ rm -f /etc/nsswitch.conf.rpmtemp;fi
+fi
+%preun -n samba-winbind
+%_preun_service winbind
+if [ $1 = 0 ]; then
+ echo "Removing winbind entries from /etc/nsswitch.conf"
+ perl -pi -e 's/ winbind//' /etc/nsswitch.conf
-%update_menus
+# /sbin/chkconfig winbind reset
+fi
+%endif %build_winbind
+
+%if %build_wins
+%post -n nss_wins
+if [ $1 = 1 ]; then
+ cp -af /etc/nsswitch.conf /etc/nsswitch.conf.rpmsave
+ grep '^hosts' /etc/nsswitch.conf |grep -v 'wins' >/dev/null
+ if [ $? = 0 ];then
+ echo "Adding a wins entry to the hosts section of /etc/nsswitch.conf"
+ awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' /etc/nsswitch.conf.rpmsave >/etc/nsswitch.conf;
+ else
+ echo "wins entry found in /etc/nsswitch.conf"
+ fi
+# else
+# echo "Upgrade, leaving nsswitch.conf intact"
+fi
-%preun
+%preun -n nss_wins
+if [ $1 = 0 ]; then
+ echo "Removing wins entry from /etc/nsswitch.conf"
+ perl -pi -e 's/ wins//' /etc/nsswitch.conf
+#else
+# echo "Leaving /etc/nsswitch.conf intact"
+fi
+%endif %build_wins
-/sbin/chkconfig --level 35 smb reset
+%preun
if [ $1 = 0 ] ; then
-
- for i in browse.dat wins.dat brlock.tdb unexpected.tdb connections.tdb \
-locking.tdb messages.tdb;do
- if [ -e /var/cache/samba/$i ]; then
- rm -f /var/cache/samba/$i
- fi;
- done
+%_preun_service smb
+# /sbin/chkconfig --level 35 smb reset
+# Let's not loose /var/cache/samba
+
+# for i in browse.dat wins.dat brlock.tdb unexpected.tdb connections.tdb \
+#locking.tdb messages.tdb;do
+# if [ -e /var/cache/samba/$i ]; then
+# mv -f /var/cache/samba/$i /var/cache/samba/$i.BAK
+# fi;
+# done
if [ -d /var/log/samba ]; then
rm -rf /var/log/samba/*
fi
if [ -d /var/cache/samba ]; then
- rm -rf /var/cache/samba/*
+ mv -f /var/cache/samba /var/cache/samba.BAK
fi
fi
-%preun common
+%preun -n samba-common
if [ $1 = 0 ] ; then
for n in /etc/samba/codepages/*; do
@@ -369,12 +648,19 @@ if [ $1 = 0 ] ; then
done
fi
-%postun
+
+%post -n samba-swat
+if [ -f /var/lock/subsys/xinetd ]; then
+ service xinetd reload >/dev/null 2>&1 || :
+fi
+%update_menus
+
+%postun -n samba-swat
# Remove swat entry from xinetd
if [ $1 = 0 -a -f /etc/xinetd.conf ] ; then
rm -f /etc/xinetd.d/swat
-service xinetd reload &>/dev/null || :
+ service xinetd reload &>/dev/null || :
fi
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
@@ -397,11 +683,6 @@ fi
%files
%defattr(-,root,root)
-%config(noreplace) /etc/xinetd.d/swat
-%{_menudir}/%{name}
-%{_miconsdir}/*.xpm
-%{_liconsdir}/*.xpm
-%{_iconsdir}/*.xpm
#%attr(-,root,root) %{prefix}/sbin/*
%attr(-,root,root) /sbin/*
#%attr(-,root,root) %{prefix}/bin/*
@@ -409,17 +690,13 @@ fi
%{prefix}/sbin/samba
%{prefix}/sbin/smbd
%{prefix}/sbin/nmbd
-%{prefix}/sbin/swat
%{prefix}/sbin/smbcontrol
#%{prefix}/bin/addtosmbpass
%{prefix}/bin/mksmbpasswd.sh
%{prefix}/bin/smbstatus
-%{prefix}/bin/smbpasswd
%{prefix}/bin/convert_smbpasswd
+%attr(755,root,root) /lib/security/pam_smbpass*
#/usr/share/swat
-%attr(-,root,root) %{prefix}/share/swat/help/*
-%attr(-,root,root) %{prefix}/share/swat/images/*
-%attr(-,root,root) %{prefix}/share/swat/include/*
%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
%attr(-,root,root) %config /etc/rc.d/init.d/smb
%attr(-,root,root) %config(noreplace) /etc/logrotate.d/samba
@@ -430,32 +707,47 @@ fi
%{_mandir}/man8/smbd.8*
%{_mandir}/man8/nmbd.8*
%{_mandir}/man1/smbcontrol.1*
-%{_mandir}/man8/smbpasswd.8*
-%{_mandir}/man8/swat.8*
#%{_mandir}/man1/lmhosts.1*
%{_mandir}/man5/smb.conf.5*
%attr(775,root,root) %dir /var/lib/samba/netlogon
%attr(775,root,root) %dir /var/lib/samba/profiles
-%attr(775,root,root) %dir /var/lib/samba/printers
-%dir /var/cache/samba
+%attr(775,root,root) %dir /var/lib/samba/printers/*
%dir /var/log/samba
+%dir /var/run/samba
%attr(1777,root,root) %dir /var/spool/samba
+
%files doc
%defattr(-,root,root)
%doc README COPYING Manifest Read-Manifest-Now
%doc WHATSNEW.txt Roadmap
+%doc README.samba-%{ver}-%{rel}
%doc docs
%doc examples
%doc swat/README
%attr(-,root,root) %{prefix}/share/swat/using_samba/*
+
+%files swat
+%defattr(-,root,root)
+%config(noreplace) /etc/xinetd.d/swat
+%attr(-,root,root) /sbin/*
+%{_sbindir}/swat
+%{_menudir}/%{name}
+%{_miconsdir}/*.xpm
+%{_liconsdir}/*.xpm
+%{_iconsdir}/*.xpm
+%attr(-,root,root) %{prefix}/share/swat/help/*
+%attr(-,root,root) %{prefix}/share/swat/images/*
+%attr(-,root,root) %{prefix}/share/swat/include/*
+%{_mandir}/man8/swat.8*
+
%files client
%defattr(-,root,root)
%ifnarch alpha
/sbin/mount.smb
/sbin/mount.smbfs
-%attr(4775,root,root) %{prefix}/bin/smbmount
+%attr(775,root,root) %{prefix}/bin/smbmount
%attr(4775,root,root) %{prefix}/bin/smbumount
-%{prefix}/sbin/smbmnt
+%attr(4775,root,root) %{prefix}/sbin/smbmnt
%{_mandir}/man8/smbmnt.8*
%{_mandir}/man8/smbmount.8*
%{_mandir}/man8/smbumount.8*
@@ -477,6 +769,7 @@ fi
%files common
%defattr(-,root,root)
+%dir /var/cache/samba
/%{prefix}/bin/make_smbcodepage
/%{prefix}/bin/make_unicodemap
/%{prefix}/bin/testparm
@@ -484,8 +777,8 @@ fi
/%{prefix}/bin/make_printerdef
/%{prefix}/bin/rpcclient
/%{prefix}/bin/smbsh
-%prefix/lib/smbwrapper.so
-/lib/security/*
+%{prefix}/bin/smbpasswd
+%{prefix}/lib/smbwrapper.so
%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
%attr(-,root,root) /var/lib/samba/codepages
@@ -496,15 +789,196 @@ fi
%{_mandir}/man1/testprns.1*
%{_mandir}/man5/smb.conf.5*
%{_mandir}/man5/lmhosts.5*
-%attr(755,root,root) /lib/*.so
-%attr(755,root,root) /lib/*.so.*
+%{_mandir}/man8/smbpasswd.8*
+
+%if %build_winbind
+%files winbind
+%defattr(-,root,root)
+%{prefix}/sbin/winbindd
+%{prefix}/bin/wbinfo
+%attr(755,root,root) /lib/security/pam_winbind*
+%attr(755,root,root) /lib/libnss_winbind*
+%attr(-,root,root) %config /etc/rc.d/init.d/winbind
+%attr(-,root,root) %config(noreplace) /etc/pam.d/system-auth-winbind
+%{_mandir}/man8/winbindd.8*
+%{_mandir}/man1/wbinfo.1*
+%endif
+
+%if %build_wins
+%files -n nss_wins
+%defattr(-,root,root)
+%attr(755,root,root) /lib/libnss_wins.so*
+%endif
%changelog
-* Sat Jan 05 2002 John H Terpstra <jht@samba.org>
-- Updated from Mandrake 8.1 SRPM to bring building up to date
-- Note: I disposed of all patches that would not apply to the CVS sources
- no time to check if really needed - hope someone else will validate this.
+* Fri Apr 26 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3a-12mdk
+- Final changes for 2.2.4 release
+- Removed patches 4(nsl),11(smbspool-guest)
+- Made patch 7 (2.2.3a-init) release specific
+
+* Sun Apr 21 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3a-11mdk
+- Tested with CVS snapshot (upcoming relaese, sync packaging)
+- Added detection of samba-official release (so we can keep one spec
+ file in sync in both cvs trees)
+- Add Distro-detection(tm) (allows us to remove some arbitrary repitition)
+- Made patches 20,21,23 (merged upstream), and 22 (breaks pam_smbpass
+ compilation, pam_smbpass.so seems to be built correctly without it)
+ version-specific
+- Removed patches 18,19 (only applicable to 2.2.2)
+
+* Sat Mar 16 2002 Pixel <pixel@mandrakesoft.com> 2.2.3a-10mdk
+- fix Patch 7 to fix samba not starting at boot time
+
+* Tue Mar 12 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-9mdk
+- Patch 7 to fix samba not starting at boot time (-- Pixel)
+
+* Sat Mar 9 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-8mdk
+- Patch 23 from CVS to fix saving changes in printer properties (-- Gerald Carter)
+
+* Fri Mar 8 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-7mdk
+- Added a few new codepage/character sets.
+- replace deletion of /var/cache/samba by simple backup when removing samba
+ to avoid loosing winbind rid->uid map and print driver tdbs.
+- Moved /var/cache/samba migration process from %post samba to %post samba-common.
+- Moved require xinetd from samba to samba-swat.
+
+* Mon Feb 27 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-6mdk
+- Fixed pam_smbpass compiling problem. (-- Ilia Chipitsine)
+- moved /var/cache/samba from server to common as it's used by client too.
+- symlinked smbwrapper.so back to /usr/bin to fix smbsh pb. (-- Alexander Skwar)
+- added %_post/preun_service macro for smb & winbind.
+
+* Fri Feb 22 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-5mdk
+- added cli_spoolss_notify patch to prevent smbd dying when a printer
+ is opened from Win2k. (-- Gerald Carter)
+
+* Mon Feb 18 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-4mdk
+- fixed the chkconfig --reset when upgrading form previos version.
+- added correct LDAP schema in example section.
+
+* Fri Feb 08 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-3mdk
+- _Really_ suid back smbumount; OK, you can laugh now...
+
+* Fri Feb 08 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-2mdk
+- suid back smbumount.
+
+* Thu Feb 07 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.3a-1mdk
+- upped to 2.2.3a bugfix version.
+- removed suid on smb(u)mount, suid smbmnt instead.
+
+* Mon Feb 04 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3-2mdk
+- Added --without xxx support for all the --with xxx command-
+ line options. Now also detects (and warns) when built
+ for non-default distro.
+- Fix %post -n samba-winbind
+
+* Mon Feb 04 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3-1mdk
+- Samba-2.2.3. Disabled patches 6,18,19, which should have been
+ applied in samba CVS.
+
+* Sun Feb 03 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.2-10mdk
+- Reenable patches 6 and 19 (applied in CVS, but this is 2.2.2!)
+- Added option to use --with xxx when building, options so far
+ for mdk72, mdk80, mdk81, mdk82, cooker, ldap, winbind, wins, acl
+- Put warning text in %description if the RPM was built with
+ non-defaults.
+
+* Mon Jan 21 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-9mdk
+- Fixed %post scripts here and there.
+- samba-common %post scriptlet is now clean (-- thanks Zytho).
+
+* Mon Jan 21 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-8mdk
+- rebuilt on cooker.
+- please test extensively this package,
+ but consider our target _is_ 2.2.3.
+
+* Thu Jan 17 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.2-7mdk
+- Make a 2.2.2 package for the changes in 2.2.3:
+- reenable XFS quota patch, turned off ldap
+
+* Thu Jan 17 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3-0.20020117mdk
+- New scripts for winbind from 3.0alpha spec file
+
+* Wed Jan 16 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3-0.20020116mdk
+- Updated CVS snapshot
+
+* Sun Dec 23 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.3-0.20011222mdk
+- New CVS snapshot
+- Sync up with changes made in 2.2.2 to support Mandrake 8.0, 7.2
+- Added new subpackage for swat
+- More %if's for ldap.
+
+* Thu Dec 06 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.3-0.20011205mdk
+- Build from CVS snapshot of SAMBA_2_2 to test XFS quotas
+- Removed XFS quota patch (applied upstream)
+
+* Wed Dec 05 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-6mdk
+- fixed typo in system-auth-winbind.pamd (--Thanks J. Gluck).
+- fixed %post xxx problem (smb not started in chkconfig --Thanks Viet & B. Kenworthy).
+
+* Fri Nov 23 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-5mdk
+- Had to remove the network recycle bin patch: it seems to mess up
+ file deletion from windows (files appear to be "already in use")
+
+* Tue Nov 13 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-4mdk
+- added network recycle bin patch:
+ <http://www.amherst.edu/~bbstone/howto/samba.html>
+- added "recycle bin = .recycled" parameter in smb.conf [homes].
+- fixed winbind/nss_wins perms (oh no I don't own that stuff ;o)
+
+* Mon Nov 12 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-3mdk
+- added %build 8.0 and 7.2, for tweakers to play around.
+- changed configure options:
+ . removed --with-mmap, --with-netatalk (obsolete).
+ . added --with-msdfs, --with-vfs (seems stable, but still need testing).
+
+* Mon Nov 12 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-2mdk
+- rebuilt with winbind and nss_wins enabled.
+
+* Wed Oct 31 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-1mdk
+- Rebuilt on cooker.
+
+* Wed Oct 31 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.992mdk
+- Patch for smb.conf to fix incorrect lpq command, typo in winbind,
+ and add sample linpopup command. Added print driver directories.
+- New XFS quota patch (untested!, samba runs, but do quotas work? We
+ can't check yet since the kernel doesn't seem to support XFS quotas!)
+
+* Fri Oct 19 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.2-0.99mdk
+- New samba.spec, almost ready for winbind operations. OLA for Buchan Milne
+ Who did a tremendous integration work on 2.2.2.
+ Rebuild on cooker, please test XFS (ACLs and quotas) again...
+
+* Mon Oct 15 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.9mdk
+- Samba-2.2.2. released! Use %defines to determine which subpackages
+ are built and which Mandrake release we are buiding on/for (hint: define
+ build_mdk81 1 for Mandrake 8.1 updates)
+
+* Sun Oct 14 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011014mdk
+- %post and %postun for nss_wins
+
+* Wed Oct 10 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011010mdk
+- New CVS snapshot, /etc/pam.d/system-auth-winbind added
+ with configuration to allow easy winbind setup.
+
+* Sun Oct 7 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011007mdk
+- Added new package nss_wins and moved smbpasswd to common (required by
+ winbind).
+* Sat Oct 6 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011006mdk
+- Added new package winbind.
+
+* Mon Oct 1 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20011001mdk
+- Removed patch to smb init.d file (applied in cvs)
+
+* Sun Sep 30 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20010930mdk
+- Added winbind init script, which still needs to check for running nmbd.
+
+* Thu Sep 27 2001 Buchan Milne <bgmilne@cae.co.za> 2.2.2-0.20010927mdk
+- Built from samba-2.2.2-pre cvs, added winbindd, wbinfo, nss_winbind and
+ pam_winbind, moved pam_smbpass from samba-common to samba. We still
+ need a start-up script for winbind, or need to modify existing one.
+
* Mon Sep 10 2001 Sylvestre Taburet <staburet@mandrakesoft.com> 2.2.1a-15mdk
- Enabled acl support (XFS acls now supported by kernel-2.4.8-21mdk thx Chmou)
Added smbd patch to support XFS quota (Nathan Scott)
diff --git a/packaging/Mandrake/smb.init b/packaging/Mandrake/smb.init
index 4c1ea0ef9f7..bdc15187095 100755
--- a/packaging/Mandrake/smb.init
+++ b/packaging/Mandrake/smb.init
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# chkconfig: - 91 35
+# chkconfig: 35 91 9
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index d6fbb4c59a6..88dbe9204b7 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] <jht@samba.org>
Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
Prereq: chkconfig fileutils
+Provides: samba = %{version}, samba-common = %{version}, samba-client = %{version}, samba-swat = %{version}
BuildRoot: /var/tmp/samba
Prefix: /usr
@@ -187,7 +188,7 @@ 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/cache/samba
-mkdir -p $RPM_BUILD_ROOT/var/log/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
@@ -515,6 +516,7 @@ 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/SGI/idb.pl b/packaging/SGI/idb.pl
index c73350292b0..0c903ea93f5 100755
--- a/packaging/SGI/idb.pl
+++ b/packaging/SGI/idb.pl
@@ -146,6 +146,13 @@ print IDB "l 0000 root sys etc/rc2.d/S81samba $SRCPFX/packaging/SGI $PKG.sw.base
print IDB "l 0000 root sys etc/rc2.d/S82winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n";
if ($PKG eq "samba_irix") {
+ print IDB "d 0755 root sys usr/include/samba $SRCPFX/packaging/SGI $PKG.sw.base\n";
+ print IDB "f 0644 root sys usr/include/samba/libsmbclient.h $SRCPFX/source/include/libsmbclient.h $PKG.sw.base\n";
+
+ print IDB "d 0755 root sys usr/lib32/samba $SRCPFX/packaging/SGI $PKG.sw.base\n";
+ print IDB "f 0644 root sys usr/lib32/samba/libsmbclient.a $SRCPFX/source/bin/libsmbclient.a $PKG.sw.base\n";
+ print IDB "f 0644 root sys usr/lib32/samba/libsmbclient.so $SRCPFX/source/bin/libsmbclient.so $PKG.sw.base\n";
+
print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba_irix/TC build/TC $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba_irix/ch1.z build/ch1.z $PKG.man.relnotes\n";
@@ -175,7 +182,7 @@ while(@bins) {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base\n";
}
elsif ($filename eq "swat") {
- print IDB "f 4755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base preop(\"chroot \$rbase /etc/init.d/samba stop\") exitop(\"chroot \$rbase /usr/samba/scripts/startswat.sh\") removeop(\"chroot \$rbase /sbin/cp /etc/inetd.conf /etc/inetd.conf.O ; chroot \$rbase /sbin/sed -e '/^swat/D' -e '/^#SWAT/D' /etc/inetd.conf.O >/etc/inetd.conf; /etc/killall -HUP inetd || true\")\n";
+ print IDB "f 4755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base preop(\"chroot \$rbase /etc/init.d/samba stop; exit 0\") exitop(\"chroot \$rbase /usr/samba/scripts/startswat.sh; exit 0\") removeop(\"chroot \$rbase /sbin/cp /etc/inetd.conf /etc/inetd.conf.O ; chroot \$rbase /sbin/sed -e '/^swat/D' -e '/^#SWAT/D' /etc/inetd.conf.O >/etc/inetd.conf; /etc/killall -HUP inetd || true; exit 0\")\n";
}
elsif ($filename eq "sambalp") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base \n";
@@ -219,12 +226,21 @@ while (@docs) {
}
}
+if ($PKG ne "samba_irix") {
+ print IDB "d 0755 root sys usr/samba/include $SRCPFX/packaging/SGI $PKG.sw.base\n";
+ print IDB "f 0644 root sys usr/samba/include/libsmbclient.h $SRCPFX/source/include/libsmbclient.h $PKG.sw.base\n";
+}
+
print IDB "d 0755 root sys usr/samba/lib $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 root sys usr/samba/lib/codepages $SRCPFX/packaging/SGI $PKG.sw.base\n";
while (@codepage) {
$nextpage = shift @codepage;
print IDB "f 0644 root sys usr/samba/lib/codepages/$nextpage $SRCPFX/packaging/SGI/codepages/$nextpage $PKG.sw.base nostrip \n";
}
+if ($PKG ne "samba_irix") {
+ print IDB "f 0644 root sys usr/samba/lib/libsmbclient.a $SRCPFX/source/bin/libsmbclient.a $PKG.sw.base\n";
+ print IDB "f 0644 root sys usr/samba/lib/libsmbclient.so $SRCPFX/source/bin/libsmbclient.so $PKG.sw.base\n";
+}
print IDB "f 0644 root sys usr/samba/lib/smb.conf $SRCPFX/packaging/SGI/smb.conf $PKG.sw.base config(suggest)\n";
print IDB "d 0755 lp sys usr/samba/printer $SRCPFX/packaging/SGI $PKG.sw.base\n";
@@ -239,7 +255,7 @@ print IDB "f 0600 root sys usr/samba/private/smbpasswd $SRCPFX/packaging/SGI/smb
print IDB "d 0755 root sys usr/samba/scripts $SRCPFX/packaging/SGI $PKG.src.samba\n";
print IDB "f 0755 root sys usr/samba/scripts/inetd.sh $SRCPFX/packaging/SGI/inetd.sh $PKG.sw.base\n";
-print IDB "f 0755 root sys usr/samba/scripts/inst.msg $SRCPFX/packaging/SGI/inst.msg $PKG.sw.base exitop(\"chroot \$rbase /usr/samba/scripts/inst.msg\")\n";
+print IDB "f 0755 root sys usr/samba/scripts/inst.msg $SRCPFX/packaging/SGI/inst.msg $PKG.sw.base exitop(\"chroot \$rbase /usr/samba/scripts/inst.msg; exit 0\")\n";
print IDB "f 0755 root sys usr/samba/scripts/mkprintcap.sh $SRCPFX/packaging/SGI/mkprintcap.sh $PKG.sw.base\n";
print IDB "f 0755 root sys usr/samba/scripts/removeswat.sh $SRCPFX/packaging/SGI/removeswat.sh $PKG.sw.base\n";
print IDB "f 0755 root sys usr/samba/scripts/startswat.sh $SRCPFX/packaging/SGI/startswat.sh $PKG.sw.base\n";
@@ -309,8 +325,7 @@ if (@nsswitch) {
while(@nsswitch) {
$nextfile = shift @nsswitch;
($filename = $nextfile) =~ s/^.*\///;
- $filename =~ s/libnss/libns/;
- print IDB "f 0644 root sys var/ns/lib/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
+ print IDB "f 0644 root sys var/ns/lib/$filename $SRCPFX/source/nsswitch/$filename $PKG.sw.base \n";
}
}
diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh
index 546a89068c5..f4febca220b 100755
--- a/packaging/SGI/mkrelease.sh
+++ b/packaging/SGI/mkrelease.sh
@@ -19,14 +19,14 @@ if [ ! -f ../../source/Makefile ]; then
doclean="clean"
fi
-if [ "$1" = "clean" ]; then
+if [ "$1" = "clean" ] || [ "$1" = "cleanonly" ]; then
doclean=$1
shift
fi
export SGI_ABI ISA CC
-if [ "$doclean" = "clean" ]; then
+if [ "$doclean" = "clean" ] || [ "$doclean" = "cleanonly" ]; then
cd ../../source
if [ -f Makefile ]; then
make distclean
@@ -34,6 +34,7 @@ if [ "$doclean" = "clean" ]; then
rm -rf bin/*.profile bin/*.noquota
cd ../packaging/SGI
rm -rf bins catman html codepages swat samba.idb samba.spec
+ if [ "$doclean" = "cleanonly" ]; then exit 0 ; fi
fi
# create the catman versions of the manual pages
@@ -86,7 +87,7 @@ fi
mv bin/smbd bin/smbd.noquota
echo "===================== Making Regular versions ======================="
-make -P "CFLAGS=-O -g3 -woff 1188" all
+make -P "CFLAGS=-O -g3 -woff 1188" all libsmbclient
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat building sources\n";
diff --git a/packaging/SGI/samba.rc b/packaging/SGI/samba.rc
index 84d1d1bea58..2699825d952 100644
--- a/packaging/SGI/samba.rc
+++ b/packaging/SGI/samba.rc
@@ -4,8 +4,25 @@
# Samba server control
#
+stop_samba()
+{
+ if [ -r /usr/samba/var/locks/smbd.pid ]; then
+ smbd_group=`cat /usr/samba/var/locks/smbd.pid`
+ ps -p $smbd_group | grep smbd > /dev/null
+ if [ $? -eq 0 ]; then
+ /usr/bin/kill -15 -$smbd_group
+ fi
+ fi
+ if [ -r /usr/samba/var/locks/nmbd.pid ]; then
+ nmbd_group=`cat /usr/samba/var/locks/nmbd.pid`
+ ps -p $nmbd_group | grep nmbd > /dev/null
+ if [ $? -eq 0 ]; then
+ /usr/bin/kill -15 -$nmbd_group
+ fi
+ fi
+}
+
IS_ON=/etc/chkconfig
-KILLALL=/sbin/killall
SAMBAD=/usr/samba/bin/smbd
#SAMBA_OPTS=-d2
@@ -25,28 +42,28 @@ fi
case $1 in
'profile')
if $IS_ON samba && test -x $SAMBAD; then
- $KILLALL -15 smbd nmbd smbd.profile nmbd.profile
+ stop_samba;
$ECHO "Samba:\c"
- $SAMBAD.profile $SAMBA_OPTS -D; $ECHO " smbd.profile\c"
- $NMBD.profile $NMBD_OPTS -D; $ECHO " nmbd.profile\c"
+ $SAMBAD.profile $SAMBA_OPTS; $ECHO " smbd.profile\c"
+ $NMBD.profile $NMBD_OPTS; $ECHO " nmbd.profile\c"
$ECHO "."
fi
;;
'start')
if $IS_ON samba && test -x $SAMBAD; then
- $KILLALL -15 smbd nmbd smbd.profile nmbd.profile
+ stop_samba;
$ECHO "Samba:\c"
- $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c"
- $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c"
+ $SAMBAD $SAMBA_OPTS; $ECHO " smbd\c"
+ $NMBD $NMBD_OPTS; $ECHO " nmbd\c"
$ECHO "."
fi
;;
'stop')
$ECHO "Stopping Samba Servers."
- $KILLALL -15 smbd nmbd smbd.profile nmbd.profile
+ stop_samba;
exit 0
;;
*)
- echo "usage: /etc/init.d/samba {start|stop}"
+ echo "usage: /etc/init.d/samba {start|stop|profile}"
;;
esac
diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf
index 932b5a58af4..03f2a4c9f81 100644
--- a/packaging/SGI/smb.conf
+++ b/packaging/SGI/smb.conf
@@ -101,6 +101,9 @@
; winbind cache time = 10
; password server = *
+; Sample add user command for automatically adding machine accounts
+; add user script = /usr/sbin/passmgmt -a -h/dev/null -g20 -s/usr/bin/false %u
+
[homes]
comment = Home Directories
browseable = no
diff --git a/source/Makefile.in b/source/Makefile.in
index 067b223008f..7d5407f2753 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -15,6 +15,7 @@ CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
AWK=@AWK@
+DYNEXP=@DYNEXP@
TERMLDFLAGS=@TERMLDFLAGS@
TERMLIBS=@TERMLIBS@
@@ -63,6 +64,9 @@ SWATDIR = @swatdir@
# the directory where lock files go
LOCKDIR = @lockdir@
+# the directorty where pid files go
+PIDDIR = @piddir@
+
# libsmbclient support here
BLDSHARED = @BLDSHARED@
LIBSMBCLIENT_MAJOR=0
@@ -76,10 +80,10 @@ CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859
ISO8859-13 ISO8859-15
PASSWD_FLAGS = -DPASSWD_PROGRAM=\"$(PASSWD_PROGRAM)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DTDB_PASSWD_FILE=\"$(TDB_PASSWD_FILE)\"
-FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\"
+FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\"
FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\"
-FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\"
+FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DLIBDIR=\"$(LIBDIR)\"
FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS)
FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS)
@@ -87,14 +91,15 @@ FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS)
WINBIND_PROGS = @WINBIND_TARGETS@
WINBIND_SPROGS = @WINBIND_STARGETS@
WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
-WINBIND_LPROGS = @WINBIND_LTARGETS@
+WINBIND_LPROGS = nsswitch/@WINBIND_LTARGETS@
SPROGS = bin/smbd bin/nmbd bin/swat
-PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/make_printerdef @RUNPROG@
-PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@
+PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/tdbbackup bin/make_printerdef @RUNPROG@
+PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAPPROG@ @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@
MPROGS = @MPROGS@
LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup
+TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest bin/locktest2
SHLIBS = libsmbclient
SCRIPTS = $(srcdir)/script/smbtar
@@ -105,7 +110,8 @@ QUOTAOBJS=@QUOTAOBJS@
# object file lists
######################################################################
-TDB_OBJ = tdb/tdb.o tdb/spinlock.o tdb/tdbutil.o
+TDBBASE_OBJ = tdb/tdb.o tdb/spinlock.o
+TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o
LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \
lib/getsmbpass.o lib/interface.o lib/kanji.o lib/md4.o \
@@ -118,7 +124,7 @@ LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \
lib/util.o lib/util_sock.o lib/util_sec.o smbd/ssl.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 \
- nsswitch/wb_client.o nsswitch/wb_common.o $(TDB_OBJ)
+ lib/pam_errors.o nsswitch/wb_client.o nsswitch/wb_common.o $(TDB_OBJ)
READLINE_OBJ = lib/readline.o
@@ -134,7 +140,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
libsmb/namequery.o libsmb/nmblib.o libsmb/clistr.o \
libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o \
libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
- libsmb/clioplock.o libsmb/errormap.o \
+ libsmb/clioplock.o libsmb/errormap.o libsmb/doserr.o \
libsmb/passchange.o libsmb/unexpected.o $(RPC_PARSE_OBJ1)
LIBMSRPC_OBJ = libsmb/cli_lsarpc.o libsmb/cli_samr.o libsmb/cli_spoolss.o \
@@ -148,7 +154,7 @@ RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_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_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
+ rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o rpc_client/cli_spoolss_notify.o
# this includes only the low level parse code, not stuff
# that requires knowledge of security contexts
@@ -163,7 +169,6 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.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/cli_trust.o
LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
@@ -191,7 +196,8 @@ SMBD_OBJ1 = smbd/server.o smbd/files.o smbd/chgpasswd.o smbd/connection.o \
smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \
smbd/posix_acls.o lib/sysacls.o \
smbd/process.o smbd/service.o smbd/error.o \
- printing/printfsp.o lib/util_seaccess.o
+ printing/printfsp.o lib/util_seaccess.o \
+ libsmb/cli_pipe_util.o
PRINTING_OBJ = printing/pcap.o printing/print_svid.o \
printing/print_cups.o printing/print_generic.o \
@@ -264,7 +270,8 @@ 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
+ 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) \
@@ -363,7 +370,8 @@ PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
lib/util_unistr.o lib/signal.o lib/talloc.o lib/ms_fnmatch.o \
lib/util_sock.o lib/smbrun.o lib/util_sec.o lib/snprintf.o \
ubiqx/ubi_sLinkList.o libsmb/smbencrypt.o libsmb/smbdes.o \
- $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ)
+ smbd/ssl.o lib/access.o \
+ lib/interfaces.o $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ)
PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0:.o=.po)
LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po)
@@ -378,8 +386,9 @@ WINBINDD_OBJ1 = \
nsswitch/winbindd_pam.o \
nsswitch/winbindd_sid.o \
nsswitch/winbindd_misc.o \
- nsswitch/winbindd_wins.o \
- nsswitch/winbindd_cm.o
+ nsswitch/winbindd_cm.o \
+ nsswitch/winbindd_wins.o \
+ nsswitch/winbindd_rpc.o
NECESSARY_BECAUSE_SAMBA_DEPENDENCIES_ARE_SO_BROKEN_OBJ = \
smbd/password.o smbd/utmp.o smbd/session.o smbd/uid.o smbd/sec_ctx.o \
@@ -396,10 +405,15 @@ WINBINDD_OBJ = \
WBINFO_OBJ = nsswitch/wbinfo.o libsmb/smbencrypt.o libsmb/smbdes.o \
passdb/secrets.o
-WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o nsswitch/winbind_nss_solaris.o
+WINBIND_NSS_OBJ = nsswitch/winbind_nss.o nsswitch/wb_common.o @WINBIND_NSS_EXTRA_OBJS@
WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po)
+POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
+ popt/popthelp.o popt/poptparse.o
+
+TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ)
+
######################################################################
# now the rules...
######################################################################
@@ -411,7 +425,11 @@ everything : CHECK $(SPROGS) $(PROGS) $(SHLIBS) nsswitch smbwrapper smbtorture d
pam_smbpass : CHECK bin/pam_smbpass.@SHLIBEXT@
-smbwrapper : CHECK bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@
+smbwrapper : CHECK @WRAPPROG@ @WRAP@ @WRAP32@
+
+libsmbclient : CHECK libsmbclient.@SHLIBEXT@ libsmbclient.a
+
+torture : CHECK $(TORTURE_PROGS)
smbtorture : CHECK bin/smbtorture
@@ -487,7 +505,7 @@ bin/.dummy:
bin/smbd: $(SMBD_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
bin/nmbd: $(NMBD_OBJ) bin/.dummy
@echo Linking $@
@@ -495,11 +513,11 @@ bin/nmbd: $(NMBD_OBJ) bin/.dummy
bin/swat: $(SWAT_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
bin/rpcclient: $(RPCCLIENT_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS)
bin/smbclient: $(CLIENT_OBJ) bin/.dummy
@echo Linking $@
@@ -539,11 +557,11 @@ bin/smbcontrol: $(SMBCONTROL_OBJ) bin/.dummy
bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
bin/pdbedit: $(PDBEDIT_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy
@echo Linking $@
@@ -575,7 +593,7 @@ bin/msgtest: $(MSGTEST_OBJ) bin/.dummy
bin/smbcacls: $(SMBCACLS_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(LDFLAGS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
bin/locktest: $(LOCKTEST_OBJ) bin/.dummy
@echo Linking $@
@@ -591,7 +609,7 @@ bin/nsstest: $(NSSTEST_OBJ) bin/.dummy
bin/rpctorture: $(RPCTORTURE_OBJ) bin/.dummy
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(LDFLAGS) $(LIBS)
+ @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
bin/debug2html: $(DEBUG2HTML_OBJ) bin/.dummy
@echo Linking $@
@@ -606,50 +624,77 @@ 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)
- @echo Linking shared library $@
- @$(SHLD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS)
+bin/smbsh: $(SMBSH_OBJ) bin/.dummy
+ @echo Linking $@
+ @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)
+
+bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
+ $(MAKE) smbwrapper.@SHLIBEXT@
+
+smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
+ @echo Linking shared library bin/$@
+ @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS)
+
+bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
+ $(MAKE) smbwrapper.32.@SHLIBEXT@
-bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32)
- @echo Linking shared library $@
- @$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)
+smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
+ @echo Linking shared library bin/$@
+ @$(SHLD) -32 @LDSHFLAGS@ -o bin/$@ $(PICOBJS32) $(LIBS)
-libsmbclient: $(LIBSMBCLIENT_PICOBJS)
- @echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ \
- $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
+bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
+ $(MAKE) libsmbclient.@SHLIBEXT@
+
+libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
+ @echo Linking libsmbclient shared library bin/$@
+ @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
@SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR)
- @echo Linking libsmbclient non-shared library bin/$@.a
- @-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS)
-bin/smbsh: $(SMBSH_OBJ) bin/.dummy
- @echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)
+bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
+ @echo Linking libsmbclient non-shared library $@
+ @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS)
+
+bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
+ $(MAKE) pam_smbpass.@SHLIBEXT@
-bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ)
- @echo Linking shared library $@
- $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) -lpam $(LIBS) -lc
+pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
+ @echo Linking shared library bin/$@
+ $(SHLD) @LDSHFLAGS@ -symbolic -o bin/$@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) $(LIBS) -lc
nsswitch/libnss_wins.so: $(NSS_OBJ)
- @echo "Linking $@"
- @$(SHLD) @LDSHFLAGS@ -o $@ $(NSS_OBJ) -lc
+ $(MAKE) libnss_wins.so
+
+libnss_wins.so: $(NSS_OBJ)
+ @echo "Linking nsswitch/$@"
+ @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(NSS_OBJ) -lc
bin/winbindd: $(WINBINDD_OBJ) bin/.dummy
@echo Linking $@
- @$(LINK) -o $@ $(WINBINDD_OBJ) $(LIBS)
+ @$(LINK) -o $@ $(WINBINDD_OBJ) $(DYNEXP) $(LIBS)
-nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS)
- @echo "Linking $@"
- @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS)
+nsswitch/@WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
+ $(MAKE) @WINBIND_LTARGETS@
-nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy
- @echo Linking $@
- @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ)
+@WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
+ @echo "Linking nsswitch/$@"
+ @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@
+
+nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ)
+ $(MAKE) pam_winbind.so
+
+pam_winbind.so: $(PAM_WINBIND_OBJ)
+ @echo Linking nsswitch/$@
+ @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(PAM_WINBIND_OBJ)
-bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) $(UBIQX_OBJ) bin/.dummy
+bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
+ $(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy
@echo Linking $@
@$(LINK) -o $@ $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
- $(UBIQX_OBJ) $(LIBS)
+ $(UBIQX_OBJ) $(LIBS) @BUILD_POPT@
+
+bin/tdbbackup: $(TDBBACKUP_OBJ) bin/.dummy
+ @echo Linking $@
+ @$(CC) $(FLAGS) -o $@ $(TDBBACKUP_OBJ)
install: installbin installman installscripts installcp installswat
@@ -721,7 +766,7 @@ ctags:
realclean: clean
-rm -f config.log $(PROGS) $(SPROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) bin/.dummy
- -rm -f bin/debug2html bin/smbfilter bin/smbtorture
+ -rm -f bin/*
-rmdir bin
distclean: realclean
diff --git a/source/acconfig.h b/source/acconfig.h
index 78b652d950c..0b8c71038a9 100644
--- a/source/acconfig.h
+++ b/source/acconfig.h
@@ -122,7 +122,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
@@ -173,3 +176,32 @@
#undef HAVE_DEVICE_MAJOR_FN
#undef HAVE_DEVICE_MINOR_FN
#undef HAVE_MAKEDEV_FN
+#undef HAVE_GETGROUPS_TOO_MANY_EGIDS
+/*
+ * Add these definitions to allow VFS modules to
+ * see the CPPFLAGS defines.
+ */
+#ifndef _HPUX_SOURCE
+#undef _HPUX_SOURCE
+#endif
+#ifndef _POSIX_SOURCE
+#undef _POSIX_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#undef _LARGEFILE64_SOURCE
+#endif
+#ifndef _ALIGNMENT_REQUIRED
+#undef _ALIGNMENT_REQUIRED
+#endif
+#ifndef _MAX_ALIGNMENT
+#undef _MAX_ALIGNMENT
+#endif
+#ifndef _LARGE_FILES
+#undef _LARGE_FILES
+#endif
+#ifndef _FILE_OFFSET_BITS
+#undef _FILE_OFFSET_BITS
+#endif
+#ifndef _GNU_SOURCE
+#undef _GNU_SOURCE
+#endif
diff --git a/source/aclocal.m4 b/source/aclocal.m4
index 13788f99bea..036b1481128 100644
--- a/source/aclocal.m4
+++ b/source/aclocal.m4
@@ -87,7 +87,7 @@ EOF
dnl Add an #include
dnl AC_ADD_INCLUDE(VARIABLE)
-define(AC_ADD_INCLUDE,
+AC_DEFUN(AC_ADD_INCLUDE,
[cat >> confdefs.h <<\EOF
[#include] $1
EOF
diff --git a/source/bin/.cvsignore b/source/bin/.cvsignore
index 17457b33b82..50ddb07c561 100644
--- a/source/bin/.cvsignore
+++ b/source/bin/.cvsignore
@@ -1,9 +1,13 @@
.dummy
.libs
debug2html
+locktest
+locktest2
make_printerdef
make_smbcodepage
make_unicodemap
+masktest
+msgtest
nmbd
nmblookup
nsstest
@@ -24,6 +28,7 @@ smbstatus
smbtorture
smbumount
swat
+tdbbackup
testparm
testprns
wbinfo
diff --git a/source/client/client.c b/source/client/client.c
index fe339094c8e..745aec73970 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -42,7 +42,6 @@ static pstring workgroup;
static char *cmdstr;
static BOOL got_pass;
static int io_bufsize = 64512;
-extern struct in_addr ipzero;
static int name_type = 0x20;
static int max_protocol = PROTOCOL_NT1;
@@ -193,7 +192,7 @@ static void send_message(void)
* DOS before sending.
*/
- unix_to_dos(msg, True);
+ unix_to_dos(msg);
if (!cli_message_text(cli, msg, l, grp_id)) {
printf("SMBsendtxt failed (%s)\n",cli_errstr(cli));
@@ -2147,7 +2146,6 @@ struct cli_state *do_connect(char *server, char *share)
struct nmb_name called, calling;
char *server_n;
struct in_addr ip;
- extern struct in_addr ipzero;
fstring servicename;
char *sharename;
@@ -2164,13 +2162,13 @@ struct cli_state *do_connect(char *server, char *share)
server_n = server;
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, global_myname, 0x0);
make_nmb_name(&called , server, name_type);
again:
- ip = ipzero;
+ zero_ip(&ip);
if (have_ip) ip = dest_ip;
/* have to open a new connection */
@@ -2419,12 +2417,12 @@ static int do_message_op(void)
struct in_addr ip;
struct nmb_name called, calling;
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, global_myname, 0x0);
make_nmb_name(&called , desthost, name_type);
- ip = ipzero;
+ zero_ip(&ip);
if (have_ip) ip = dest_ip;
if (!(cli=cli_initialise(NULL)) || (cli_set_port(cli, port) == 0) || !cli_connect(cli, desthost, &ip)) {
@@ -2661,7 +2659,7 @@ static int do_message_op(void)
case 'I':
{
dest_ip = *interpret_addr2(optarg);
- if (zero_ip(dest_ip))
+ if (is_zero_ip(dest_ip))
exit(1);
have_ip = True;
}
diff --git a/source/client/clitar.c b/source/client/clitar.c
index 2beb669de90..50a46c70007 100644
--- a/source/client/clitar.c
+++ b/source/client/clitar.c
@@ -1718,7 +1718,7 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind)
SMB_STRUCT_STAT stbuf;
extern time_t newer_than;
- if (sys_stat(dos_to_unix(argv[Optind],False), &stbuf) == 0) {
+ if (sys_stat(dos_to_unix_static(argv[Optind]), &stbuf) == 0) {
newer_than = stbuf.st_mtime;
DEBUG(1,("Getting files newer than %s",
asctime(LocalTime(&newer_than))));
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index 2c941836e39..40e21e1eb1d 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -27,8 +27,6 @@
#include <asm/types.h>
#include <linux/smb_fs.h>
-extern struct in_addr ipzero;
-
extern BOOL in_client;
extern pstring user_socket_options;
extern BOOL append_log;
@@ -120,7 +118,6 @@ static struct cli_state *do_connection(char *svc_name)
struct nmb_name called, calling;
char *server_n;
struct in_addr ip;
- extern struct in_addr ipzero;
pstring server;
char *share;
@@ -144,7 +141,7 @@ static struct cli_state *do_connection(char *svc_name)
make_nmb_name(&called , server, 0x20);
again:
- ip = ipzero;
+ zero_ip(&ip);
if (have_ip) ip = dest_ip;
/* have to open a new connection */
@@ -453,22 +450,22 @@ static void init_mount(void)
if (mount_uid) {
slprintf(tmp, sizeof(tmp)-1, "%d", mount_uid);
args[i++] = "-u";
- args[i++] = xstrdup(tmp);
+ args[i++] = smb_xstrdup(tmp);
}
if (mount_gid) {
slprintf(tmp, sizeof(tmp)-1, "%d", mount_gid);
args[i++] = "-g";
- args[i++] = xstrdup(tmp);
+ args[i++] = smb_xstrdup(tmp);
}
if (mount_fmask) {
slprintf(tmp, sizeof(tmp)-1, "0%o", mount_fmask);
args[i++] = "-f";
- args[i++] = xstrdup(tmp);
+ args[i++] = smb_xstrdup(tmp);
}
if (mount_dmask) {
slprintf(tmp, sizeof(tmp)-1, "0%o", mount_dmask);
args[i++] = "-d";
- args[i++] = xstrdup(tmp);
+ args[i++] = smb_xstrdup(tmp);
}
if (options) {
args[i++] = "-o";
@@ -748,7 +745,7 @@ static void parse_mount_smb(int argc, char **argv)
DEBUGLEVEL = val;
} else if(!strcmp(opts, "ip")) {
dest_ip = *interpret_addr2(opteq+1);
- if (zero_ip(dest_ip)) {
+ if (is_zero_ip(dest_ip)) {
fprintf(stderr,"Can't resolve address %s\n", opteq+1);
exit(1);
}
diff --git a/source/client/smbspool.c b/source/client/smbspool.c
index 1a17b15b896..64484f0aa99 100644
--- a/source/client/smbspool.c
+++ b/source/client/smbspool.c
@@ -29,7 +29,6 @@
*/
extern BOOL in_client; /* Boolean for client library */
-extern struct in_addr ipzero; /* Any address */
/*
@@ -290,7 +289,7 @@ smb_connect(char *workgroup, /* I - Workgroup */
get_myname(myname);
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, myname, 0x0);
make_nmb_name(&called, server, 0x20);
diff --git a/source/configure b/source/configure
index ec2b28c18e9..d424e1b88ea 100755
--- a/source/configure
+++ b/source/configure
@@ -1,95 +1,156 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by Autoconf 2.52.
#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-# Defaults:
-ac_help=
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
+cross_compiling=no
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+ac_unique_file="include/includes.h"
ac_default_prefix=/usr/local/samba
-ac_help="$ac_help
- --with-fhs Use FHS-compliant paths (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-configdir=DIR Where to put configuration files (\$libdir)"
-ac_help="$ac_help
- --with-codepagedir=DIR Where to put codepage files (\$libdir/codepages)"
-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
- --with-readline[=DIR] Look for readline include/libs in DIR (default=auto)"
-ac_help="$ac_help
- --with-smbwrapper Include SMB wrapper support (default=no)"
-ac_help="$ac_help
- --with-afs Include AFS support (default=no)"
-ac_help="$ac_help
- --with-dce-dfs Include DCE/DFS support (default=no)"
-ac_help="$ac_help
- --with-krb4=base-dir Include Kerberos IV support (default=no)"
-ac_help="$ac_help
- --with-krb5=base-dir Include Kerberos 5 support (default=no)"
-ac_help="$ac_help
- --with-automount Include AUTOMOUNT support (default=no)"
-ac_help="$ac_help
- --with-smbmount Include SMBMOUNT (Linux only) support (default=no)"
-ac_help="$ac_help
- --with-pam Include PAM password database support (default=no)"
-ac_help="$ac_help
- --with-pam_smbpass Include the smbpass PAM module (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
- --with-profiling-data Include gathering source code profile information (default=no)"
-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-msdfs Include MS Dfs support (default=no)"
-ac_help="$ac_help
- --with-vfs Include Samba vfs support (default=no)"
-ac_help="$ac_help
- --with-libsmbclient Build the libsmbclient shared library (default=no)"
-ac_help="$ac_help
- --with-spinlocks Use spin locks instead of fcntl locks (default=no)"
-ac_help="$ac_help
- --with-acl-support Include ACL support (default=no)"
-ac_help="$ac_help
- --with-winbind Build winbind (default, if supported by OS)"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -98,10 +159,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -115,17 +181,16 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -133,59 +198,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -194,95 +259,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -291,12 +308,12 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
@@ -317,26 +334,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -353,7 +370,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -363,7 +380,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -374,58 +391,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -436,98 +452,98 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: should be removed in autoconf 3.0.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=include/includes.h
+test "$silent" = yes && exec 6>/dev/null
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
@@ -538,13 +554,344 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<EOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+EOF
+
+ cat <<EOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+EOF
+
+ cat <<\EOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+EOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\EOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-debug Turn on compiler debugging information (default=no)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-fhs Use FHS-compliant paths (default=no)
+ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)
+ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)
+ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)
+ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)
+ --with-configdir=DIR Where to put configuration files (\$libdir)
+ --with-codepagedir=DIR Where to put codepage files (\$libdir/codepages)
+ --with-logfilebase=DIR Where to put log files (\$(VARDIR))
+ --with-readline=DIR Look for readline include/libs in DIR (default=auto)
+ --with-smbwrapper Include SMB wrapper support (default=no)
+ --with-afs Include AFS support (default=no)
+ --with-dce-dfs Include DCE/DFS support (default=no)
+ --with-krb4=base-dir Include Kerberos IV support (default=no)
+ --with-krb5=base-dir Include Kerberos 5 support (default=no)
+ --with-automount Include AUTOMOUNT support (default=no)
+ --with-smbmount Include SMBMOUNT (Linux only) support (default=no)
+ --with-pam Include PAM password database support (default=no)
+ --with-pam_smbpass Include the smbpass PAM module (default=no)
+ --with-tdbsam Include experimental TDB SAM support (default=no)
+ --with-ldapsam Include experimental LDAP SAM support (default=no)
+ --with-nisplussam Include NISPLUS SAM support (default=no)
+ --with-nisplus-home Include NISPLUS_HOME support (default=no)
+ --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)
+ --with-syslog Include experimental SYSLOG support (default=no)
+ --with-profiling-data Include gathering source code profile information (default=no)
+ --with-quotas Include experimental disk-quota support (default=no)
+ --with-utmp Include experimental utmp accounting (default=no)
+ --with-msdfs Include MS Dfs support (default=no)
+ --with-libsmbclient Build the libsmbclient shared library (default=no)
+ --with-spinlocks Use spin locks instead of fcntl locks (default=no)
+ --with-acl-support Include ACL support (default=no)
+ --with-winbind Build winbind (default, if supported by OS)
+ --with-included-popt use bundled popt library, not from system
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+EOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+ cd $ac_subdir
+ # A "../" for each directory in /$ac_subdir.
+ ac_dots=`echo $ac_subdir |
+ sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+ case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_subdir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_sub_srcdir/configure; then
+ echo
+ $SHELL $ac_sub_srcdir/configure --help=recursive
+ elif test -f $ac_sub_srcdir/configure.ac ||
+ test -f $ac_sub_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\EOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+EOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.52. Invocation command line was
+
+ $ $0 $@
+
+EOF
+{
+cat <<_ASUNAME
+## ---------- ##
+## Platform. ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+} >&5
+
+cat >&5 <<EOF
+## ------------ ##
+## Core tests. ##
+## ------------ ##
+
+EOF
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ echo >&5
+ echo "## ----------------- ##" >&5
+ echo "## Cache variables. ##" >&5
+ echo "## ----------------- ##" >&5
+ echo >&5
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} >&5
+ sed "/^$/d" confdefs.h >conftest.log
+ if test -s conftest.log; then
+ echo >&5
+ echo "## ------------ ##" >&5
+ echo "## confdefs.h. ##" >&5
+ echo "## ------------ ##" >&5
+ echo >&5
+ cat conftest.log >&5
+ fi
+ (echo; echo) >&5
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal" >&5
+ echo "$as_me: exit $exit_status" >&5
+ rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -555,70 +902,138 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:905: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ cat "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:916: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:924: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:940: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:944: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:950: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:952: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:954: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status. It doesn't matter if
+ # we pass some twice (in addition to the command line arguments).
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+ ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:973: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:975: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+echo "#! $SHELL" >conftest.sh
+echo "exit 0" >>conftest.sh
+chmod +x conftest.sh
+if { (echo "$as_me:995: PATH=\".;.\"; conftest.sh") >&5
+ (PATH=".;."; conftest.sh) 2>&5
+ ac_status=$?
+ echo "$as_me:998: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ ac_path_separator=';'
else
- ac_n= ac_c='\c' ac_t=
+ ac_path_separator=:
fi
+PATH_SEPARATOR="$ac_path_separator"
+rm -f conftest.sh
-
-
+ac_config_headers="$ac_config_headers include/config.h"
#################################################
# 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"
codepagedir="\$(DATADIR)/samba/codepages"
configdir="${sysconfdir}/samba"
lockdir="\${VARDIR}/cache/samba"
+ piddir="\$(VARDIR)/run/samba"
logfilebase="\${VARDIR}/log/samba"
privatedir="\${CONFIGDIR}/private"
swatdir="\${DATADIR}/samba/swat"
else
codepagedir="\$(LIBDIR)/codepages"
configdir="\$(LIBDIR)"
- lockdir="\$(VARDIR)/locks"
logfilebase="\$(VARDIR)"
+ lockdir="\${VARDIR}/locks"
+ piddir="\$(VARDIR)/locks"
privatedir="\${prefix}/private"
swatdir="\${prefix}/swat"
-fi
-
+fi;
#################################################
# set private directory location
+
# Check whether --with-privatedir or --without-privatedir was given.
if test "${with_privatedir+set}" = set; then
withval="$with_privatedir"
@@ -627,17 +1042,18 @@ if test "${with_privatedir+set}" = set; then
#
# Just in case anybody calls it without argument
#
- echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
+ { echo "$as_me:1045: WARNING: --with-privatedir called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
;;
* )
privatedir="$withval"
;;
esac
-fi
-
+fi;
#################################################
# set lock directory location
+
# Check whether --with-lockdir or --without-lockdir was given.
if test "${with_lockdir+set}" = set; then
withval="$with_lockdir"
@@ -646,17 +1062,38 @@ if test "${with_lockdir+set}" = set; then
#
# Just in case anybody calls it without argument
#
- echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
+ { echo "$as_me:1065: WARNING: --with-lockdir called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;}
;;
* )
lockdir="$withval"
;;
esac
-fi
+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 "$as_me:1085: WARNING: --with-piddir called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&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"
@@ -665,17 +1102,18 @@ if test "${with_swatdir+set}" = set; then
#
# Just in case anybody does it
#
- echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
+ { echo "$as_me:1105: WARNING: --with-swatdir called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;}
;;
* )
swatdir="$withval"
;;
esac
-fi
-
+fi;
#################################################
# set configuration directory location
+
# Check whether --with-configdir or --without-configdir was given.
if test "${with_configdir+set}" = set; then
withval="$with_configdir"
@@ -684,17 +1122,18 @@ if test "${with_configdir+set}" = set; then
#
# Just in case anybody does it
#
- echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
+ { echo "$as_me:1125: WARNING: --with-configdir called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;}
;;
* )
configdir="$withval"
;;
esac
-fi
-
+fi;
#################################################
# set codepage directory location
+
# Check whether --with-codepagedir or --without-codepagedir was given.
if test "${with_codepagedir+set}" = set; then
withval="$with_codepagedir"
@@ -703,17 +1142,18 @@ if test "${with_codepagedir+set}" = set; then
#
# Just in case anybody does it
#
- echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
+ { echo "$as_me:1145: WARNING: --with-codepagedir called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-codepagedir called without argument - will use default" >&2;}
;;
* )
codepagedir="$withval"
;;
esac
-fi
-
+fi;
#################################################
# set log directory location
+
# Check whether --with-logfilebase or --without-logfilebase was given.
if test "${with_logfilebase+set}" = set; then
withval="$with_logfilebase"
@@ -722,41 +1162,14 @@ if test "${with_logfilebase+set}" = set; then
#
# Just in case anybody does it
#
- echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
+ { echo "$as_me:1165: WARNING: --with-logfilebase called without argument - will use default" >&5
+echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;}
;;
* )
logfilebase="$withval"
;;
esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+fi;
# compile with optimization and without debugging by default
CFLAGS="-O ${CFLAGS}"
@@ -767,219 +1180,580 @@ if test "${enable_debug+set}" = set; then
if eval "test x$enable_debug = xyes"; then
CFLAGS="${CFLAGS} -g"
fi
+fi;
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:1193: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}gcc"
+echo "$as_me:1208: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1216: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1219: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:1228: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="gcc"
+echo "$as_me:1243: found $ac_dir/$ac_word" >&5
+break
+done
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1251: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1254: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+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:779: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:1267: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- 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_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}cc"
+echo "$as_me:1282: found $ac_dir/$ac_word" >&5
+break
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:1290: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1293: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:1302: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="cc"
+echo "$as_me:1317: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1325: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1328: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
else
- echo "$ac_t""no" 1>&6
+ CC="$ac_cv_prog_CC"
fi
+fi
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:809: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:1341: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+fi
+ac_cv_prog_CC="cc"
+echo "$as_me:1361: found $ac_dir/$ac_word" >&5
+break
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
+ set dummy "$ac_dir/$ac_word" ${1+"$@"}
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:1383: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:1386: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # 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:860: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:1397: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- 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_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+echo "$as_me:1412: found $ac_dir/$ac_word" >&5
+break
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:1420: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+ echo "$as_me:1423: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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 "$as_me:1436: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="$ac_prog"
+echo "$as_me:1451: found $ac_dir/$ac_word" >&5
+break
+done
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1459: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1462: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-cat > conftest.$ac_ext << EOF
+ test -n "$ac_ct_CC" && break
+done
-#line 903 "configure"
+ CC=$ac_ct_CC
+fi
+
+fi
+
+test -z "$CC" && { { echo "$as_me:1474: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:1479:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:1482: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1485: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1487: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1490: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1492: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1495: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 1499 "configure"
#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:908: \"$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
- ac_cv_prog_cc_cross=no
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:1515: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:1518: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:1521: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ a.out ) # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1544: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:1550: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1555: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:1561: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1564: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:1571: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
+fi
+echo "$as_me:1579: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1586: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:1588: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:1591: checking for executable suffix" >&5
+echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+if { (eval echo "$as_me:1593: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:1596: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ { { echo "$as_me:1612: error: cannot compute EXEEXT: cannot compile and link" >&5
+echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-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:934: 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
+rm -f conftest$ac_cv_exeext
+echo "$as_me:1618: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:939: 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
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:1624: checking for object suffix" >&5
+echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:948: \"$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
-fi
-fi
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1630 "configure"
+#include "confdefs.h"
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+int
+main ()
+{
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:1642: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1645: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
else
- GCC=
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1657: error: cannot compute OBJEXT: cannot compile" >&5
+echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
fi
-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:967: 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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:1664: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:1668: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1674 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1689: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1692: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1695: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1698: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:1710: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:1716: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1722 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1734: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1737: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1740: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1743: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
- ac_cv_prog_cc_g=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+echo "$as_me:1753: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
@@ -993,6 +1767,116 @@ else
CFLAGS=
fi
fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1783: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1786: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1789: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1801 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1814: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1817: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1820: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1823: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1833 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1845: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1848: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1851: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1854: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -1004,14 +1888,20 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { { echo "$as_me:1898: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -1020,31 +1910,39 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# 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:1029: checking for a BSD compatible install" >&5
+echo "$as_me:1918: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
for ac_dir in $PATH; do
+ IFS=$ac_save_IFS
# Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ case $ac_dir/ in
+ / | ./ | .// | /cC/* \
+ | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
+ | /usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ if $as_executable_p "$ac_dir/$ac_prog"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
@@ -1054,91 +1952,125 @@ else
;;
esac
done
- IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:1967: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
for ac_prog in mawk gawk nawk awk
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:1086: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:1982: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
- 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_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:1997: found $ac_dir/$ac_word" >&5
+break
+done
+
fi
fi
-AWK="$ac_cv_prog_AWK"
+AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
+ echo "$as_me:2005: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:2008: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$AWK" && break
+ test -n "$AWK" && break
done
-
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:1118: checking whether $CC and cc understand -c and -o together" >&5
+ echo "$as_me:2016: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
else
- echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1121: checking whether cc understands -c and -o together" >&5
+ echo "$as_me:2019: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
fi
-set dummy $CC; ac_cc="`echo $2 |
- sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
-if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+set dummy $CC; ac_cc=`echo $2 |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'foo(){}' > conftest.c
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2028 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
# Make sure it works both with $CC and with simple cc.
# 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:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:2043: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2046: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:2048: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2051: \$? = $ac_status" >&5
+ (exit $ac_status); };
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:1139: \"$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:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { (eval echo "$as_me:2058: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2061: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+ if { (eval echo "$as_me:2064: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2067: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:2069: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2072: \$? = $ac_status" >&5
+ (exit $ac_status); };
then
# cc works too.
:
@@ -1155,10 +2087,13 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:2090: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:2093: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\EOF
#define NO_MINUS_C_MINUS_O 1
EOF
@@ -1170,133 +2105,133 @@ else
BROKEN_CC=#
fi
-
-echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
-echo "configure:1176: 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
+echo "$as_me:2108: checking that the C compiler understands volatile" >&5
+echo $ECHO_N "checking that the C compiler understands volatile... $ECHO_C" >&6
+if test "${samba_cv_volatile+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 1182 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 2115 "configure"
#include "confdefs.h"
#include <sys/types.h>
-int main() {
+int
+main ()
+{
volatile int i = 0
-; return 0; }
-EOF
-if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2127: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2130: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:2133: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2136: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_volatile=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_volatile=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_volatile=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_volatile" 1>&6
+echo "$as_me:2146: result: $samba_cv_volatile" >&5
+echo "${ECHO_T}$samba_cv_volatile" >&6
if test x"$samba_cv_volatile" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_VOLATILE 1
EOF
fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:2157: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:2161: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:2170: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:2174: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:2179: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+echo "$as_me:2186: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:2195: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:2200: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+echo "$as_me:2207: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:2216: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:2221: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-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:1239: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:1260: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-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:1278: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
+test -n "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
case "$host_os" in
*irix6*) cat >> confdefs.h <<\EOF
#include <standards.h>
@@ -1305,25 +2240,28 @@ EOF
;;
esac
-
-
- echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
-echo "configure:1312: checking config.cache system type" >&5
+ echo "$as_me:2243: checking config.cache system type" >&5
+echo $ECHO_N "checking config.cache system type... $ECHO_C" >&6
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" &&
test x"$ac_cv_build_system_type" != x"$build"; } ||
{ test x"${ac_cv_target_system_type+set}" = x"set" &&
test x"$ac_cv_target_system_type" != x"$target"; }; then
- echo "$ac_t""different" 1>&6
- { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
+ echo "$as_me:2251: result: different" >&5
+echo "${ECHO_T}different" >&6
+ { { echo "$as_me:2253: error: \"you must remove config.cache and restart configure\"" >&5
+echo "$as_me: error: \"you must remove config.cache and restart configure\"" >&2;}
+ { (exit 1); exit 1; }; }
else
- echo "$ac_t""same" 1>&6
+ echo "$as_me:2257: result: same" >&5
+echo "${ECHO_T}same" >&6
fi
ac_cv_host_system_type="$host"
ac_cv_build_system_type="$build"
ac_cv_target_system_type="$target"
+DYNEXP=
#
# Config CPPFLAG settings for strange OS's that must be set
@@ -1332,10 +2270,10 @@ echo "configure:1312: checking config.cache system type" >&5
case "$host_os" in
# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
*hpux*)
- echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
-echo "configure:1337: 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
+ echo "$as_me:2273: checking whether ${CC-cc} accepts -Ae" >&5
+echo $ECHO_N "checking whether ${CC-cc} accepts -Ae... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_Ae+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
@@ -1346,10 +2284,10 @@ fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
+echo "$as_me:2287: result: $ac_cv_prog_cc_Ae" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_Ae" >&6
# mmap on HPUX is completely broken...
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define MMAP_BLACKLIST 1
EOF
@@ -1364,26 +2302,63 @@ EOF
case `uname -r` in
*9*|*10*)
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define USE_BOTH_CRYPT_CALLS 1
EOF
+ cat >>confdefs.h <<\EOF
+#define _HPUX_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _ALIGNMENT_REQUIRED 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _MAX_ALIGNMENT 4
+EOF
+
;;
*11*)
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
+#define _HPUX_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _ALIGNMENT_REQUIRED 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _MAX_ALIGNMENT 4
+EOF
+
+ cat >>confdefs.h <<\EOF
#define USE_BOTH_CRYPT_CALLS 1
EOF
;;
esac
+ DYNEXP="-Wl,-E"
;;
-
#
# CRAY Unicos has broken const handling
*unicos*)
- echo "$ac_t""disabling const" 1>&6
+ echo "$as_me:2360: result: disabling const" >&5
+echo "${ECHO_T}disabling const" >&6
CPPFLAGS="$CPPFLAGS -Dconst="
;;
@@ -1392,9 +2367,14 @@ EOF
# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
#
*aix4*)
- echo "$ac_t""enabling large file support" 1>&6
+ echo "$as_me:2370: result: enabling large file support" >&5
+echo "${ECHO_T}enabling large file support" >&6
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
- ;;
+ cat >>confdefs.h <<\EOF
+#define _LARGE_FILES 1
+EOF
+
+ ;;
#
# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
# to the existance of large files..
@@ -1406,24 +2386,47 @@ EOF
*solaris*)
case `uname -r` in
5.0*|5.1*|5.2*|5.3*|5.5*)
- echo "$ac_t""no large file support" 1>&6
+ echo "$as_me:2389: result: no large file support" >&5
+echo "${ECHO_T}no large file support" >&6
;;
5.*)
- echo "$ac_t""enabling large file support" 1>&6
- if test "$ac_cv_prog_gcc" = yes; then
+ echo "$as_me:2393: result: enabling large file support" >&5
+echo "${ECHO_T}enabling large file support" >&6
+ if test "$ac_cv_c_compiler_gnu" = yes; then
${CC-cc} -v >conftest.c 2>&1
ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
rm -fr conftest.c
case "$ac_cv_gcc_compiler_version_number" in
*"gcc version 2.6"*|*"gcc version 2.7"*)
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
;;
*)
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _FILE_OFFSET_BITS 64
+EOF
+
;;
esac
else
+ DYNEXP="-dc -dp"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _FILE_OFFSET_BITS 64
+EOF
+
fi
;;
esac
@@ -1433,15 +2436,15 @@ EOF
#
*sysv4*)
if test $host = mips-sni-sysv4 ; then
- echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1438: checking for LFS support" >&5
+ echo "$as_me:2439: checking for LFS support" >&5
+echo $ECHO_N "checking for LFS support... $ECHO_C" >&6
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
SINIX_LFS_SUPPORT=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 1445 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2447 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -1452,42 +2455,55 @@ exit(0);
exit(1);
#endif
}
-EOF
-if { (eval echo configure:1457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:2460: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2463: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:2465: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2468: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
SINIX_LFS_SUPPORT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- SINIX_LFS_SUPPORT=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+SINIX_LFS_SUPPORT=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
CPPFLAGS="$old_CPPFLAGS"
if test x$SINIX_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
LIBS="`getconf LFS64_LIBS` $LIBS"
fi
- echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
+ echo "$as_me:2490: result: $SINIX_LFS_SUPPORT" >&5
+echo "${ECHO_T}$SINIX_LFS_SUPPORT" >&6
fi
;;
# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
#
*linux*)
- echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1484: checking for LFS support" >&5
+ echo "$as_me:2498: checking for LFS support" >&5
+echo $ECHO_N "checking for LFS support... $ECHO_C" >&6
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
LINUX_LFS_SUPPORT=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 1491 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2506 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -1524,36 +2540,57 @@ main() {
#endif
}
-EOF
-if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:2545: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2548: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:2550: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2553: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
LINUX_LFS_SUPPORT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- LINUX_LFS_SUPPORT=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LINUX_LFS_SUPPORT=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
CPPFLAGS="$old_CPPFLAGS"
if test x$LINUX_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _FILE_OFFSET_BITS 64
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+
fi
- echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
+ echo "$as_me:2580: result: $LINUX_LFS_SUPPORT" >&5
+echo "${ECHO_T}$LINUX_LFS_SUPPORT" >&6
;;
*hurd*)
- echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1550: checking for LFS support" >&5
+ echo "$as_me:2585: checking for LFS support" >&5
+echo $ECHO_N "checking for LFS support... $ECHO_C" >&6
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
GLIBC_LFS_SUPPORT=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 1557 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2593 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -1564,188 +2601,439 @@ exit(0);
exit(1);
#endif
}
-EOF
-if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:2606: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2609: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:2611: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2614: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
GLIBC_LFS_SUPPORT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- GLIBC_LFS_SUPPORT=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+GLIBC_LFS_SUPPORT=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
CPPFLAGS="$old_CPPFLAGS"
if test x$GLIBC_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ cat >>confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+
fi
- echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
+ echo "$as_me:2637: result: $GLIBC_LFS_SUPPORT" >&5
+echo "${ECHO_T}$GLIBC_LFS_SUPPORT" >&6
;;
esac
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1591: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:2643: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 2651 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2700: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2703: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:2706: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2709: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:2726: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:2729: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+echo "$as_me:2734: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 1598 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2742 "configure"
#include "confdefs.h"
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
+#endif
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2754: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:2757: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2760: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+echo "$as_me:2771: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
+ no)
+cat >>confdefs.h <<\EOF
+#define inline
EOF
;;
- *) cat >> confdefs.h <<EOF
+ *) cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
;;
esac
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1631: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:2791: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1646 "configure"
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2812 "configure"
#include "confdefs.h"
#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1652: \"$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
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:2817: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2823: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1663 "configure"
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2846 "configure"
#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1669: \"$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
- :
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2850: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2856: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1680 "configure"
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:2893: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2903 "configure"
#include "confdefs.h"
#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1686: \"$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
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:2908: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2914: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
+ # Broken: fails on valid input.
+continue
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2937 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2941: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2947: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
- CPP="$ac_cv_prog_CPP"
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- ac_cv_prog_CPP="$CPP"
+ { { echo "$as_me:2975: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$CPP" 1>&6
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1711: 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
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:2986: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1716 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2992 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1724: \"$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*
+
+_ACEOF
+if { (eval echo "$as_me:3000: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3006: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
ac_cv_header_stdc=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1741 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3028 "configure"
#include "confdefs.h"
#include <string.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -1754,16 +3042,16 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1759 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3046 "configure"
#include "confdefs.h"
#include <stdlib.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -1772,1216 +3060,2153 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 1780 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3067 "configure"
#include "confdefs.h"
#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-EOF
-if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3093: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3096: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3098: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3101: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_stdc=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:3114: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
fi
ac_header_dirent=no
-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:1819: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1824 "configure"
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:3127: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3133 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3148: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3151: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3154: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3157: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3167: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
+
+ac_header_dirent=$ac_hdr; break
fi
+
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:1857: 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
+ echo "$as_me:3180: checking for opendir in -ldir" >&5
+echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
+if test "${ac_cv_lib_dir_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3188 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3207: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3210: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3213: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3216: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dir_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dir_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:3227: result: $ac_cv_lib_dir_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
+if test $ac_cv_lib_dir_opendir = yes; then
LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
fi
else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1898: 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
+ echo "$as_me:3234: checking for opendir in -lx" >&5
+echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
+if test "${ac_cv_lib_x_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1906 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3242 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3261: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3264: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3267: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3270: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_x_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_x_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:3281: result: $ac_cv_lib_x_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
+if test $ac_cv_lib_x_opendir = yes; then
LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
fi
fi
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1940: 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
+echo "$as_me:3289: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1945 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3295 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3311: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3314: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3317: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3320: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_time=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_time=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
+echo "$as_me:3330: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF
fi
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1975: 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
+echo "$as_me:3340: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1980 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3346 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3368: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3371: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3374: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3377: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_sys_wait_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_sys_wait_h=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+echo "$as_me:3387: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_SYS_WAIT_H 1
EOF
fi
-for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
+for ac_header in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2020: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2025 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3400: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3406 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2030: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3410: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3416: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3435: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
+for ac_header 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:2060: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3448: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3454 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2070: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3458: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3464: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3483: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
+for ac_header 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:2100: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2105 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3496: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3502 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2110: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3506: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3512: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3531: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
+for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2140: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3544: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3550 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2150: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3554: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3560: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3579: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
+for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2180: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2185 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3592: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3598 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2190: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3602: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3608: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3627: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
+for ac_header in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2220: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2225 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3640: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3646 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2230: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3650: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3656: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3675: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
+for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2260: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2265 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3688: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3694 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2270: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3698: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3704: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3723: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in security/pam_modules.h security/_pam_macros.h synch.h pthread.h nsswitch.h
+for ac_header in security/pam_modules.h security/_pam_macros.h dlfcn.h synch.h pthread.h nsswitch.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2300: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3736: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3742 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2310: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3746: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3752: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3771: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-
#
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
# This causes configure to fail to detect it. Check for shadow separately on HPUX.
#
case "$host_os" in
*hpux*)
- cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3788 "configure"
#include "confdefs.h"
#include <shadow.h>
-int main() {
+int
+main ()
+{
struct spwd testme
-; return 0; }
-EOF
-if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3800: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3803: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3806: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3809: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_shadow_h=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_shadow_h=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_shadow_h=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x"$ac_cv_header_shadow_h" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SHADOW_H 1
EOF
fi
;;
esac
-for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
+
+for ac_header in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2373: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2378 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3830: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3836 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2383: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3840: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3846: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3865: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
+for ac_header in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2413: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2418 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3878: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3884 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2423: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3888: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3894: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3913: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in stropts.h poll.h
+for ac_header 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:2453: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2458 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3926: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3932 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2463: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3936: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3942: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:3961: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in sys/capability.h syscall.h sys/syscall.h
+for ac_header 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:2493: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2498 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3974: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3980 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2503: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3984: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3990: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:4009: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-for ac_hdr in sys/acl.h sys/cdefs.h glob.h
+for ac_header 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:2533: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2538 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:4022: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4028 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2543: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:4032: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:4038: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:4057: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-
# For experimental utmp support (lastlog on some BSD-like systems)
-for ac_hdr in utmp.h utmpx.h lastlog.h
+
+for ac_header 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:2575: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:4072: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4078 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2585: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:4082: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:4088: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:4107: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-
# For quotas on Veritas VxFS filesystems
-for ac_hdr in sys/fs/vx_quota.h
+
+for ac_header 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:2617: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2622 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:4122: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4128 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2627: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:4132: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:4138: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:4157: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-
# For quotas on Linux XFS filesystems
-for ac_hdr in linux/xqm.h
+
+for ac_header 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:2659: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2664 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:4172: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4178 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2669: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:4182: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:4188: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:4207: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:4223: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4229 "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4235: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4238: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4241: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4244: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:4254: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
-echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2697: checking size of int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+done
+
+echo "$as_me:4264: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6
+if test "${ac_cv_type_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4270 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+if ((int *) 0)
+ return 0;
+if (sizeof (int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4285: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4288: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4291: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4294: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_int=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:4304: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6
+
+echo "$as_me:4307: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_int" = yes; then
if test "$cross_compiling" = yes; then
- ac_cv_sizeof_int=cross
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line 4316 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4328: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4331: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4334: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4337: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4342 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4354: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4357: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4360: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4363: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
else
- cat > conftest.$ac_ext <<EOF
-#line 2705 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4379 "configure"
#include "confdefs.h"
-#include <stdio.h>
-main()
+$ac_includes_default
+int
+main ()
{
- FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(int));
- exit(0);
+int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
+ ;
+ return 0;
}
-EOF
-if { (eval echo configure:2716: \"$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`
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4391: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4394: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4397: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4400: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4416 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4428: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4431: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4434: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4437: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+ac_cv_sizeof_int=$ac_lo
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_sizeof_int=0
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:4450: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4455 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+FILE *f = fopen ("conftest.val", "w");
+if (!f)
+ exit (1);
+fprintf (f, "%d", (sizeof (int)));
+fclose (f);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4471: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4474: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4476: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4479: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-echo "$ac_t""$ac_cv_sizeof_int" 1>&6
-cat >> confdefs.h <<EOF
+rm -f conftest.val
+else
+ ac_cv_sizeof_int=0
+fi
+fi
+echo "$as_me:4495: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6
+cat >>confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF
-
-echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2736: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:4501: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4507 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4522: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4525: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4528: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4531: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_long=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:4541: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:4544: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
if test "$cross_compiling" = yes; then
- ac_cv_sizeof_long=cross
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line 4553 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4565: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4568: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4571: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4574: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4579 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4591: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4594: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4597: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4600: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
else
- cat > conftest.$ac_ext <<EOF
-#line 2744 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4616 "configure"
#include "confdefs.h"
-#include <stdio.h>
-main()
+$ac_includes_default
+int
+main ()
{
- FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(long));
- exit(0);
+int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
+ ;
+ return 0;
}
-EOF
-if { (eval echo configure:2755: \"$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`
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4628: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4631: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4634: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4637: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4653 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4665: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4668: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4671: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4674: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+ac_cv_sizeof_long=$ac_lo
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_sizeof_long=0
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:4687: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4692 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+FILE *f = fopen ("conftest.val", "w");
+if (!f)
+ exit (1);
+fprintf (f, "%d", (sizeof (long)));
+fclose (f);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4708: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4711: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4713: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4716: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:4732: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF
-
-echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2775: checking size of short" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:4738: checking for short" >&5
+echo $ECHO_N "checking for short... $ECHO_C" >&6
+if test "${ac_cv_type_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4744 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+if ((short *) 0)
+ return 0;
+if (sizeof (short))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4759: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4762: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4765: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4768: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_short=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_short=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:4778: result: $ac_cv_type_short" >&5
+echo "${ECHO_T}$ac_cv_type_short" >&6
+
+echo "$as_me:4781: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6
+if test "${ac_cv_sizeof_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_short" = yes; then
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line 4790 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4802: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4805: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4808: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4811: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4816 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4828: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4831: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4834: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4837: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4853 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4865: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4868: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4871: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4874: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4890 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4902: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4905: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4908: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4911: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+ac_cv_sizeof_short=$ac_lo
else
if test "$cross_compiling" = yes; then
- ac_cv_sizeof_short=cross
+ { { echo "$as_me:4924: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 2783 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4929 "configure"
#include "confdefs.h"
-#include <stdio.h>
-main()
+$ac_includes_default
+int
+main ()
{
- FILE *f=fopen("conftestval", "w");
- if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(short));
- exit(0);
+FILE *f = fopen ("conftest.val", "w");
+if (!f)
+ exit (1);
+fprintf (f, "%d", (sizeof (short)));
+fclose (f);
+ ;
+ return 0;
}
-EOF
-if { (eval echo configure:2794: \"$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`
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4945: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4948: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4950: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4953: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=`cat conftest.val`
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_sizeof_short=0
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-echo "$ac_t""$ac_cv_sizeof_short" 1>&6
-cat >> confdefs.h <<EOF
+rm -f conftest.val
+else
+ ac_cv_sizeof_short=0
+fi
+fi
+echo "$as_me:4969: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6
+cat >>confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF
-
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2815: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:4975: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2820 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4981 "configure"
#include "confdefs.h"
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
+ ;
+ return 0;
}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5039: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5042: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5045: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5048: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_const=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+echo "$as_me:5058: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
+
+cat >>confdefs.h <<\EOF
+#define const
EOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2890: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:5068: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 2897 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5076 "configure"
#include "confdefs.h"
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
+#endif
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5085: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5088: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5091: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5094: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+echo "$as_me:5105: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
+ no)
+cat >>confdefs.h <<\EOF
+#define inline
EOF
;;
- *) cat >> confdefs.h <<EOF
+ *) cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
;;
esac
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2930: 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
+echo "$as_me:5120: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 2937 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 5128 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
-int main() {
+int
+main ()
+{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5145: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5148: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5151: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5154: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
# It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 5158 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
-int main() {
+int
+main ()
+{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5175: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5178: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5181: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5184: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_bigendian=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_bigendian=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_bigendian=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:5200: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 2983 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5205 "configure"
#include "confdefs.h"
-main () {
+int
+main ()
+{
/* Are we little or big endian? From Harbison&Steele. */
union
{
@@ -2991,106 +5216,97 @@ main () {
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}
-EOF
-if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5221: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5224: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5226: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5229: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_bigendian=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_bigendian=yes
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_bigendian=yes
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+echo "$as_me:5242: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF
fi
-echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3020: checking whether char is unsigned" >&5
-if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$GCC" = yes; then
- # GCC predefines this symbol on systems where it applies.
-cat > conftest.$ac_ext <<EOF
-#line 3027 "configure"
-#include "confdefs.h"
-#ifdef __CHAR_UNSIGNED__
- yes
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_c_char_unsigned=yes
-else
- rm -rf conftest*
- ac_cv_c_char_unsigned=no
-fi
-rm -f conftest*
-
+echo "$as_me:5252: checking whether char is unsigned" >&5
+echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
+if test "${ac_cv_c_char_unsigned+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
- cat > conftest.$ac_ext <<EOF
-#line 3049 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5258 "configure"
#include "confdefs.h"
-/* volatile prevents gcc2 from optimizing the test away on sparcs. */
-#if !defined(__STDC__) || __STDC__ != 1
-#define volatile
-#endif
-main() {
- volatile char c = 255; exit(c < 0);
+$ac_includes_default
+int
+main ()
+{
+int _array_ [1 - 2 * !(((char) -1) < 0)]
+ ;
+ return 0;
}
-EOF
-if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_char_unsigned=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5270: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5273: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5276: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5279: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_char_unsigned=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_char_unsigned=yes
fi
-rm -fr conftest*
-fi
-
-fi
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
+echo "$as_me:5289: result: $ac_cv_c_char_unsigned" >&5
+echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define __CHAR_UNSIGNED__ 1
EOF
fi
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3084: 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
+echo "$as_me:5298: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+if test "${ac_cv_type_signal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3089 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5304 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
-#undef signal
+# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
@@ -3098,527 +5314,761 @@ extern "C" void (*signal (int, void (*)(int)))(int);
void (*signal ()) ();
#endif
-int main() {
+int
+main ()
+{
int i;
-; return 0; }
-EOF
-if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5326: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5329: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5332: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5335: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_signal=void
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_signal=int
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:5345: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF
-
-echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3125: 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
+echo "$as_me:5352: checking for uid_t in sys/types.h" >&5
+echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
+if test "${ac_cv_type_uid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3130 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5358 "configure"
#include "confdefs.h"
#include <sys/types.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "uid_t" >/dev/null 2>&1; then
- rm -rf conftest*
ac_cv_type_uid_t=yes
else
- rm -rf conftest*
ac_cv_type_uid_t=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+echo "$as_me:5372: result: $ac_cv_type_uid_t" >&5
+echo "${ECHO_T}$ac_cv_type_uid_t" >&6
if test $ac_cv_type_uid_t = no; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define uid_t int
EOF
- cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define gid_t int
EOF
fi
-echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3159: 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
+echo "$as_me:5386: checking for mode_t" >&5
+echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
+if test "${ac_cv_type_mode_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3164 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5392 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((mode_t *) 0)
+ return 0;
+if (sizeof (mode_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5407: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5410: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5413: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5416: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_mode_t=yes
else
- rm -rf conftest*
- ac_cv_type_mode_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_mode_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_mode_t" 1>&6
-if test $ac_cv_type_mode_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5426: result: $ac_cv_type_mode_t" >&5
+echo "${ECHO_T}$ac_cv_type_mode_t" >&6
+if test $ac_cv_type_mode_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define mode_t int
EOF
fi
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3192: 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
+echo "$as_me:5438: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
+if test "${ac_cv_type_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3197 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5444 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((off_t *) 0)
+ return 0;
+if (sizeof (off_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5459: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5462: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5465: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5468: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
- rm -rf conftest*
- ac_cv_type_off_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_off_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5478: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6
+if test $ac_cv_type_off_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define off_t long
EOF
fi
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3225: 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
+echo "$as_me:5490: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3230 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5496 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+ return 0;
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5511: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5514: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5517: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5520: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
- rm -rf conftest*
- ac_cv_type_size_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_size_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5530: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define size_t unsigned
EOF
fi
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3258: 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
+echo "$as_me:5542: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3263 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5548 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+ return 0;
+if (sizeof (pid_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5563: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5566: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5569: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5572: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_pid_t=yes
else
- rm -rf conftest*
- ac_cv_type_pid_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_pid_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5582: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+if test $ac_cv_type_pid_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define pid_t int
EOF
fi
-echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:3291: 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
+echo "$as_me:5594: checking for struct stat.st_rdev" >&5
+echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3296 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5600 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-int main() {
-struct stat s; s.st_rdev;
-; return 0; }
-EOF
-if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_struct_st_rdev=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_struct_st_rdev=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
-if test $ac_cv_struct_st_rdev = yes; then
- cat >> confdefs.h <<\EOF
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_rdev)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5614: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5617: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5620: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5623: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_rdev=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_member_struct_stat_st_rdev=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:5633: result: $ac_cv_member_struct_stat_st_rdev" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
+if test $ac_cv_member_struct_stat_st_rdev = yes; then
+
+cat >>confdefs.h <<EOF
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_ST_RDEV 1
EOF
fi
-echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
-echo "configure:3325: 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
+echo "$as_me:5647: checking for d_off in dirent" >&5
+echo $ECHO_N "checking for d_off in dirent... $ECHO_C" >&6
+if test "${ac_cv_dirent_d_off+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3330 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5653 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
-int main() {
+int
+main ()
+{
struct dirent d; d.d_off;
-; return 0; }
-EOF
-if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5668: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5671: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5674: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5677: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_dirent_d_off=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_dirent_d_off=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_dirent_d_off=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
+echo "$as_me:5687: result: $ac_cv_dirent_d_off" >&5
+echo "${ECHO_T}$ac_cv_dirent_d_off" >&6
if test $ac_cv_dirent_d_off = yes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_DIRENT_D_OFF 1
EOF
fi
-echo $ac_n "checking for ino_t""... $ac_c" 1>&6
-echo "configure:3361: 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
+echo "$as_me:5696: checking for ino_t" >&5
+echo $ECHO_N "checking for ino_t... $ECHO_C" >&6
+if test "${ac_cv_type_ino_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3366 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5702 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((ino_t *) 0)
+ return 0;
+if (sizeof (ino_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5717: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5720: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5723: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5726: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_ino_t=yes
else
- rm -rf conftest*
- ac_cv_type_ino_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_ino_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_ino_t" 1>&6
-if test $ac_cv_type_ino_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5736: result: $ac_cv_type_ino_t" >&5
+echo "${ECHO_T}$ac_cv_type_ino_t" >&6
+if test $ac_cv_type_ino_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define ino_t unsigned
EOF
fi
-echo $ac_n "checking for loff_t""... $ac_c" 1>&6
-echo "configure:3394: 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
+echo "$as_me:5748: checking for loff_t" >&5
+echo $ECHO_N "checking for loff_t... $ECHO_C" >&6
+if test "${ac_cv_type_loff_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3399 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5754 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((loff_t *) 0)
+ return 0;
+if (sizeof (loff_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5769: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5772: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5775: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5778: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_loff_t=yes
else
- rm -rf conftest*
- ac_cv_type_loff_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_loff_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_loff_t" 1>&6
-if test $ac_cv_type_loff_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5788: result: $ac_cv_type_loff_t" >&5
+echo "${ECHO_T}$ac_cv_type_loff_t" >&6
+if test $ac_cv_type_loff_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define loff_t off_t
EOF
fi
-echo $ac_n "checking for offset_t""... $ac_c" 1>&6
-echo "configure:3427: 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
+echo "$as_me:5800: checking for offset_t" >&5
+echo $ECHO_N "checking for offset_t... $ECHO_C" >&6
+if test "${ac_cv_type_offset_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3432 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5806 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((offset_t *) 0)
+ return 0;
+if (sizeof (offset_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5821: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5824: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5827: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5830: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_offset_t=yes
else
- rm -rf conftest*
- ac_cv_type_offset_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_offset_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_offset_t" 1>&6
-if test $ac_cv_type_offset_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5840: result: $ac_cv_type_offset_t" >&5
+echo "${ECHO_T}$ac_cv_type_offset_t" >&6
+if test $ac_cv_type_offset_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define offset_t loff_t
EOF
fi
-echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3460: 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
+echo "$as_me:5852: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
+if test "${ac_cv_type_ssize_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3465 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5858 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((ssize_t *) 0)
+ return 0;
+if (sizeof (ssize_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5873: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5876: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5879: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5882: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_ssize_t=yes
else
- rm -rf conftest*
- ac_cv_type_ssize_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_ssize_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
-if test $ac_cv_type_ssize_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5892: result: $ac_cv_type_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
+if test $ac_cv_type_ssize_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define ssize_t int
EOF
fi
-echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
-echo "configure:3493: 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
+echo "$as_me:5904: checking for wchar_t" >&5
+echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
+if test "${ac_cv_type_wchar_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 3498 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5910 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((wchar_t *) 0)
+ return 0;
+if (sizeof (wchar_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5925: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5928: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5931: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5934: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_wchar_t=yes
else
- rm -rf conftest*
- ac_cv_type_wchar_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_wchar_t=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
-if test $ac_cv_type_wchar_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:5944: result: $ac_cv_type_wchar_t" >&5
+echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
+if test $ac_cv_type_wchar_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
#define wchar_t unsigned short
EOF
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:3530: 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
+echo "$as_me:5959: checking for httpConnect in -lcups" >&5
+echo $ECHO_N "checking for httpConnect in -lcups... $ECHO_C" >&6
+if test "${ac_cv_lib_cups_httpConnect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lcups $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3538 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 5967 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char httpConnect();
-
-int main() {
-httpConnect()
-; return 0; }
-EOF
-if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char httpConnect ();
+int
+main ()
+{
+httpConnect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5986: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5989: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5992: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5995: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_cups_httpConnect=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_cups_httpConnect=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6006: result: $ac_cv_lib_cups_httpConnect" >&5
+echo "${ECHO_T}$ac_cv_lib_cups_httpConnect" >&6
+if test $ac_cv_lib_cups_httpConnect = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBCUPS 1
EOF
LIBS="-lcups $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
# I wonder if there is a nicer way of doing this?
if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
- for ac_hdr in cups/cups.h cups/language.h
+
+for ac_header in cups/cups.h cups/language.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3584: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3589 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:6024: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6030 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3594: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:6034: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:6040: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:6059: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
if test x"$ac_cv_header_cups_language_h" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_CUPS 1
EOF
@@ -3627,88 +6077,193 @@ EOF
fi
############################################
-# we need libdl for PAM and the new VFS code
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3633: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3641 "configure"
+# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
+
+for ac_func in dlopen
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:6085: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6091 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen();
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+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
+f = $ac_func;
+#endif
-int main() {
-dlopen()
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6122: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6125: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6128: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6131: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:6141: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+done
+
+if test x"$ac_cv_func_dlopen" = x"no"; then
+ echo "$as_me:6152: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6160 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6179: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6182: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6185: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6188: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6199: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
LIBS="$LIBS -ldl";
- cat >> confdefs.h <<\EOF
-#define HAVE_LIBDL 1
+ cat >>confdefs.h <<\EOF
+#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:3680: checking for immediate structures" >&5
-if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:6214: checking for immediate structures" >&5
+echo $ECHO_N "checking for immediate structures... $ECHO_C" >&6
+if test "${samba_cv_immediate_structures+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3686 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6221 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
-
- #define X_FOOBAR(x) ((FOOBAR) { x })
- typedef struct {unsigned x;} FOOBAR;
- FOOBAR f = X_FOOBAR(1);
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ typedef struct {unsigned x;} FOOBAR;
+#define X_FOOBAR(x) ((FOOBAR) { x })
+#define FOO_ONE X_FOOBAR(1)
+ FOOBAR f = FOO_ONE;
+ static struct {
+ FOOBAR y;
+ } f2[] = {
+ {FOO_ONE}
+ };
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6244: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6247: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6250: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6253: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_immediate_structures=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_immediate_structures=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_immediate_structures=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_immediate_structures" 1>&6
+echo "$as_me:6263: result: $samba_cv_immediate_structures" >&5
+echo "${ECHO_T}$samba_cv_immediate_structures" >&6
if test x"$samba_cv_immediate_structures" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_IMMEDIATE_STRUCTURES 1
EOF
@@ -3716,14 +6271,14 @@ fi
############################################
# check for unix domain sockets
-echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
-echo "configure:3721: checking for unix domain sockets" >&5
-if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:6274: checking for unix domain sockets" >&5
+echo $ECHO_N "checking for unix domain sockets... $ECHO_C" >&6
+if test "${samba_cv_unixsocket+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3727 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6281 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3731,41 +6286,54 @@ else
#include <stddef.h>
#include <sys/socket.h>
#include <sys/un.h>
-int main() {
+int
+main ()
+{
- struct sockaddr_un sunaddr;
+ struct sockaddr_un sunaddr;
sunaddr.sun_family = AF_UNIX;
-; return 0; }
-EOF
-if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6301: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6304: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6307: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6310: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_unixsocket=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_unixsocket=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_unixsocket=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_unixsocket" 1>&6
+echo "$as_me:6320: result: $samba_cv_unixsocket" >&5
+echo "${ECHO_T}$samba_cv_unixsocket" >&6
if test x"$samba_cv_unixsocket" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UNIXSOCKET 1
EOF
fi
-echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
-echo "configure:3763: 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
+echo "$as_me:6329: checking for socklen_t type" >&5
+echo $ECHO_N "checking for socklen_t type... $ECHO_C" >&6
+if test "${samba_cv_socklen_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3769 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6336 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3774,38 +6342,51 @@ else
#include <stddef.h>
#endif
#include <sys/socket.h>
-int main() {
+int
+main ()
+{
socklen_t i = 0
-; return 0; }
-EOF
-if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6354: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6357: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6360: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6363: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_socklen_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_socklen_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_socklen_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_socklen_t" 1>&6
+echo "$as_me:6373: result: $samba_cv_socklen_t" >&5
+echo "${ECHO_T}$samba_cv_socklen_t" >&6
if test x"$samba_cv_socklen_t" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SOCKLEN_T_TYPE 1
EOF
fi
-echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
-echo "configure:3803: 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
+echo "$as_me:6382: checking for sig_atomic_t type" >&5
+echo $ECHO_N "checking for sig_atomic_t type... $ECHO_C" >&6
+if test "${samba_cv_sig_atomic_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3809 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6389 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3814,25 +6395,38 @@ else
#include <stddef.h>
#endif
#include <signal.h>
-int main() {
+int
+main ()
+{
sig_atomic_t i = 0
-; return 0; }
-EOF
-if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6407: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6410: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6413: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6416: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_sig_atomic_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_sig_atomic_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_sig_atomic_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
+echo "$as_me:6426: result: $samba_cv_sig_atomic_t" >&5
+echo "${ECHO_T}$samba_cv_sig_atomic_t" >&6
if test x"$samba_cv_sig_atomic_t" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SIG_ATOMIC_T_TYPE 1
EOF
@@ -3840,285 +6434,377 @@ fi
# stupid headers have the functions but no declaration. grrrr.
- echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
-echo "configure:3845: 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
+ echo "$as_me:6437: checking for errno declaration" >&5
+echo $ECHO_N "checking for errno declaration... $ECHO_C" >&6
+if test "${ac_cv_have_errno_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3851 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6444 "configure"
#include "confdefs.h"
#include <errno.h>
-int main() {
+int
+main ()
+{
int i = (int)errno
-; return 0; }
-EOF
-if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6456: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6459: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6462: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6465: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_errno_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_errno_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_errno_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
+echo "$as_me:6475: result: $ac_cv_have_errno_decl" >&5
+echo "${ECHO_T}$ac_cv_have_errno_decl" >&6
if test x"$ac_cv_have_errno_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_ERRNO_DECL 1
EOF
fi
-
- echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
-echo "configure:3880: 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
+ echo "$as_me:6484: checking for setresuid declaration" >&5
+echo $ECHO_N "checking for setresuid declaration... $ECHO_C" >&6
+if test "${ac_cv_have_setresuid_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3886 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6491 "configure"
#include "confdefs.h"
#include <unistd.h>
-int main() {
+int
+main ()
+{
int i = (int)setresuid
-; return 0; }
-EOF
-if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6503: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6506: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6509: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6512: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_setresuid_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_setresuid_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_setresuid_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
+echo "$as_me:6522: result: $ac_cv_have_setresuid_decl" >&5
+echo "${ECHO_T}$ac_cv_have_setresuid_decl" >&6
if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SETRESUID_DECL 1
EOF
fi
-
- echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
-echo "configure:3915: 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
+ echo "$as_me:6531: checking for setresgid declaration" >&5
+echo $ECHO_N "checking for setresgid declaration... $ECHO_C" >&6
+if test "${ac_cv_have_setresgid_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3921 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6538 "configure"
#include "confdefs.h"
#include <unistd.h>
-int main() {
+int
+main ()
+{
int i = (int)setresgid
-; return 0; }
-EOF
-if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6550: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6553: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6556: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6559: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_setresgid_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_setresgid_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_setresgid_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
+echo "$as_me:6569: result: $ac_cv_have_setresgid_decl" >&5
+echo "${ECHO_T}$ac_cv_have_setresgid_decl" >&6
if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SETRESGID_DECL 1
EOF
fi
-
- echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
-echo "configure:3950: 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
+ echo "$as_me:6578: checking for asprintf declaration" >&5
+echo $ECHO_N "checking for asprintf declaration... $ECHO_C" >&6
+if test "${ac_cv_have_asprintf_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3956 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6585 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
int i = (int)asprintf
-; return 0; }
-EOF
-if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6597: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6600: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6603: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6606: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_asprintf_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_asprintf_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_asprintf_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
+echo "$as_me:6616: result: $ac_cv_have_asprintf_decl" >&5
+echo "${ECHO_T}$ac_cv_have_asprintf_decl" >&6
if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_ASPRINTF_DECL 1
EOF
fi
-
- echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
-echo "configure:3985: 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
+ echo "$as_me:6625: checking for vasprintf declaration" >&5
+echo $ECHO_N "checking for vasprintf declaration... $ECHO_C" >&6
+if test "${ac_cv_have_vasprintf_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 3991 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6632 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
int i = (int)vasprintf
-; return 0; }
-EOF
-if { (eval echo configure:3998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6644: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6647: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6650: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6653: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_vasprintf_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_vasprintf_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_vasprintf_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
+echo "$as_me:6663: result: $ac_cv_have_vasprintf_decl" >&5
+echo "${ECHO_T}$ac_cv_have_vasprintf_decl" >&6
if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_VASPRINTF_DECL 1
EOF
fi
-
- echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
-echo "configure:4020: 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
+ echo "$as_me:6672: checking for vsnprintf declaration" >&5
+echo $ECHO_N "checking for vsnprintf declaration... $ECHO_C" >&6
+if test "${ac_cv_have_vsnprintf_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 4026 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6679 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
int i = (int)vsnprintf
-; return 0; }
-EOF
-if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6691: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6694: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6697: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6700: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_vsnprintf_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_vsnprintf_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_vsnprintf_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
+echo "$as_me:6710: result: $ac_cv_have_vsnprintf_decl" >&5
+echo "${ECHO_T}$ac_cv_have_vsnprintf_decl" >&6
if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_VSNPRINTF_DECL 1
EOF
fi
-
- echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
-echo "configure:4055: 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
+ echo "$as_me:6719: checking for snprintf declaration" >&5
+echo $ECHO_N "checking for snprintf declaration... $ECHO_C" >&6
+if test "${ac_cv_have_snprintf_decl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 4061 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6726 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
int i = (int)snprintf
-; return 0; }
-EOF
-if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6738: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6741: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6744: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6747: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_have_snprintf_decl=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_have_snprintf_decl=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_snprintf_decl=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
+echo "$as_me:6757: result: $ac_cv_have_snprintf_decl" >&5
+echo "${ECHO_T}$ac_cv_have_snprintf_decl" >&6
if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SNPRINTF_DECL 1
EOF
fi
-
# 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:4092: checking for real setresuid" >&5
-if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:6768: checking for real setresuid" >&5
+echo $ECHO_N "checking for real setresuid... $ECHO_C" >&6
+if test "${samba_cv_have_setresuid+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_have_setresuid=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 4101 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6778 "configure"
#include "confdefs.h"
#include <errno.h>
main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
-EOF
-if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:6784: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6787: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:6789: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6792: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_have_setresuid=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_have_setresuid=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_have_setresuid=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_have_setresuid" 1>&6
+echo "$as_me:6804: result: $samba_cv_have_setresuid" >&5
+echo "${ECHO_T}$samba_cv_have_setresuid" >&6
if test x"$samba_cv_have_setresuid" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SETRESUID 1
EOF
@@ -4126,310 +6812,405 @@ fi
# Do the same check for setresguid...
#
-echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
-echo "configure:4131: checking for real setresgid" >&5
-if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:6815: checking for real setresgid" >&5
+echo $ECHO_N "checking for real setresgid... $ECHO_C" >&6
+if test "${samba_cv_have_setresgid+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_have_setresgid=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 4140 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6825 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <errno.h>
main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
-EOF
-if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:6832: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6835: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:6837: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6840: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_have_setresgid=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_have_setresgid=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_have_setresgid=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_have_setresgid" 1>&6
+echo "$as_me:6852: result: $samba_cv_have_setresgid" >&5
+echo "${ECHO_T}$samba_cv_have_setresgid" >&6
if test x"$samba_cv_have_setresgid" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SETRESGID 1
EOF
fi
-echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:4169: 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
+echo "$as_me:6861: checking for working memcmp" >&5
+echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
+if test "${ac_cv_func_memcmp_working+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
- ac_cv_func_memcmp_clean=no
+ ac_cv_func_memcmp_working=no
else
- cat > conftest.$ac_ext <<EOF
-#line 4177 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6870 "configure"
#include "confdefs.h"
-main()
+int
+main ()
{
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
- exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
-}
-EOF
-if { (eval echo configure:4187: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_memcmp_clean=no
-fi
-rm -fr conftest*
-fi
-
-fi
+ /* Some versions of memcmp are not 8-bit clean. */
+ char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+ if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+ exit (1);
-echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
-test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+ /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+ or more and with at least one buffer not starting on a 4-byte boundary.
+ William Lewis provided this test program. */
+ {
+ char foo[21];
+ char bar[21];
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ char *a = foo + i;
+ char *b = bar + i;
+ strcpy (a, "--------01111111");
+ strcpy (b, "--------10000000");
+ if (memcmp (a, b, 16) >= 0)
+ exit (1);
+ }
+ exit (0);
+ }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:6906: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6909: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:6911: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6914: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_memcmp_working=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_memcmp_working=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:6926: result: $ac_cv_func_memcmp_working" >&5
+echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
+test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
###############################################
# Readline included by default unless explicitly asked not to
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:4211: checking whether to use readline" >&5
+echo "$as_me:6935: checking whether to use readline" >&5
+echo $ECHO_N "checking whether to use readline... $ECHO_C" >&6
+
# Check whether --with-readline or --without-readline was given.
if test "${with_readline+set}" = set; then
withval="$with_readline"
case "$with_readline" in
yes)
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:6943: result: yes" >&5
+echo "${ECHO_T}yes" >&6
- for ac_hdr in readline.h history.h readline/readline.h
+for ac_header in readline.h history.h readline/readline.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4223: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4228 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:6949: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6955 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4233: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:6959: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:6965: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:6984: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
- for ac_hdr in readline/history.h
+for ac_header in readline/history.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4263: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4268 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:6997: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7003 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4273: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:7007: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7013: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:7032: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-
- for ac_hdr in readline.h readline/readline.h
+for ac_header in readline.h readline/readline.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4304: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4309 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:7045: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7051 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4314: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:7055: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7061: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:7080: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
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:4337: 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
+ as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
+echo "$as_me:7089: checking for tgetent in -l${termlib}" >&5
+echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-l${termlib} $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4345 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7097 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char tgetent ();
+int
+main ()
+{
+tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7116: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7119: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7122: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7125: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7136: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
TERMLIBS="-l${termlib}"; break
-else
- echo "$ac_t""no" 1>&6
fi
done
- echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
-echo "configure:4378: 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
+ echo "$as_me:7143: checking for rl_callback_handler_install in -lreadline" >&5
+echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
+if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4386 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7151 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char rl_callback_handler_install();
-
-int main() {
-rl_callback_handler_install()
-; return 0; }
-EOF
-if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char rl_callback_handler_install ();
+int
+main ()
+{
+rl_callback_handler_install ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7170: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7173: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7176: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7179: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_readline_rl_callback_handler_install=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_readline_rl_callback_handler_install=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7190: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
+if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
TERMLIBS="-lreadline $TERMLIBS"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_LIBREADLINE 1
EOF
break
else
- echo "$ac_t""no" 1>&6
-TERMLIBS=
+ TERMLIBS=
fi
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
no)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:7208: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
*)
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:7212: result: yes" >&5
+echo "${ECHO_T}yes" >&6
# Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
# alternate readline path
@@ -4440,229 +7221,277 @@ done
LDFLAGS="-L$with_readline/lib $LDFLAGS"
CPPFLAGS="-I$with_readline/include $CPPFLAGS"
- for ac_hdr in readline.h history.h readline/readline.h
+for ac_header in readline.h history.h readline/readline.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4448: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4453 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:7227: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7233 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4458: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:7237: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7243: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:7262: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
- for ac_hdr in readline/history.h
+for ac_header in readline/history.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4488: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4493 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:7275: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7281 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4498: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:7285: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7291: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:7310: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
done
-
- for ac_hdr in readline.h readline/readline.h
+for ac_header in readline.h readline/readline.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4529: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4534 "configure"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:7323: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7329 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4539: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:7333: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7339: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:7358: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
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:4562: 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
+ as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
+echo "$as_me:7367: checking for tgetent in -l${termlib}" >&5
+echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-l${termlib} $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4570 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7375 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:4581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char tgetent ();
+int
+main ()
+{
+tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7394: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7397: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7400: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7403: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7414: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
TERMLIBS="-l${termlib}"; break
-else
- echo "$ac_t""no" 1>&6
fi
done
- echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
-echo "configure:4603: 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
+ echo "$as_me:7421: checking for rl_callback_handler_install in -lreadline" >&5
+echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
+if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $TERMLIBS $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4611 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7429 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char rl_callback_handler_install();
-
-int main() {
-rl_callback_handler_install()
-; return 0; }
-EOF
-if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char rl_callback_handler_install ();
+int
+main ()
+{
+rl_callback_handler_install ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7448: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7451: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7454: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7457: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_readline_rl_callback_handler_install=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_readline_rl_callback_handler_install=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7468: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
+if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
TERMLDFLAGS="-L$with_readline/lib"
TERMCPPFLAGS="-I$with_readline/include"
CPPFLAGS="-I$with_readline/include $CPPFLAGS"
TERMLIBS="-lreadline $TERMLIBS"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_LIBREADLINE 1
EOF
break
else
- echo "$ac_t""no" 1>&6
-TERMLIBS= CPPFLAGS=$_cppflags
+ TERMLIBS= CPPFLAGS=$_cppflags
fi
-else
- echo "$ac_t""no" 1>&6
fi
done
-
LDFLAGS=$_ldflags
;;
esac
else
- echo "$ac_t""no" 1>&6
-
-fi
-
-
+ echo "$as_me:7491: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
# The following test taken from the cvs sources
# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
@@ -4670,267 +7499,330 @@ fi
# libsocket.so which has a bad implementation of gethostbyname (it
# only looks in /etc/hosts), so we only look for -lsocket if we need
# it.
+
for ac_func in connect
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4677: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4682 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:7506: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7512 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7543: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7546: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7549: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7552: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7562: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
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:4733: 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
+ *)
+echo "$as_me:7576: checking for printf in -lnsl_s" >&5
+echo $ECHO_N "checking for printf in -lnsl_s... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_s_printf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl_s $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4741 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7584 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char printf();
-
-int main() {
-printf()
-; return 0; }
-EOF
-if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char printf ();
+int
+main ()
+{
+printf ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7603: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7606: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7609: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7612: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_s_printf=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_s_printf=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7623: result: $ac_cv_lib_nsl_s_printf" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_s_printf" >&6
+if test $ac_cv_lib_nsl_s_printf = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBNSL_S 1
EOF
LIBS="-lnsl_s $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
;;
esac
case "$LIBS" in
*-lnsl*) ;;
- *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
-echo "configure:4783: 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
+ *)
+echo "$as_me:7638: checking for printf in -lnsl" >&5
+echo $ECHO_N "checking for printf in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_printf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4791 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7646 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char printf();
-
-int main() {
-printf()
-; return 0; }
-EOF
-if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char printf ();
+int
+main ()
+{
+printf ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7665: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7668: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7671: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7674: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_printf=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_printf=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7685: result: $ac_cv_lib_nsl_printf" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_printf" >&6
+if test $ac_cv_lib_nsl_printf = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBNSL 1
EOF
LIBS="-lnsl $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
;;
esac
case "$LIBS" in
*-lsocket*) ;;
- *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:4833: checking for connect in -lsocket" >&5
-ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:7700: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4841 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7708 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char connect();
-
-int main() {
-connect()
-; return 0; }
-EOF
-if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char connect ();
+int
+main ()
+{
+connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7727: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7730: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7733: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7736: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7747: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
+if test $ac_cv_lib_socket_connect = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSOCKET 1
EOF
LIBS="-lsocket $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
;;
esac
case "$LIBS" in
*-linet*) ;;
- *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
-echo "configure:4883: checking for connect in -linet" >&5
-ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:7762: checking for connect in -linet" >&5
+echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6
+if test "${ac_cv_lib_inet_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-linet $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4891 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7770 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char connect();
-
-int main() {
-connect()
-; return 0; }
-EOF
-if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char connect ();
+int
+main ()
+{
+connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7789: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7792: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7795: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7798: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_inet_connect=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7809: result: $ac_cv_lib_inet_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6
+if test $ac_cv_lib_inet_connect = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBINET 1
EOF
LIBS="-linet $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
;;
esac
- if test x"$ac_cv_lib_socket_connect" = x"yes" ||
+ if test x"$ac_cv_lib_socket_connect" = x"yes" ||
test x"$ac_cv_lib_inet_connect" = x"yes"; then
# ac_cv_func_connect=yes
# don't! it would cause AC_CHECK_FUNC to succeed next time configure is run
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_CONNECT 1
EOF
@@ -4939,161 +7831,204 @@ fi
###############################################
# test for where we get get_yp_default_domain() from
+
for ac_func in yp_get_default_domain
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4946: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4951 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:7838: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7844 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7875: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7878: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7881: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7884: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7894: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
- echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
-echo "configure:5000: checking for yp_get_default_domain in -lnsl" >&5
-ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:7905: checking for yp_get_default_domain in -lnsl" >&5
+echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5008 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7913 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yp_get_default_domain();
-
-int main() {
-yp_get_default_domain()
-; return 0; }
-EOF
-if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char yp_get_default_domain ();
+int
+main ()
+{
+yp_get_default_domain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7932: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7935: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7938: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7941: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_yp_get_default_domain=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_yp_get_default_domain=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7952: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6
+if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
LIBS="$LIBS -lnsl";
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_YP_GET_DEFAULT_DOMAIN 1
EOF
-else
- echo "$ac_t""no" 1>&6
fi
-
+
fi
# Check if we have execl, if not we need to compile smbrun.
+
for ac_func in execl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5049: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5054 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:7969: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7975 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8006: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8009: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8012: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8015: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8025: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
@@ -5103,1394 +8038,1742 @@ else
RUNPROG=""
fi
-for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link
+for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5110: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5115 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8044: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8050 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8081: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8084: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8087: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8090: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8100: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64
+for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5165: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5170 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8113: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8119 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8150: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8153: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8156: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8159: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8169: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5220: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5225 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8182: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8188 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8219: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8222: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8225: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8228: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8238: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5275: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5280 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8251: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8288: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8291: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8294: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8297: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8307: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5330: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5335 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8320: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8326 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8357: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8360: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8363: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8366: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8376: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5385: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5390 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8389: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8395 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8426: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8429: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8432: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8435: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8445: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5440: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5445 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8458: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8464 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8495: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8498: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8501: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8504: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8514: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5495: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5500 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8527: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8533 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8564: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8567: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8570: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8573: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8583: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5550: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5555 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8596: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8602 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8633: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8636: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8639: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8642: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8652: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in syslog vsyslog
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5605: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5610 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8665: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8702: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8705: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8708: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8711: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8721: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
# syscall() is needed for smbwrapper.
+
for ac_func in syscall
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5662: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5667 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8736: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8742 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8776: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8779: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8782: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8792: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5718: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5723 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8805: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8811 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8842: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8845: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8848: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8851: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8861: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5773: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5778 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8874: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8880 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8911: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8914: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8917: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8920: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8930: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in __getcwd _getcwd
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5828: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5833 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8943: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8949 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8980: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8983: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8986: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8989: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8999: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in __xstat __fxstat __lxstat
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5883: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5888 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9012: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9018 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9049: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9052: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9055: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9058: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9068: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in _stat _lstat _fstat __stat __lstat __fstat
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5938: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5943 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9081: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9087 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9118: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9121: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9124: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9127: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9137: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5993: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5998 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9150: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9156 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9187: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9190: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9193: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9196: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9206: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6048: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6053 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9219: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9225 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9256: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9259: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9262: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9265: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9275: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6103: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6108 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9288: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9294 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9325: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9328: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9331: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9334: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9344: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in _write __write _fork __fork
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6158: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6163 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9357: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9363 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9397: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9400: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9403: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9413: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6213: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6218 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9426: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9432 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9463: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9466: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9469: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9472: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9482: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6268: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6273 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9495: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9501 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9532: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9535: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9538: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9541: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9551: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in pread _pread __pread pread64 _pread64 __pread64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6323: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6328 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9564: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9570 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9601: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9604: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9607: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9610: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9620: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6378: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6383 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9633: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9639 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9670: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9673: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9676: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9679: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9689: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
for ac_func in open64 _open64 __open64 creat64
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6433: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6438 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9702: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9708 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9739: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9742: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9745: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9748: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9758: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
#
# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
#
if test x$ac_cv_func_stat64 = xno ; then
- echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6492: checking for stat64 in <sys/stat.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 6494 "configure"
+ echo "$as_me:9773: checking for stat64 in <sys/stat.h>" >&5
+echo $ECHO_N "checking for stat64 in <sys/stat.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9776 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -6498,21 +9781,36 @@ echo "configure:6492: checking for stat64 in <sys/stat.h>" >&5
#endif
#include <sys/stat.h>
-int main() {
+int
+main ()
+{
struct stat64 st64; exit(stat64(".",&st64));
-; return 0; }
-EOF
-if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9793: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9796: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9799: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9802: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_stat64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
- echo "$ac_t""$ac_cv_func_stat64" 1>&6
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:9810: result: $ac_cv_func_stat64" >&5
+echo "${ECHO_T}$ac_cv_func_stat64" >&6
if test x$ac_cv_func_stat64 = xyes ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_STAT64 1
EOF
@@ -6520,10 +9818,10 @@ EOF
fi
if test x$ac_cv_func_lstat64 = xno ; then
- echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6525: checking for lstat64 in <sys/stat.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 6527 "configure"
+ echo "$as_me:9821: checking for lstat64 in <sys/stat.h>" >&5
+echo $ECHO_N "checking for lstat64 in <sys/stat.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9824 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -6531,21 +9829,36 @@ echo "configure:6525: checking for lstat64 in <sys/stat.h>" >&5
#endif
#include <sys/stat.h>
-int main() {
+int
+main ()
+{
struct stat64 st64; exit(lstat64(".",&st64));
-; return 0; }
-EOF
-if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9841: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9844: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9847: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9850: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_lstat64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
- echo "$ac_t""$ac_cv_func_lstat64" 1>&6
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:9858: result: $ac_cv_func_lstat64" >&5
+echo "${ECHO_T}$ac_cv_func_lstat64" >&6
if test x$ac_cv_func_lstat64 = xyes ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_LSTAT64 1
EOF
@@ -6553,10 +9866,10 @@ EOF
fi
if test x$ac_cv_func_fstat64 = xno ; then
- echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6558: checking for fstat64 in <sys/stat.h>" >&5
- cat > conftest.$ac_ext <<EOF
-#line 6560 "configure"
+ echo "$as_me:9869: checking for fstat64 in <sys/stat.h>" >&5
+echo $ECHO_N "checking for fstat64 in <sys/stat.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9872 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -6564,21 +9877,36 @@ echo "configure:6558: checking for fstat64 in <sys/stat.h>" >&5
#endif
#include <sys/stat.h>
-int main() {
+int
+main ()
+{
struct stat64 st64; exit(fstat64(0,&st64));
-; return 0; }
-EOF
-if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9889: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9892: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9895: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9898: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_fstat64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
- echo "$ac_t""$ac_cv_func_fstat64" 1>&6
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:9906: result: $ac_cv_func_fstat64" >&5
+echo "${ECHO_T}$ac_cv_func_fstat64" >&6
if test x$ac_cv_func_fstat64 = xyes ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_FSTAT64 1
EOF
@@ -6592,48 +9920,61 @@ fi
#
if test x$ac_cv_func_strcasecmp = xno ; then
- echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
-echo "configure:6597: checking for strcasecmp in -lresolv" >&5
-ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:9923: checking for strcasecmp in -lresolv" >&5
+echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6605 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 9931 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strcasecmp();
-
-int main() {
-strcasecmp()
-; return 0; }
-EOF
-if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char strcasecmp ();
+int
+main ()
+{
+strcasecmp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9950: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9953: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9956: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9959: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_strcasecmp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_strcasecmp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:9970: result: $ac_cv_lib_resolv_strcasecmp" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
+if test $ac_cv_lib_resolv_strcasecmp = yes; then
LIBS="$LIBS -lresolv"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_STRCASECMP 1
EOF
-else
- echo "$ac_t""no" 1>&6
fi
fi
@@ -6645,160 +9986,201 @@ fi
#
case "$LIBS" in
- *-lsecurity*) for ac_func in putprpwnam
+ *-lsecurity*)
+for ac_func in putprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6652: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6657 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9993: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9999 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10030: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10033: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10036: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10039: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10049: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:6705: checking for putprpwnam in -lsecurity" >&5
-ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:10060: checking for putprpwnam in -lsecurity" >&5
+echo $ECHO_N "checking for putprpwnam in -lsecurity... $ECHO_C" >&6
+if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6713 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 10068 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char putprpwnam();
-
-int main() {
-putprpwnam()
-; return 0; }
-EOF
-if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char putprpwnam ();
+int
+main ()
+{
+putprpwnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10087: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10090: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10093: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10096: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_security_putprpwnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_security_putprpwnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:10107: result: $ac_cv_lib_security_putprpwnam" >&5
+echo "${ECHO_T}$ac_cv_lib_security_putprpwnam" >&6
+if test $ac_cv_lib_security_putprpwnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSECURITY 1
EOF
LIBS="-lsecurity $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in putprpwnam
+
+for ac_func in putprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6754: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6759 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10121: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10127 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10158: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10161: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10164: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10167: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10177: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
@@ -6806,322 +10188,403 @@ done
esac
case "$LIBS" in
- *-lsec*) for ac_func in putprpwnam
+ *-lsec*)
+for ac_func in putprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6813: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6818 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10195: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10201 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10232: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10235: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10238: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10241: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10251: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:6866: checking for putprpwnam in -lsec" >&5
-ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:10262: checking for putprpwnam in -lsec" >&5
+echo $ECHO_N "checking for putprpwnam in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6874 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 10270 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char putprpwnam();
-
-int main() {
-putprpwnam()
-; return 0; }
-EOF
-if { (eval echo configure:6885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char putprpwnam ();
+int
+main ()
+{
+putprpwnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10289: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10292: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10295: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10298: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_putprpwnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_putprpwnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:10309: result: $ac_cv_lib_sec_putprpwnam" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_putprpwnam" >&6
+if test $ac_cv_lib_sec_putprpwnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSEC 1
EOF
LIBS="-lsec $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in putprpwnam
+
+for ac_func in putprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6915: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6920 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10323: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10329 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10360: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10363: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10366: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10369: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10379: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
esac
-
case "$LIBS" in
- *-lsecurity*) for ac_func in set_auth_parameters
+ *-lsecurity*)
+for ac_func in set_auth_parameters
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6975: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 6980 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10397: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10403 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10434: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10437: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10440: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10443: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10453: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
-echo "configure:7028: checking for set_auth_parameters in -lsecurity" >&5
-ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:10464: checking for set_auth_parameters in -lsecurity" >&5
+echo $ECHO_N "checking for set_auth_parameters in -lsecurity... $ECHO_C" >&6
+if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7036 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 10472 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char set_auth_parameters();
-
-int main() {
-set_auth_parameters()
-; return 0; }
-EOF
-if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char set_auth_parameters ();
+int
+main ()
+{
+set_auth_parameters ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10491: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10494: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10497: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10500: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_security_set_auth_parameters=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_security_set_auth_parameters=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:10511: result: $ac_cv_lib_security_set_auth_parameters" >&5
+echo "${ECHO_T}$ac_cv_lib_security_set_auth_parameters" >&6
+if test $ac_cv_lib_security_set_auth_parameters = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSECURITY 1
EOF
LIBS="-lsecurity $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in set_auth_parameters
+
+for ac_func in set_auth_parameters
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7077: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7082 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10525: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10531 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10562: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10565: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10568: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10571: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10581: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
@@ -7129,485 +10592,606 @@ done
esac
case "$LIBS" in
- *-lsec*) for ac_func in set_auth_parameters
+ *-lsec*)
+for ac_func in set_auth_parameters
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7136: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7141 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10599: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10605 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10636: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10639: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10642: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10645: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10655: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
-echo "configure:7189: checking for set_auth_parameters in -lsec" >&5
-ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:10666: checking for set_auth_parameters in -lsec" >&5
+echo $ECHO_N "checking for set_auth_parameters in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7197 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 10674 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char set_auth_parameters();
-
-int main() {
-set_auth_parameters()
-; return 0; }
-EOF
-if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char set_auth_parameters ();
+int
+main ()
+{
+set_auth_parameters ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10693: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10696: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10699: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10702: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_set_auth_parameters=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_set_auth_parameters=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:10713: result: $ac_cv_lib_sec_set_auth_parameters" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_set_auth_parameters" >&6
+if test $ac_cv_lib_sec_set_auth_parameters = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSEC 1
EOF
LIBS="-lsec $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in set_auth_parameters
+
+for ac_func in set_auth_parameters
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7238: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7243 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10727: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10733 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10764: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10767: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10770: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10773: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10783: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
esac
-
# UnixWare 7.x has its getspnam in -lgen
case "$LIBS" in
- *-lgen*) for ac_func in getspnam
+ *-lgen*)
+for ac_func in getspnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7299: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7304 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10802: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10808 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10839: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10842: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10845: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10848: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10858: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:7352: checking for getspnam in -lgen" >&5
-ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:10869: checking for getspnam in -lgen" >&5
+echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
+if test "${ac_cv_lib_gen_getspnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lgen $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7360 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 10877 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getspnam();
-
-int main() {
-getspnam()
-; return 0; }
-EOF
-if { (eval echo configure:7371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char getspnam ();
+int
+main ()
+{
+getspnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10896: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10899: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10902: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10905: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gen_getspnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gen_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:10916: result: $ac_cv_lib_gen_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
+if test $ac_cv_lib_gen_getspnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBGEN 1
EOF
LIBS="-lgen $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in getspnam
+
+for ac_func in getspnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7401: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7406 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:10930: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10936 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10967: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10970: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10973: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10976: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10986: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
esac
-
case "$LIBS" in
- *-lsecurity*) for ac_func in getspnam
+ *-lsecurity*)
+for ac_func in getspnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7461: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7466 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11004: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11010 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11041: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11044: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11047: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11050: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11060: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:7514: checking for getspnam in -lsecurity" >&5
-ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:11071: checking for getspnam in -lsecurity" >&5
+echo $ECHO_N "checking for getspnam in -lsecurity... $ECHO_C" >&6
+if test "${ac_cv_lib_security_getspnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7522 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11079 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getspnam();
-
-int main() {
-getspnam()
-; return 0; }
-EOF
-if { (eval echo configure:7533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char getspnam ();
+int
+main ()
+{
+getspnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11098: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11101: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11104: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11107: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_security_getspnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_security_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11118: result: $ac_cv_lib_security_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_security_getspnam" >&6
+if test $ac_cv_lib_security_getspnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSECURITY 1
EOF
LIBS="-lsecurity $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in getspnam
+
+for ac_func in getspnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7563: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7568 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11132: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11138 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11169: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11172: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11175: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11178: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11188: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
@@ -7615,322 +11199,403 @@ done
esac
case "$LIBS" in
- *-lsec*) for ac_func in getspnam
+ *-lsec*)
+for ac_func in getspnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7622: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7627 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11206: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11243: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11246: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11249: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11252: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11262: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
-echo "configure:7675: checking for getspnam in -lsec" >&5
-ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:11273: checking for getspnam in -lsec" >&5
+echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_getspnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7683 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11281 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getspnam();
-
-int main() {
-getspnam()
-; return 0; }
-EOF
-if { (eval echo configure:7694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char getspnam ();
+int
+main ()
+{
+getspnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11300: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11303: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11306: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11309: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_getspnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11320: result: $ac_cv_lib_sec_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6
+if test $ac_cv_lib_sec_getspnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSEC 1
EOF
LIBS="-lsec $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in getspnam
+
+for ac_func in getspnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7724: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7729 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11334: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11340 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11371: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11374: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11377: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11380: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11390: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
esac
-
case "$LIBS" in
- *-lsecurity*) for ac_func in bigcrypt
+ *-lsecurity*)
+for ac_func in bigcrypt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7784: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7789 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11408: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11414 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11445: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11448: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11451: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11454: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11464: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
-echo "configure:7837: checking for bigcrypt in -lsecurity" >&5
-ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:11475: checking for bigcrypt in -lsecurity" >&5
+echo $ECHO_N "checking for bigcrypt in -lsecurity... $ECHO_C" >&6
+if test "${ac_cv_lib_security_bigcrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7845 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11483 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bigcrypt();
-
-int main() {
-bigcrypt()
-; return 0; }
-EOF
-if { (eval echo configure:7856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char bigcrypt ();
+int
+main ()
+{
+bigcrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11502: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11505: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11508: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11511: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_security_bigcrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_security_bigcrypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11522: result: $ac_cv_lib_security_bigcrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_security_bigcrypt" >&6
+if test $ac_cv_lib_security_bigcrypt = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSECURITY 1
EOF
LIBS="-lsecurity $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in bigcrypt
+
+for ac_func in bigcrypt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7886: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 7891 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11536: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11542 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11573: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11576: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11579: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11582: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11592: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
@@ -7938,322 +11603,403 @@ done
esac
case "$LIBS" in
- *-lsec*) for ac_func in bigcrypt
+ *-lsec*)
+for ac_func in bigcrypt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7945: 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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11610: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 7950 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11616 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11647: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11650: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11653: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11656: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11666: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:7998: checking for bigcrypt in -lsec" >&5
-ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:11677: checking for bigcrypt in -lsec" >&5
+echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8006 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11685 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bigcrypt();
-
-int main() {
-bigcrypt()
-; return 0; }
-EOF
-if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char bigcrypt ();
+int
+main ()
+{
+bigcrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11704: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11707: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11710: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11713: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_bigcrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_bigcrypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11724: result: $ac_cv_lib_sec_bigcrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
+if test $ac_cv_lib_sec_bigcrypt = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSEC 1
EOF
LIBS="-lsec $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in bigcrypt
+
+for ac_func in bigcrypt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8047: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 8052 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11738: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11744 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11775: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11778: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11781: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11784: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11794: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:8075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
esac
-
case "$LIBS" in
- *-lsecurity*) for ac_func in getprpwnam
+ *-lsecurity*)
+for ac_func in getprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8107: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 8112 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11812: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11818 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11849: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11852: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11855: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11858: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11868: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:8160: checking for getprpwnam in -lsecurity" >&5
-ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:11879: checking for getprpwnam in -lsecurity" >&5
+echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
+if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsecurity $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8168 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11887 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getprpwnam();
-
-int main() {
-getprpwnam()
-; return 0; }
-EOF
-if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char getprpwnam ();
+int
+main ()
+{
+getprpwnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11906: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11909: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11912: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11915: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_security_getprpwnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_security_getprpwnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11926: result: $ac_cv_lib_security_getprpwnam" >&5
+echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
+if test $ac_cv_lib_security_getprpwnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSECURITY 1
EOF
LIBS="-lsecurity $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in getprpwnam
+
+for ac_func in getprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8209: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 8214 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:11940: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11946 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11977: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11980: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11983: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11986: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11996: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
@@ -8261,167 +12007,207 @@ done
esac
case "$LIBS" in
- *-lsec*) for ac_func in getprpwnam
+ *-lsec*)
+for ac_func in getprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8268: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 8273 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:12014: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12020 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12051: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12054: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12057: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12060: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:12070: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
- *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:8321: checking for getprpwnam in -lsec" >&5
-ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ *)
+echo "$as_me:12081: checking for getprpwnam in -lsec" >&5
+echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsec $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8329 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12089 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getprpwnam();
-
-int main() {
-getprpwnam()
-; return 0; }
-EOF
-if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char getprpwnam ();
+int
+main ()
+{
+getprpwnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12111: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12114: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12117: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_getprpwnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_getprpwnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12128: result: $ac_cv_lib_sec_getprpwnam" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_getprpwnam" >&6
+if test $ac_cv_lib_sec_getprpwnam = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBSEC 1
EOF
LIBS="-lsec $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-
- for ac_func in getprpwnam
+
+for ac_func in getprpwnam
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8370: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 8375 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:12142: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12148 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12179: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12182: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12185: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12188: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:12198: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:8398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
;;
esac
-
# this bit needs to be modified for each OS that is suported by
# smbwrapper. You need to specify how to created a shared library and
# how to compile C code to produce PIC object files
@@ -8430,31 +12216,32 @@ done
HOST_OS="$host_os"
LDSHFLAGS="-shared"
SONAMEFLAG="#"
-SHLD="\${CC}"
+SHLD="\${CC}"
PICFLAG=""
PICSUFFIX="po.o"
SHLIBEXT="so"
# Assume non-shared by default and override below
-BLDSHARED="false"
-echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
-echo "configure:8441: checking ability to build shared libraries" >&5
+BLDSHARED="false"
+echo "$as_me:12225: checking ability to build shared libraries" >&5
+echo $ECHO_N "checking ability to build shared libraries... $ECHO_C" >&6
# and these are for particular systems
case "$host_os" in
- *linux*) cat >> confdefs.h <<\EOF
+ *linux*) cat >>confdefs.h <<\EOF
#define LINUX 1
EOF
BLDSHARED="true"
LDSHFLAGS="-shared"
+ DYNEXP="-Wl,--export-dynamic"
PICFLAG="-fPIC"
SONAMEFLAG="-Wl,-soname="
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF
;;
- *solaris*) cat >> confdefs.h <<\EOF
+ *solaris*) cat >>confdefs.h <<\EOF
#define SUNOS5 1
EOF
@@ -8467,12 +12254,12 @@ EOF
POBAD_CC=""
PICSUFFIX="po.o"
fi
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF
;;
- *sunos*) cat >> confdefs.h <<\EOF
+ *sunos*) cat >>confdefs.h <<\EOF
#define SUNOS4 1
EOF
@@ -8483,17 +12270,17 @@ EOF
*bsd*) BLDSHARED="true"
LDSHFLAGS="-Wl,-soname,\$@ -shared"
PICFLAG="-fPIC"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF
;;
- *irix*) cat >> confdefs.h <<\EOF
+ *irix*) cat >>confdefs.h <<\EOF
#define IRIX 1
EOF
case "$host_os" in
- *irix6*) cat >> confdefs.h <<\EOF
+ *irix6*) cat >>confdefs.h <<\EOF
#define IRIX6 1
EOF
@@ -8501,31 +12288,31 @@ EOF
esac
ATTEMPT_WRAP32_BUILD=yes
BLDSHARED="true"
- LDSHFLAGS="-soname \$@ -shared"
- SHLD="\${LD}"
+ LDSHFLAGS="-set_version sgi1.0 -soname \$@ -shared"
+ SHLD="\${LD}"
if test "${ac_cv_prog_CC}" = "gcc"; then
PICFLAG="-fPIC"
- else
+ else
PICFLAG="-KPIC"
fi
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 512
EOF
;;
- *aix*) cat >> confdefs.h <<\EOF
+ *aix*) cat >>confdefs.h <<\EOF
#define AIX 1
EOF
BLDSHARED="true"
LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
PICFLAG="-O2 -qmaxmem=6000"
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE DEV_BSIZE
EOF
;;
- *hpux*) cat >> confdefs.h <<\EOF
+ *hpux*) cat >>confdefs.h <<\EOF
#define HPUX 1
EOF
@@ -8537,16 +12324,17 @@ EOF
LDSHFLAGS="-B symbolic -b -z +h \$@"
PICFLAG="+z"
fi
- cat >> confdefs.h <<\EOF
+ DYNEXP="-Wl,-E"
+ cat >>confdefs.h <<\EOF
#define STAT_ST_BLOCKSIZE 8192
EOF
;;
- *qnx*) cat >> confdefs.h <<\EOF
+ *qnx*) cat >>confdefs.h <<\EOF
#define QNX 1
EOF
;;
- *osf*) cat >> confdefs.h <<\EOF
+ *osf*) cat >>confdefs.h <<\EOF
#define OSF1 1
EOF
@@ -8554,11 +12342,11 @@ EOF
LDSHFLAGS="-Wl,-soname,\$@ -shared"
PICFLAG="-fPIC"
;;
- *sco*) cat >> confdefs.h <<\EOF
+ *sco*) cat >>confdefs.h <<\EOF
#define SCO 1
EOF
;;
- *unixware*) cat >> confdefs.h <<\EOF
+ *unixware*) cat >>confdefs.h <<\EOF
#define UNIXWARE 1
EOF
@@ -8566,50 +12354,54 @@ EOF
LDSHFLAGS="-Wl,-soname,\$@ -shared"
PICFLAG="-KPIC"
;;
- *next2*) cat >> confdefs.h <<\EOF
+ *next2*) cat >>confdefs.h <<\EOF
#define NEXT2 1
EOF
;;
*dgux*) # Extract the first word of "groff", so it can be a program name with args.
set dummy groff; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8577: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12363: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ROFF+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ROFF"; then
ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
else
- 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_prog_ROFF="groff -etpsR -Tascii -man"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
+echo "$as_me:12378: found $ac_dir/$ac_word" >&5
+break
+done
+
fi
fi
-ROFF="$ac_cv_prog_ROFF"
+ROFF=$ac_cv_prog_ROFF
if test -n "$ROFF"; then
- echo "$ac_t""$ROFF" 1>&6
+ echo "$as_me:12386: result: $ROFF" >&5
+echo "${ECHO_T}$ROFF" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:12389: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
;;
*sysv4*)
case "$host" in
*-univel-*) if test "$GCC" != yes ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_MEMSET 1
EOF
fi
LDSHFLAGS="-G"
+ DYNEXP="-Bexport"
;;
- *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
+ *mips-sni-sysv4*) cat >>confdefs.h <<\EOF
#define RELIANTUNIX 1
EOF
;;
@@ -8617,7 +12409,7 @@ EOF
;;
*sysv5*)
if test "$GCC" != yes ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_MEMSET 1
EOF
@@ -8625,19 +12417,24 @@ EOF
LDSHFLAGS="-G"
;;
esac
-echo "$ac_t""$BLDSHARED" 1>&6
-echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
-echo "configure:8631: checking linker flags for shared libraries" >&5
-echo "$ac_t""$LDSHFLAGS" 1>&6
-echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
-echo "configure:8634: checking compiler flags for position-independent code" >&5
-echo "$ac_t""$PICFLAGS" 1>&6
+
+echo "$as_me:12421: result: $BLDSHARED" >&5
+echo "${ECHO_T}$BLDSHARED" >&6
+echo "$as_me:12423: checking linker flags for shared libraries" >&5
+echo $ECHO_N "checking linker flags for shared libraries... $ECHO_C" >&6
+echo "$as_me:12425: result: $LDSHFLAGS" >&5
+echo "${ECHO_T}$LDSHFLAGS" >&6
+echo "$as_me:12427: checking compiler flags for position-independent code" >&5
+echo $ECHO_N "checking compiler flags for position-independent code... $ECHO_C" >&6
+echo "$as_me:12429: result: $PICFLAGS" >&5
+echo "${ECHO_T}$PICFLAGS" >&6
# try to work out how to produce pic code with this compiler
-echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
-echo "configure:8639: checking whether ${CC-cc} accepts -fpic" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test x$PICFLAG = x; then
+ echo "$as_me:12434: checking whether ${CC-cc} accepts -fpic" >&5
+echo $ECHO_N "checking whether ${CC-cc} accepts -fpic... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_fpic+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
@@ -8648,16 +12445,17 @@ fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
-if test $ac_cv_prog_cc_fpic = yes; then
- PICFLAG="-fpic";
+echo "$as_me:12448: result: $ac_cv_prog_cc_fpic" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_fpic" >&6
+ if test $ac_cv_prog_cc_fpic = yes; then
+ PICFLAG="-fpic";
+ fi
fi
if test x$PICFLAG = x; then
- echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
-echo "configure:8659: checking whether ${CC-cc} accepts -KPIC" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:12455: checking whether ${CC-cc} accepts -KPIC" >&5
+echo $ECHO_N "checking whether ${CC-cc} accepts -KPIC... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_KPIC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
@@ -8668,17 +12466,17 @@ fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
+echo "$as_me:12469: result: $ac_cv_prog_cc_KPIC" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_KPIC" >&6
if test $ac_cv_prog_cc_KPIC = yes; then
PICFLAG="-KPIC";
fi
fi
if test x$PICFLAG = x; then
- echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
-echo "configure:8680: checking whether ${CC-cc} accepts -Kpic" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:12476: checking whether ${CC-cc} accepts -Kpic" >&5
+echo $ECHO_N "checking whether ${CC-cc} accepts -Kpic... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_Kpic+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
@@ -8689,8 +12487,8 @@ fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
+echo "$as_me:12490: result: $ac_cv_prog_cc_Kpic" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_Kpic" >&6
if test $ac_cv_prog_cc_Kpic = yes; then
PICFLAG="-Kpic";
fi
@@ -8698,38 +12496,46 @@ fi
################
-echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:8703: checking for long long" >&5
-if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12499: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${samba_cv_have_longlong+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_have_longlong=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 8712 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12509 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
-EOF
-if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12515: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12518: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12520: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12523: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_have_longlong=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_have_longlong=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_have_longlong=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_have_longlong" 1>&6
+echo "$as_me:12535: result: $samba_cv_have_longlong" >&5
+echo "${ECHO_T}$samba_cv_have_longlong" >&6
if test x"$samba_cv_have_longlong" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_LONGLONG 1
EOF
@@ -8739,90 +12545,110 @@ fi
# Check if the compiler supports the LL prefix on long long integers.
# AIX needs this.
-echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
-echo "configure:8744: checking for LL suffix on long long integers" >&5
-if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12548: checking for LL suffix on long long integers" >&5
+echo $ECHO_N "checking for LL suffix on long long integers... $ECHO_C" >&6
+if test "${samba_cv_compiler_supports_ll+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 8750 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12555 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
long long i = 0x8000000000LL
-; return 0; }
-EOF
-if { (eval echo configure:8757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12567: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12570: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12573: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12576: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_compiler_supports_ll=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_compiler_supports_ll=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_compiler_supports_ll=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
+echo "$as_me:12586: result: $samba_cv_compiler_supports_ll" >&5
+echo "${ECHO_T}$samba_cv_compiler_supports_ll" >&6
if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define COMPILER_SUPPORTS_LL 1
EOF
fi
-
-echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
-echo "configure:8779: checking for 64 bit off_t" >&5
-if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12595: checking for 64 bit off_t" >&5
+echo $ECHO_N "checking for 64 bit off_t... $ECHO_C" >&6
+if test "${samba_cv_SIZEOF_OFF_T+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_SIZEOF_OFF_T=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 8788 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12605 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
-EOF
-if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12612: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12615: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12617: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12620: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_SIZEOF_OFF_T=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_SIZEOF_OFF_T=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_SIZEOF_OFF_T=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
+echo "$as_me:12632: result: $samba_cv_SIZEOF_OFF_T" >&5
+echo "${ECHO_T}$samba_cv_SIZEOF_OFF_T" >&6
if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define SIZEOF_OFF_T 8
EOF
fi
-echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:8817: checking for off64_t" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12641: checking for off64_t" >&5
+echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
+if test "${samba_cv_HAVE_OFF64_T+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_OFF64_T=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 8826 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12651 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8831,78 +12657,94 @@ else
#include <stdio.h>
#include <sys/stat.h>
main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
-EOF
-if { (eval echo configure:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12662: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12665: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12667: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12670: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_OFF64_T=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_OFF64_T=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_OFF64_T=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
+echo "$as_me:12682: result: $samba_cv_HAVE_OFF64_T" >&5
+echo "${ECHO_T}$samba_cv_HAVE_OFF64_T" >&6
if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_OFF64_T 1
EOF
fi
-echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
-echo "configure:8859: checking for 64 bit ino_t" >&5
-if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12691: checking for 64 bit ino_t" >&5
+echo $ECHO_N "checking for 64 bit ino_t... $ECHO_C" >&6
+if test "${samba_cv_SIZEOF_INO_T+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_SIZEOF_INO_T=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 8868 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12701 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
-EOF
-if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12708: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12711: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12713: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12716: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_SIZEOF_INO_T=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_SIZEOF_INO_T=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_SIZEOF_INO_T=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
+echo "$as_me:12728: result: $samba_cv_SIZEOF_INO_T" >&5
+echo "${ECHO_T}$samba_cv_SIZEOF_INO_T" >&6
if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define SIZEOF_INO_T 8
EOF
fi
-echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
-echo "configure:8897: checking for ino64_t" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12737: checking for ino64_t" >&5
+echo $ECHO_N "checking for ino64_t... $ECHO_C" >&6
+if test "${samba_cv_HAVE_INO64_T+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_INO64_T=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 8906 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12747 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8911,40 +12753,48 @@ else
#include <stdio.h>
#include <sys/stat.h>
main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
-EOF
-if { (eval echo configure:8916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12758: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12761: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12763: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12766: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_INO64_T=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_INO64_T=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_INO64_T=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
+echo "$as_me:12778: result: $samba_cv_HAVE_INO64_T" >&5
+echo "${ECHO_T}$samba_cv_HAVE_INO64_T" >&6
if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_INO64_T 1
EOF
fi
-echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
-echo "configure:8939: checking for dev64_t" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12787: checking for dev64_t" >&5
+echo $ECHO_N "checking for dev64_t... $ECHO_C" >&6
+if test "${samba_cv_HAVE_DEV64_T+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_DEV64_T=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 8948 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12797 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8953,37 +12803,45 @@ else
#include <stdio.h>
#include <sys/stat.h>
main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
-EOF
-if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12808: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12811: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12813: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12816: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_DEV64_T=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_DEV64_T=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_DEV64_T=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
+echo "$as_me:12828: result: $samba_cv_HAVE_DEV64_T" >&5
+echo "${ECHO_T}$samba_cv_HAVE_DEV64_T" >&6
if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_DEV64_T 1
EOF
fi
-echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:8981: checking for struct dirent64" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12837: checking for struct dirent64" >&5
+echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
+if test "${samba_cv_HAVE_STRUCT_DIRENT64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 8987 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 12844 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8991,41 +12849,54 @@ cat > conftest.$ac_ext <<EOF
#endif
#include <sys/types.h>
#include <dirent.h>
-int main() {
+int
+main ()
+{
struct dirent64 de;
-; return 0; }
-EOF
-if { (eval echo configure:8999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12861: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12864: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12867: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12870: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_STRUCT_DIRENT64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_STRUCT_DIRENT64=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_STRUCT_DIRENT64=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
+echo "$as_me:12880: result: $samba_cv_HAVE_STRUCT_DIRENT64" >&5
+echo "${ECHO_T}$samba_cv_HAVE_STRUCT_DIRENT64" >&6
if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
EOF
fi
-echo $ac_n "checking for major macro""... $ac_c" 1>&6
-echo "configure:9020: checking for major macro" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12889: checking for major macro" >&5
+echo $ECHO_N "checking for major macro... $ECHO_C" >&6
+if test "${samba_cv_HAVE_DEVICE_MAJOR_FN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_DEVICE_MAJOR_FN=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9029 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12899 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9033,40 +12904,48 @@ else
#endif
#include <sys/types.h>
main() { dev_t dev; int i = major(dev); return 0; }
-EOF
-if { (eval echo configure:9038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12909: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12912: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12914: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12917: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_DEVICE_MAJOR_FN=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_DEVICE_MAJOR_FN=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_DEVICE_MAJOR_FN=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
+echo "$as_me:12929: result: $samba_cv_HAVE_DEVICE_MAJOR_FN" >&5
+echo "${ECHO_T}$samba_cv_HAVE_DEVICE_MAJOR_FN" >&6
if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_DEVICE_MAJOR_FN 1
EOF
fi
-echo $ac_n "checking for minor macro""... $ac_c" 1>&6
-echo "configure:9061: checking for minor macro" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12938: checking for minor macro" >&5
+echo $ECHO_N "checking for minor macro... $ECHO_C" >&6
+if test "${samba_cv_HAVE_DEVICE_MINOR_FN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_DEVICE_MINOR_FN=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9070 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12948 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9074,40 +12953,48 @@ else
#endif
#include <sys/types.h>
main() { dev_t dev; int i = minor(dev); return 0; }
-EOF
-if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12958: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12961: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12963: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12966: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_DEVICE_MINOR_FN=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_DEVICE_MINOR_FN=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_DEVICE_MINOR_FN=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
+echo "$as_me:12978: result: $samba_cv_HAVE_DEVICE_MINOR_FN" >&5
+echo "${ECHO_T}$samba_cv_HAVE_DEVICE_MINOR_FN" >&6
if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_DEVICE_MINOR_FN 1
EOF
fi
-echo $ac_n "checking for makedev macro""... $ac_c" 1>&6
-echo "configure:9102: checking for makedev macro" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:12987: checking for makedev macro" >&5
+echo $ECHO_N "checking for makedev macro... $ECHO_C" >&6
+if test "${samba_cv_HAVE_MAKEDEV_FN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_MAKEDEV_FN=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9111 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12997 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -9115,864 +13002,1142 @@ else
#endif
#include <sys/types.h>
main() { dev_t dev = makedev(1,2); return 0; }
-EOF
-if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13007: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13010: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13012: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13015: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_MAKEDEV_FN=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_MAKEDEV_FN=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_MAKEDEV_FN=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_MAKEDEV_FN" 1>&6
+echo "$as_me:13027: result: $samba_cv_HAVE_MAKEDEV_FN" >&5
+echo "${ECHO_T}$samba_cv_HAVE_MAKEDEV_FN" >&6
if test x"$samba_cv_HAVE_MAKEDEV_FN" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define MAKEDEV_FN 1
EOF
fi
-echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
-echo "configure:9143: checking for unsigned char" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13036: checking for unsigned char" >&5
+echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UNSIGNED_CHAR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_UNSIGNED_CHAR=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9152 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13046 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { char c; c=250; exit((c > 0)?0:1); }
-EOF
-if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13052: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13055: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13057: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13060: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UNSIGNED_CHAR=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_UNSIGNED_CHAR=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UNSIGNED_CHAR=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
+echo "$as_me:13072: result: $samba_cv_HAVE_UNSIGNED_CHAR" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UNSIGNED_CHAR" >&6
if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UNSIGNED_CHAR 1
EOF
fi
-echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
-echo "configure:9180: checking for sin_len in sock" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13081: checking for sin_len in sock" >&5
+echo $ECHO_N "checking for sin_len in sock... $ECHO_C" >&6
+if test "${samba_cv_HAVE_SOCK_SIN_LEN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9186 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13088 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-int main() {
+int
+main ()
+{
struct sockaddr_in sock; sock.sin_len = sizeof(sock);
-; return 0; }
-EOF
-if { (eval echo configure:9195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13102: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13105: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13108: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13111: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_SOCK_SIN_LEN=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_SOCK_SIN_LEN=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_SOCK_SIN_LEN=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
+echo "$as_me:13121: result: $samba_cv_HAVE_SOCK_SIN_LEN" >&5
+echo "${ECHO_T}$samba_cv_HAVE_SOCK_SIN_LEN" >&6
if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SOCK_SIN_LEN 1
EOF
fi
-echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
-echo "configure:9216: checking whether seekdir returns void" >&5
-if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13130: checking whether seekdir returns void" >&5
+echo $ECHO_N "checking whether seekdir returns void... $ECHO_C" >&6
+if test "${samba_cv_SEEKDIR_RETURNS_VOID+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9222 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13137 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
void seekdir(DIR *d, long loc) { return; }
-int main() {
+int
+main ()
+{
return 0;
-; return 0; }
-EOF
-if { (eval echo configure:9231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13151: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13154: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13157: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13160: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_SEEKDIR_RETURNS_VOID=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_SEEKDIR_RETURNS_VOID=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_SEEKDIR_RETURNS_VOID=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
+echo "$as_me:13170: result: $samba_cv_SEEKDIR_RETURNS_VOID" >&5
+echo "${ECHO_T}$samba_cv_SEEKDIR_RETURNS_VOID" >&6
if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define SEEKDIR_RETURNS_VOID 1
EOF
fi
-echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
-echo "configure:9252: checking for __FILE__ macro" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13179: checking for __FILE__ macro" >&5
+echo $ECHO_N "checking for __FILE__ macro... $ECHO_C" >&6
+if test "${samba_cv_HAVE_FILE_MACRO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9258 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13186 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
printf("%s\n", __FILE__);
-; return 0; }
-EOF
-if { (eval echo configure:9265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13198: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13201: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13204: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13207: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_FILE_MACRO=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_FILE_MACRO=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_FILE_MACRO=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
+echo "$as_me:13217: result: $samba_cv_HAVE_FILE_MACRO" >&5
+echo "${ECHO_T}$samba_cv_HAVE_FILE_MACRO" >&6
if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_FILE_MACRO 1
EOF
fi
-echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
-echo "configure:9286: checking for __FUNCTION__ macro" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13226: checking for __FUNCTION__ macro" >&5
+echo $ECHO_N "checking for __FUNCTION__ macro... $ECHO_C" >&6
+if test "${samba_cv_HAVE_FUNCTION_MACRO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9292 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13233 "configure"
#include "confdefs.h"
#include <stdio.h>
-int main() {
+int
+main ()
+{
printf("%s\n", __FUNCTION__);
-; return 0; }
-EOF
-if { (eval echo configure:9299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13245: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13248: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13251: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13254: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_FUNCTION_MACRO=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_FUNCTION_MACRO=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_FUNCTION_MACRO=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
+echo "$as_me:13264: result: $samba_cv_HAVE_FUNCTION_MACRO" >&5
+echo "${ECHO_T}$samba_cv_HAVE_FUNCTION_MACRO" >&6
if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_FUNCTION_MACRO 1
EOF
fi
-echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
-echo "configure:9320: checking if gettimeofday takes tz argument" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13273: checking if gettimeofday takes tz argument" >&5
+echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6
+if test "${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9329 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13283 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <unistd.h>
main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
-EOF
-if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13291: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13294: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13296: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13299: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_GETTIMEOFDAY_TZ=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_GETTIMEOFDAY_TZ=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
+echo "$as_me:13311: result: $samba_cv_HAVE_GETTIMEOFDAY_TZ" >&5
+echo "${ECHO_T}$samba_cv_HAVE_GETTIMEOFDAY_TZ" >&6
if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_GETTIMEOFDAY_TZ 1
EOF
fi
-echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
-echo "configure:9359: checking for C99 vsnprintf" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13320: checking for C99 vsnprintf" >&5
+echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6
+if test "${samba_cv_HAVE_C99_VSNPRINTF+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_C99_VSNPRINTF=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9368 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13330 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <stdarg.h>
-void foo(const char *format, ...) {
- va_list ap;
- int len;
- char buf[5];
+void foo(const char *format, ...) {
+ va_list ap;
+ int len;
+ char buf[5];
+
+ va_start(ap, format);
+ len = vsnprintf(buf, 0, format, ap);
+ va_end(ap);
+ if (len != 5) exit(1);
- va_start(ap, format);
- len = vsnprintf(0, 0, format, ap);
- va_end(ap);
- if (len != 5) exit(1);
+ va_start(ap, format);
+ len = vsnprintf(0, 0, format, ap);
+ va_end(ap);
+ if (len != 5) exit(1);
- if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
+ if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
- exit(0);
+ exit(0);
}
main() { foo("hello"); }
-EOF
-if { (eval echo configure:9390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13358: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13361: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13363: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13366: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_C99_VSNPRINTF=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_C99_VSNPRINTF=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_C99_VSNPRINTF=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
+echo "$as_me:13378: result: $samba_cv_HAVE_C99_VSNPRINTF" >&5
+echo "${ECHO_T}$samba_cv_HAVE_C99_VSNPRINTF" >&6
if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_C99_VSNPRINTF 1
EOF
fi
-echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
-echo "configure:9413: checking for broken readdir" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13387: checking for broken readdir" >&5
+echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6
+if test "${samba_cv_HAVE_BROKEN_READDIR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_READDIR=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9422 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13397 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
-di->d_name[0] == 0) exit(0); exit(1);}
-EOF
-if { (eval echo configure:9430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+di->d_name[0] == 0) exit(0); exit(1);}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13406: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13409: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13411: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13414: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_BROKEN_READDIR=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_BROKEN_READDIR=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_BROKEN_READDIR=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
+echo "$as_me:13426: result: $samba_cv_HAVE_BROKEN_READDIR" >&5
+echo "${ECHO_T}$samba_cv_HAVE_BROKEN_READDIR" >&6
if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_READDIR 1
EOF
fi
-echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
-echo "configure:9453: checking for utimbuf" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13435: checking for utimbuf" >&5
+echo $ECHO_N "checking for utimbuf... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UTIMBUF+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9459 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13442 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utime.h>
-int main() {
+int
+main ()
+{
struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
-; return 0; }
-EOF
-if { (eval echo configure:9467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13455: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13458: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13461: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13464: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UTIMBUF=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UTIMBUF=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UTIMBUF=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
+echo "$as_me:13474: result: $samba_cv_HAVE_UTIMBUF" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UTIMBUF" >&6
if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UTIMBUF 1
EOF
fi
-
for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9491: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 9496 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:13486: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13492 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13523: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13526: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13529: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13532: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:13542: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:9519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-
-echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
-echo "configure:9545: checking for ut_name in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13552: checking for ut_name in utmp" >&5
+echo $ECHO_N "checking for ut_name in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_NAME+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9551 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13559 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_name[0] = 'a';
-; return 0; }
-EOF
-if { (eval echo configure:9559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13572: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13575: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13578: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13581: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_NAME=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_NAME=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_NAME=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
+echo "$as_me:13591: result: $samba_cv_HAVE_UT_UT_NAME" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_NAME" >&6
if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_NAME 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
-echo "configure:9580: checking for ut_user in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13600: checking for ut_user in utmp" >&5
+echo $ECHO_N "checking for ut_user in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_USER+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9586 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13607 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_user[0] = 'a';
-; return 0; }
-EOF
-if { (eval echo configure:9594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13620: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13623: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13626: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13629: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_USER=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_USER=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_USER=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
+echo "$as_me:13639: result: $samba_cv_HAVE_UT_UT_USER" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_USER" >&6
if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_USER 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
-echo "configure:9615: checking for ut_id in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13648: checking for ut_id in utmp" >&5
+echo $ECHO_N "checking for ut_id in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_ID+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9621 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13655 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_id[0] = 'a';
-; return 0; }
-EOF
-if { (eval echo configure:9629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13668: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13671: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13674: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13677: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_ID=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_ID=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_ID=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
+echo "$as_me:13687: result: $samba_cv_HAVE_UT_UT_ID" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_ID" >&6
if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_ID 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
-echo "configure:9650: checking for ut_host in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13696: checking for ut_host in utmp" >&5
+echo $ECHO_N "checking for ut_host in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_HOST+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9656 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13703 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_host[0] = 'a';
-; return 0; }
-EOF
-if { (eval echo configure:9664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13716: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13719: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13722: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13725: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_HOST=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_HOST=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_HOST=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
+echo "$as_me:13735: result: $samba_cv_HAVE_UT_UT_HOST" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_HOST" >&6
if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_HOST 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
-echo "configure:9685: checking for ut_time in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13744: checking for ut_time in utmp" >&5
+echo $ECHO_N "checking for ut_time in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_TIME+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9691 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13751 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; time_t t; ut.ut_time = t;
-; return 0; }
-EOF
-if { (eval echo configure:9699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13764: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13767: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13770: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13773: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_TIME=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_TIME=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_TIME=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
+echo "$as_me:13783: result: $samba_cv_HAVE_UT_UT_TIME" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TIME" >&6
if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_TIME 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
-echo "configure:9720: checking for ut_tv in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13792: checking for ut_tv in utmp" >&5
+echo $ECHO_N "checking for ut_tv in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_TV+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9726 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13799 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; struct timeval tv; ut.ut_tv = tv;
-; return 0; }
-EOF
-if { (eval echo configure:9734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13812: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13815: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13818: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13821: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_TV=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_TV=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_TV=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
+echo "$as_me:13831: result: $samba_cv_HAVE_UT_UT_TV" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TV" >&6
if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_TV 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
-echo "configure:9755: checking for ut_type in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13840: checking for ut_type in utmp" >&5
+echo $ECHO_N "checking for ut_type in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_TYPE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9761 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13847 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_type = 0;
-; return 0; }
-EOF
-if { (eval echo configure:9769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13860: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13863: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13866: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13869: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_TYPE=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_TYPE=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_TYPE=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
+echo "$as_me:13879: result: $samba_cv_HAVE_UT_UT_TYPE" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_TYPE" >&6
if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_TYPE 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
-echo "configure:9790: checking for ut_pid in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13888: checking for ut_pid in utmp" >&5
+echo $ECHO_N "checking for ut_pid in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_PID+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9796 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13895 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_pid = 0;
-; return 0; }
-EOF
-if { (eval echo configure:9804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13908: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13911: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13914: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13917: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_PID=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_PID=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_PID=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
+echo "$as_me:13927: result: $samba_cv_HAVE_UT_UT_PID" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_PID" >&6
if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_PID 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
-echo "configure:9825: checking for ut_exit in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13936: checking for ut_exit in utmp" >&5
+echo $ECHO_N "checking for ut_exit in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_EXIT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9831 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13943 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_exit.e_exit = 0;
-; return 0; }
-EOF
-if { (eval echo configure:9839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13956: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13959: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13962: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13965: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_EXIT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_EXIT=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_EXIT=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
+echo "$as_me:13975: result: $samba_cv_HAVE_UT_UT_EXIT" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_EXIT" >&6
if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_EXIT 1
EOF
-fi
+fi
-echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
-echo "configure:9860: checking for ut_addr in utmp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:13984: checking for ut_addr in utmp" >&5
+echo $ECHO_N "checking for ut_addr in utmp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UT_UT_ADDR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9866 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 13991 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp ut; ut.ut_addr = 0;
-; return 0; }
-EOF
-if { (eval echo configure:9874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14004: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14007: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14010: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14013: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UT_UT_ADDR=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UT_UT_ADDR=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UT_UT_ADDR=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
+echo "$as_me:14023: result: $samba_cv_HAVE_UT_UT_ADDR" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UT_UT_ADDR" >&6
if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UT_UT_ADDR 1
EOF
-fi
+fi
if test x$ac_cv_func_pututline = xyes ; then
- echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
-echo "configure:9896: checking whether pututline returns pointer" >&5
-if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:14033: checking whether pututline returns pointer" >&5
+echo $ECHO_N "checking whether pututline returns pointer... $ECHO_C" >&6
+if test "${samba_cv_PUTUTLINE_RETURNS_UTMP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 9902 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14040 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
-int main() {
+int
+main ()
+{
struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
-; return 0; }
-EOF
-if { (eval echo configure:9910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14053: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14056: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14059: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14062: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_PUTUTLINE_RETURNS_UTMP=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_PUTUTLINE_RETURNS_UTMP=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_PUTUTLINE_RETURNS_UTMP=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
+echo "$as_me:14072: result: $samba_cv_PUTUTLINE_RETURNS_UTMP" >&5
+echo "${ECHO_T}$samba_cv_PUTUTLINE_RETURNS_UTMP" >&6
if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define PUTUTLINE_RETURNS_UTMP 1
EOF
fi
fi
-echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
-echo "configure:9932: checking for ut_syslen in utmpx" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14082: checking for ut_syslen in utmpx" >&5
+echo $ECHO_N "checking for ut_syslen in utmpx... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UX_UT_SYSLEN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 9938 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14089 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmpx.h>
-int main() {
+int
+main ()
+{
struct utmpx ux; ux.ut_syslen = 0;
-; return 0; }
-EOF
-if { (eval echo configure:9946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14102: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14105: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14108: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14111: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UX_UT_SYSLEN=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UX_UT_SYSLEN=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UX_UT_SYSLEN=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
+echo "$as_me:14121: result: $samba_cv_HAVE_UX_UT_SYSLEN" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UX_UT_SYSLEN" >&6
if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UX_UT_SYSLEN 1
EOF
-fi
+fi
-echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
-echo "configure:9967: checking for Linux kernel oplocks" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14130: checking for Linux kernel oplocks" >&5
+echo $ECHO_N "checking for Linux kernel oplocks... $ECHO_C" >&6
+if test "${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 9976 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14140 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -9985,40 +14150,48 @@ main() {
return fcntl(fd, F_GETLEASE, 0) == -1;
}
-EOF
-if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14155: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14158: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14160: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14163: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
+echo "$as_me:14175: result: $samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" >&5
+echo "${ECHO_T}$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" >&6
if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_OPLOCKS_LINUX 1
EOF
fi
-echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
-echo "configure:10013: checking for kernel change notify support" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14184: checking for kernel change notify support" >&5
+echo $ECHO_N "checking for kernel change notify support... $ECHO_C" >&6
+if test "${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10022 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14194 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -10031,40 +14204,48 @@ main() {
exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0);
}
-EOF
-if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14209: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14212: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14214: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14217: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
+echo "$as_me:14229: result: $samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&5
+echo "${ECHO_T}$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" >&6
if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_CHANGE_NOTIFY 1
EOF
fi
-echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
-echo "configure:10059: checking for kernel share modes" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14238: checking for kernel share modes" >&5
+echo $ECHO_N "checking for kernel share modes... $ECHO_C" >&6
+if test "${samba_cv_HAVE_KERNEL_SHARE_MODES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_SHARE_MODES=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10068 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14248 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -10079,78 +14260,96 @@ main() {
exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
}
-EOF
-if { (eval echo configure:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14265: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14268: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14270: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14273: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_KERNEL_SHARE_MODES=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_KERNEL_SHARE_MODES=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_KERNEL_SHARE_MODES=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
+echo "$as_me:14285: result: $samba_cv_HAVE_KERNEL_SHARE_MODES" >&5
+echo "${ECHO_T}$samba_cv_HAVE_KERNEL_SHARE_MODES" >&6
if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_SHARE_MODES 1
EOF
fi
-
-
-
-echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
-echo "configure:10110: checking for IRIX kernel oplock type definitions" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14294: checking for IRIX kernel oplock type definitions" >&5
+echo $ECHO_N "checking for IRIX kernel oplock type definitions... $ECHO_C" >&6
+if test "${samba_cv_HAVE_KERNEL_OPLOCKS_IRIX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 10116 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14301 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <fcntl.h>
-int main() {
+int
+main ()
+{
oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
-; return 0; }
-EOF
-if { (eval echo configure:10124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14314: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14317: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14320: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14323: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
+echo "$as_me:14333: result: $samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&5
+echo "${ECHO_T}$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" >&6
if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_KERNEL_OPLOCKS_IRIX 1
EOF
fi
-echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
-echo "configure:10145: checking for irix specific capabilities" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14342: checking for irix specific capabilities" >&5
+echo $ECHO_N "checking for irix specific capabilities... $ECHO_C" >&6
+if test "${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10154 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14352 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/capability.h>
@@ -10164,24 +14363,32 @@ main() {
exit(0);
}
-EOF
-if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14368: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14371: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14373: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14376: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
+echo "$as_me:14388: result: $samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&5
+echo "${ECHO_T}$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&6
if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
EOF
@@ -10192,163 +14399,214 @@ fi
# This is *really* broken but some systems (DEC OSF1) do this.... JRA.
#
-echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10197: checking for int16 typedef included by rpc/rpc.h" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14402: checking for int16 typedef included by rpc/rpc.h" >&5
+echo $ECHO_N "checking for int16 typedef included by rpc/rpc.h... $ECHO_C" >&6
+if test "${samba_cv_HAVE_INT16_FROM_RPC_RPC_H+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 10203 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14409 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
-int main() {
+int
+main ()
+{
int16 testvar;
-; return 0; }
-EOF
-if { (eval echo configure:10213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14424: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14427: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14430: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14433: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
+echo "$as_me:14443: result: $samba_cv_HAVE_INT16_FROM_RPC_RPC_H" >&5
+echo "${ECHO_T}$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_INT16_FROM_RPC_RPC_H 1
EOF
fi
-echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10234: checking for uint16 typedef included by rpc/rpc.h" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14452: checking for uint16 typedef included by rpc/rpc.h" >&5
+echo $ECHO_N "checking for uint16 typedef included by rpc/rpc.h... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UINT16_FROM_RPC_RPC_H+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 10240 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14459 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
-int main() {
+int
+main ()
+{
uint16 testvar;
-; return 0; }
-EOF
-if { (eval echo configure:10250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14474: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14477: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14480: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14483: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
+echo "$as_me:14493: result: $samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UINT16_FROM_RPC_RPC_H 1
EOF
fi
-echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10271: checking for int32 typedef included by rpc/rpc.h" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14502: checking for int32 typedef included by rpc/rpc.h" >&5
+echo $ECHO_N "checking for int32 typedef included by rpc/rpc.h... $ECHO_C" >&6
+if test "${samba_cv_HAVE_INT32_FROM_RPC_RPC_H+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 10277 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14509 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
-int main() {
+int
+main ()
+{
int32 testvar;
-; return 0; }
-EOF
-if { (eval echo configure:10287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14524: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14527: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14530: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14533: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
+echo "$as_me:14543: result: $samba_cv_HAVE_INT32_FROM_RPC_RPC_H" >&5
+echo "${ECHO_T}$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_INT32_FROM_RPC_RPC_H 1
EOF
fi
-echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10308: checking for uint32 typedef included by rpc/rpc.h" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14552: checking for uint32 typedef included by rpc/rpc.h" >&5
+echo $ECHO_N "checking for uint32 typedef included by rpc/rpc.h... $ECHO_C" >&6
+if test "${samba_cv_HAVE_UINT32_FROM_RPC_RPC_H+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 10314 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14559 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
-int main() {
+int
+main ()
+{
uint32 testvar;
-; return 0; }
-EOF
-if { (eval echo configure:10324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14574: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14577: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14580: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14583: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
+echo "$as_me:14593: result: $samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" >&5
+echo "${ECHO_T}$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" >&6
if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UINT32_FROM_RPC_RPC_H 1
EOF
fi
-
-echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:10346: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14602: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
+echo $ECHO_N "checking for conflicting AUTH_ERROR define in rpc/rpc.h... $ECHO_C" >&6
+if test "${samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 10352 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 14609 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_SECURITY_H
@@ -10358,135 +14616,176 @@ cat > conftest.$ac_ext <<EOF
#if defined(HAVE_RPC_RPC_H)
#include <rpc/rpc.h>
#endif
-int main() {
+int
+main ()
+{
int testvar;
-; return 0; }
-EOF
-if { (eval echo configure:10366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14628: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14631: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14634: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14637: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
+echo "$as_me:14647: result: $samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" >&5
+echo "${ECHO_T}$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" >&6
if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_RPC_AUTH_ERROR_CONFLICT 1
EOF
fi
-echo $ac_n "checking for test routines""... $ac_c" 1>&6
-echo "configure:10387: checking for test routines" >&5
+echo "$as_me:14656: checking for test routines" >&5
+echo $ECHO_N "checking for test routines... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
- echo "configure: warning: cannot run when cross-compiling" 1>&2
+ { echo "$as_me:14659: WARNING: cannot run when cross-compiling" >&5
+echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
- cat > conftest.$ac_ext <<EOF
-#line 10392 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14663 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/trivial.c"
-EOF
-if { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- echo "$ac_t""yes" 1>&6
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14668: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14671: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14673: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14676: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:14678: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:14684: error: cant find test code. Aborting config" >&5
+echo "$as_me: error: cant find test code. Aborting config" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:14691: checking for ftruncate extend" >&5
+echo $ECHO_N "checking for ftruncate extend... $ECHO_C" >&6
+if test "${samba_cv_HAVE_FTRUNCATE_EXTEND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
-fi
-rm -fr conftest*
-fi
-
-echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
-echo "configure:10410: checking for ftruncate extend" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
if test "$cross_compiling" = yes; then
samba_cv_HAVE_FTRUNCATE_EXTEND=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10419 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14701 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncate.c"
-EOF
-if { (eval echo configure:10423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14709: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14711: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14714: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_FTRUNCATE_EXTEND=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_FTRUNCATE_EXTEND=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_FTRUNCATE_EXTEND=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
+echo "$as_me:14726: result: $samba_cv_HAVE_FTRUNCATE_EXTEND" >&5
+echo "${ECHO_T}$samba_cv_HAVE_FTRUNCATE_EXTEND" >&6
if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_FTRUNCATE_EXTEND 1
EOF
fi
-echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
-echo "configure:10446: checking for broken getgroups" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14735: checking for broken getgroups" >&5
+echo $ECHO_N "checking for broken getgroups... $ECHO_C" >&6
+if test "${samba_cv_HAVE_BROKEN_GETGROUPS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_GETGROUPS=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10455 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14745 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/getgroups.c"
-EOF
-if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14750: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14753: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14755: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14758: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_BROKEN_GETGROUPS=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_BROKEN_GETGROUPS=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_BROKEN_GETGROUPS=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
+echo "$as_me:14770: result: $samba_cv_HAVE_BROKEN_GETGROUPS" >&5
+echo "${ECHO_T}$samba_cv_HAVE_BROKEN_GETGROUPS" >&6
if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_GETGROUPS 1
EOF
fi
-echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
-echo "configure:10482: checking whether getpass should be replaced" >&5
-if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14779: checking whether getpass should be replaced" >&5
+echo $ECHO_N "checking whether getpass should be replaced... $ECHO_C" >&6
+if test "${samba_cv_REPLACE_GETPASS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
-cat > conftest.$ac_ext <<EOF
-#line 10490 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 14788 "configure"
#include "confdefs.h"
#define REPLACE_GETPASS 1
@@ -10495,43 +14794,56 @@ cat > conftest.$ac_ext <<EOF
#include "${srcdir-.}/lib/getsmbpass.c"
#undef main
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:10503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:14806: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14809: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:14812: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14815: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_REPLACE_GETPASS=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_REPLACE_GETPASS=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_REPLACE_GETPASS=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$SAVE_CPPFLAGS"
fi
-
-echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
+echo "$as_me:14827: result: $samba_cv_REPLACE_GETPASS" >&5
+echo "${ECHO_T}$samba_cv_REPLACE_GETPASS" >&6
if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define REPLACE_GETPASS 1
EOF
fi
-echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
-echo "configure:10526: checking for broken inet_ntoa" >&5
-if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14836: checking for broken inet_ntoa" >&5
+echo $ECHO_N "checking for broken inet_ntoa... $ECHO_C" >&6
+if test "${samba_cv_REPLACE_INET_NTOA+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_REPLACE_INET_NTOA=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10535 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14846 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -10542,234 +14854,283 @@ else
#endif
main() { struct in_addr ip; ip.s_addr = 0x12345678;
if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
- strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
+ strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
exit(1);}
-EOF
-if { (eval echo configure:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14861: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14864: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14866: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14869: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_REPLACE_INET_NTOA=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_REPLACE_INET_NTOA=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_REPLACE_INET_NTOA=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
+echo "$as_me:14881: result: $samba_cv_REPLACE_INET_NTOA" >&5
+echo "${ECHO_T}$samba_cv_REPLACE_INET_NTOA" >&6
if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define REPLACE_INET_NTOA 1
EOF
fi
-echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
-echo "configure:10572: checking for secure mkstemp" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14890: checking for secure mkstemp" >&5
+echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6
+if test "${samba_cv_HAVE_SECURE_MKSTEMP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_SECURE_MKSTEMP=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10581 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14900 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-main() {
+main() {
struct stat st;
- char tpl[20]="/tmp/test.XXXXXX";
- int fd = mkstemp(tpl);
+ char tpl[20]="/tmp/test.XXXXXX";
+ int fd = mkstemp(tpl);
if (fd == -1) exit(1);
unlink(tpl);
if (fstat(fd, &st) != 0) exit(1);
if ((st.st_mode & 0777) != 0600) exit(1);
exit(0);
}
-EOF
-if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14918: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14921: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14923: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14926: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_SECURE_MKSTEMP=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_SECURE_MKSTEMP=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_SECURE_MKSTEMP=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
+echo "$as_me:14938: result: $samba_cv_HAVE_SECURE_MKSTEMP" >&5
+echo "${ECHO_T}$samba_cv_HAVE_SECURE_MKSTEMP" >&6
if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_SECURE_MKSTEMP 1
EOF
fi
-echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
-echo "configure:10621: checking for sysconf(_SC_NGROUPS_MAX)" >&5
-if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14947: checking for sysconf(_SC_NGROUPS_MAX)" >&5
+echo $ECHO_N "checking for sysconf(_SC_NGROUPS_MAX)... $ECHO_C" >&6
+if test "${samba_cv_SYSCONF_SC_NGROUPS_MAX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10630 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 14957 "configure"
#include "confdefs.h"
#include <unistd.h>
main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
-EOF
-if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:14963: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:14966: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:14968: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:14971: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_SYSCONF_SC_NGROUPS_MAX=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_SYSCONF_SC_NGROUPS_MAX=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
+echo "$as_me:14983: result: $samba_cv_SYSCONF_SC_NGROUPS_MAX" >&5
+echo "${ECHO_T}$samba_cv_SYSCONF_SC_NGROUPS_MAX" >&6
if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define SYSCONF_SC_NGROUPS_MAX 1
EOF
fi
-echo $ac_n "checking for root""... $ac_c" 1>&6
-echo "configure:10658: checking for root" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:14992: checking for root" >&5
+echo $ECHO_N "checking for root... $ECHO_C" >&6
+if test "${samba_cv_HAVE_ROOT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_ROOT=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10667 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15002 "configure"
#include "confdefs.h"
main() { exit(getuid() != 0); }
-EOF
-if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15007: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15010: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15012: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15015: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_ROOT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_ROOT=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_ROOT=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
+echo "$as_me:15027: result: $samba_cv_HAVE_ROOT" >&5
+echo "${ECHO_T}$samba_cv_HAVE_ROOT" >&6
if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_ROOT 1
EOF
else
- echo "configure: warning: running as non-root will disable some tests" 1>&2
+ { echo "$as_me:15035: WARNING: running as non-root will disable some tests" >&5
+echo "$as_me: WARNING: running as non-root will disable some tests" >&2;}
fi
##################
# look for a method of finding the list of network interfaces
iface=no;
-echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
-echo "configure:10699: checking for iface AIX" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15042: checking for iface AIX" >&5
+echo $ECHO_N "checking for iface AIX... $ECHO_C" >&6
+if test "${samba_cv_HAVE_IFACE_AIX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_AIX=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10708 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15052 "configure"
#include "confdefs.h"
#define HAVE_IFACE_AIX 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
-EOF
-if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15061: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15064: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15066: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15069: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_IFACE_AIX=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_IFACE_AIX=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_IFACE_AIX=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
+echo "$as_me:15081: result: $samba_cv_HAVE_IFACE_AIX" >&5
+echo "${ECHO_T}$samba_cv_HAVE_IFACE_AIX" >&6
if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
- iface=yes;cat >> confdefs.h <<\EOF
+ iface=yes;cat >>confdefs.h <<\EOF
#define HAVE_IFACE_AIX 1
EOF
fi
if test $iface = no; then
-echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
-echo "configure:10740: checking for iface ifconf" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15091: checking for iface ifconf" >&5
+echo $ECHO_N "checking for iface ifconf... $ECHO_C" >&6
+if test "${samba_cv_HAVE_IFACE_IFCONF+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFCONF=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10749 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15101 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFCONF 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
-EOF
-if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15110: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15113: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15115: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15118: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_IFACE_IFCONF=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_IFACE_IFCONF=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_IFACE_IFCONF=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
+echo "$as_me:15130: result: $samba_cv_HAVE_IFACE_IFCONF" >&5
+echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFCONF" >&6
if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
- iface=yes;cat >> confdefs.h <<\EOF
+ iface=yes;cat >>confdefs.h <<\EOF
#define HAVE_IFACE_IFCONF 1
EOF
@@ -10777,130 +15138,152 @@ fi
fi
if test $iface = no; then
-echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
-echo "configure:10782: checking for iface ifreq" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15141: checking for iface ifreq" >&5
+echo $ECHO_N "checking for iface ifreq... $ECHO_C" >&6
+if test "${samba_cv_HAVE_IFACE_IFREQ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFREQ=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10791 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15151 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFREQ 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
-EOF
-if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15163: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15165: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15168: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_IFACE_IFREQ=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_IFACE_IFREQ=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_IFACE_IFREQ=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
+echo "$as_me:15180: result: $samba_cv_HAVE_IFACE_IFREQ" >&5
+echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFREQ" >&6
if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
- iface=yes;cat >> confdefs.h <<\EOF
+ iface=yes;cat >>confdefs.h <<\EOF
#define HAVE_IFACE_IFREQ 1
EOF
fi
fi
-
################################################
# look for a method of setting the effective uid
seteuid=no;
if test $seteuid = no; then
-echo $ac_n "checking for setresuid""... $ac_c" 1>&6
-echo "configure:10828: checking for setresuid" >&5
-if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15194: checking for setresuid" >&5
+echo $ECHO_N "checking for setresuid... $ECHO_C" >&6
+if test "${samba_cv_USE_SETRESUID+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_USE_SETRESUID=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10837 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15204 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#define USE_SETRESUID 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
-EOF
-if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15213: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15216: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15218: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15221: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_USE_SETRESUID=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_USE_SETRESUID=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_USE_SETRESUID=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
+echo "$as_me:15233: result: $samba_cv_USE_SETRESUID" >&5
+echo "${ECHO_T}$samba_cv_USE_SETRESUID" >&6
if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
- seteuid=yes;cat >> confdefs.h <<\EOF
+ seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETRESUID 1
EOF
fi
fi
-
if test $seteuid = no; then
-echo $ac_n "checking for setreuid""... $ac_c" 1>&6
-echo "configure:10871: checking for setreuid" >&5
-if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15244: checking for setreuid" >&5
+echo $ECHO_N "checking for setreuid... $ECHO_C" >&6
+if test "${samba_cv_USE_SETREUID+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_USE_SETREUID=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10880 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15254 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#define USE_SETREUID 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
-EOF
-if { (eval echo configure:10888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15263: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15266: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15268: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15271: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_USE_SETREUID=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_USE_SETREUID=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_USE_SETREUID=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
+echo "$as_me:15283: result: $samba_cv_USE_SETREUID" >&5
+echo "${ECHO_T}$samba_cv_USE_SETREUID" >&6
if test x"$samba_cv_USE_SETREUID" = x"yes"; then
- seteuid=yes;cat >> confdefs.h <<\EOF
+ seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETREUID 1
EOF
@@ -10908,41 +15291,49 @@ fi
fi
if test $seteuid = no; then
-echo $ac_n "checking for seteuid""... $ac_c" 1>&6
-echo "configure:10913: checking for seteuid" >&5
-if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15294: checking for seteuid" >&5
+echo $ECHO_N "checking for seteuid... $ECHO_C" >&6
+if test "${samba_cv_USE_SETEUID+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_USE_SETEUID=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10922 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15304 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#define USE_SETEUID 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
-EOF
-if { (eval echo configure:10930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15313: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15316: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15318: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15321: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_USE_SETEUID=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_USE_SETEUID=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_USE_SETEUID=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
+echo "$as_me:15333: result: $samba_cv_USE_SETEUID" >&5
+echo "${ECHO_T}$samba_cv_USE_SETEUID" >&6
if test x"$samba_cv_USE_SETEUID" = x"yes"; then
- seteuid=yes;cat >> confdefs.h <<\EOF
+ seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETEUID 1
EOF
@@ -10950,205 +15341,242 @@ fi
fi
if test $seteuid = no; then
-echo $ac_n "checking for setuidx""... $ac_c" 1>&6
-echo "configure:10955: checking for setuidx" >&5
-if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15344: checking for setuidx" >&5
+echo $ECHO_N "checking for setuidx... $ECHO_C" >&6
+if test "${samba_cv_USE_SETUIDX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_USE_SETUIDX=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 10964 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15354 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
#define USE_SETUIDX 1
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
-EOF
-if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15363: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15366: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15368: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15371: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_USE_SETUIDX=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_USE_SETUIDX=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_USE_SETUIDX=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
+echo "$as_me:15383: result: $samba_cv_USE_SETUIDX" >&5
+echo "${ECHO_T}$samba_cv_USE_SETUIDX" >&6
if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
- seteuid=yes;cat >> confdefs.h <<\EOF
+ seteuid=yes;cat >>confdefs.h <<\EOF
#define USE_SETUIDX 1
EOF
fi
fi
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:10997: checking for working mmap" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15393: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${samba_cv_HAVE_MMAP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_MMAP=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 11006 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15403 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/shared_mmap.c"
-EOF
-if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15408: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15411: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15413: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15416: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_MMAP=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_MMAP=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_MMAP=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
+echo "$as_me:15428: result: $samba_cv_HAVE_MMAP" >&5
+echo "${ECHO_T}$samba_cv_HAVE_MMAP" >&6
if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_MMAP 1
EOF
fi
-echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
-echo "configure:11033: checking for ftruncate needs root" >&5
-if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15437: checking for ftruncate needs root" >&5
+echo $ECHO_N "checking for ftruncate needs root... $ECHO_C" >&6
+if test "${samba_cv_FTRUNCATE_NEEDS_ROOT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_FTRUNCATE_NEEDS_ROOT=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 11042 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15447 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncroot.c"
-EOF
-if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15452: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15455: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15457: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15460: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_FTRUNCATE_NEEDS_ROOT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_FTRUNCATE_NEEDS_ROOT=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_FTRUNCATE_NEEDS_ROOT=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
+echo "$as_me:15472: result: $samba_cv_FTRUNCATE_NEEDS_ROOT" >&5
+echo "${ECHO_T}$samba_cv_FTRUNCATE_NEEDS_ROOT" >&6
if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define FTRUNCATE_NEEDS_ROOT 1
EOF
fi
-echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
-echo "configure:11069: checking for fcntl locking" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15481: checking for fcntl locking" >&5
+echo $ECHO_N "checking for fcntl locking... $ECHO_C" >&6
+if test "${samba_cv_HAVE_FCNTL_LOCK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_FCNTL_LOCK=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 11078 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15491 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock.c"
-EOF
-if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15496: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15499: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15501: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15504: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_FCNTL_LOCK=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_FCNTL_LOCK=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_FCNTL_LOCK=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
+echo "$as_me:15516: result: $samba_cv_HAVE_FCNTL_LOCK" >&5
+echo "${ECHO_T}$samba_cv_HAVE_FCNTL_LOCK" >&6
if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_FCNTL_LOCK 1
EOF
fi
-echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:11105: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15525: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
+echo $ECHO_N "checking for broken (glibc2.1/x86) 64 bit fcntl locking... $ECHO_C" >&6
+if test "${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 11114 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15535 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock64.c"
-EOF
-if { (eval echo configure:11118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15540: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15543: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15545: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15548: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
+echo "$as_me:15560: result: $samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" >&5
+echo "${ECHO_T}$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" >&6
if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_BROKEN_FCNTL64_LOCKS 1
EOF
-
else
-
- echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:11143: checking for 64 bit fcntl locking" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:15569: checking for 64 bit fcntl locking" >&5
+echo $ECHO_N "checking for 64 bit fcntl locking... $ECHO_C" >&6
+if test "${samba_cv_HAVE_STRUCT_FLOCK64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_STRUCT_FLOCK64=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 11152 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15579 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -11171,77 +15599,98 @@ exit(0);
exit(1);
#endif
}
-EOF
-if { (eval echo configure:11176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15604: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15607: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15609: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15612: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_STRUCT_FLOCK64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_STRUCT_FLOCK64=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_STRUCT_FLOCK64=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
+echo "$as_me:15624: result: $samba_cv_HAVE_STRUCT_FLOCK64" >&5
+echo "${ECHO_T}$samba_cv_HAVE_STRUCT_FLOCK64" >&6
if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_FLOCK64 1
EOF
fi
fi
-echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:11201: checking for st_blocks in struct stat" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15635: checking for st_blocks in struct stat" >&5
+echo $ECHO_N "checking for st_blocks in struct stat... $ECHO_C" >&6
+if test "${samba_cv_HAVE_STAT_ST_BLOCKS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 11207 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 15642 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-int main() {
+int
+main ()
+{
struct stat st; st.st_blocks = 0;
-; return 0; }
-EOF
-if { (eval echo configure:11216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15656: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15659: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15662: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15665: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_STAT_ST_BLOCKS=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_STAT_ST_BLOCKS=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_STAT_ST_BLOCKS=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
+echo "$as_me:15675: result: $samba_cv_HAVE_STAT_ST_BLOCKS" >&5
+echo "${ECHO_T}$samba_cv_HAVE_STAT_ST_BLOCKS" >&6
if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_STAT_ST_BLOCKS 1
EOF
-fi
+fi
case "$host_os" in
*linux*)
-echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
-echo "configure:11239: checking for broken RedHat 7.2 system header files" >&5
-if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15686: checking for broken RedHat 7.2 system header files" >&5
+echo $ECHO_N "checking for broken RedHat 7.2 system header files... $ECHO_C" >&6
+if test "${samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 11245 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 15693 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_VFS_H
@@ -11251,25 +15700,38 @@ cat > conftest.$ac_ext <<EOF
#include <sys/capability.h>
#endif
-int main() {
+int
+main ()
+{
int i;
-; return 0; }
-EOF
-if { (eval echo configure:11259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15712: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15715: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15718: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15721: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
+echo "$as_me:15731: result: $samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
+echo "${ECHO_T}$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6
if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
EOF
@@ -11277,59 +15739,74 @@ fi
;;
esac
-echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
-echo "configure:11282: checking for broken nisplus include files" >&5
-if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15742: checking for broken nisplus include files" >&5
+echo $ECHO_N "checking for broken nisplus include files... $ECHO_C" >&6
+if test "${samba_cv_BROKEN_NISPLUS_INCLUDE_FILES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat > conftest.$ac_ext <<EOF
-#line 11288 "configure"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 15749 "configure"
#include "confdefs.h"
#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
#include <rpcsvc/nis.h>
#endif
-int main() {
+int
+main ()
+{
int i;
-; return 0; }
-EOF
-if { (eval echo configure:11298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15764: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15767: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15770: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15773: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
+echo "$as_me:15783: result: $samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" >&5
+echo "${ECHO_T}$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" >&6
if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define BROKEN_NISPLUS_INCLUDE_FILES 1
EOF
fi
-
#################################################
# check for smbwrapper support
-echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
-echo "configure:11322: checking whether to use smbwrapper" >&5
+echo "$as_me:15794: checking whether to use smbwrapper" >&5
+echo $ECHO_N "checking whether to use smbwrapper... $ECHO_C" >&6
+
# Check whether --with-smbwrapper or --without-smbwrapper was given.
if test "${with_smbwrapper+set}" = set; then
withval="$with_smbwrapper"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:15802: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_SMBWRAPPER 1
EOF
- WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
+ WRAPPROG="bin/smbsh"
+ WRAP="bin/smbwrapper.$SHLIBEXT"
if test x$ATTEMPT_WRAP32_BUILD = x; then
WRAP32=""
@@ -11341,134 +15818,156 @@ EOF
if test x$PICFLAG = x; then
echo No support for PIC code - disabling smbwrapper and smbsh
+ WRAPPROG=""
WRAP=""
WRAP32=""
elif test x$ac_cv_func_syscall = xno; then
- echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
+ echo "$as_me:15825: result: No syscall() -- disabling smbwrapper and smbsh" >&5
+echo "${ECHO_T}No syscall() -- disabling smbwrapper and smbsh" >&6
+ WRAPPROG=""
WRAP=""
WRAP32=""
fi
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:15833: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:15838: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for the AFS filesystem
-echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
-echo "configure:11366: checking whether to use AFS" >&5
+echo "$as_me:15845: checking whether to use AFS" >&5
+echo $ECHO_N "checking whether to use AFS... $ECHO_C" >&6
+
# Check whether --with-afs or --without-afs was given.
if test "${with_afs+set}" = set; then
withval="$with_afs"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:15853: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_AFS 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:15861: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
-
+ echo "$as_me:15866: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for the DFS auth system
-echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6
-echo "configure:11392: checking whether to use DCE/DFS auth" >&5
+echo "$as_me:15873: checking whether to use DCE/DFS auth" >&5
+echo $ECHO_N "checking whether to use DCE/DFS auth... $ECHO_C" >&6
+
# Check whether --with-dfs or --without-dfs was given.
if test "${with_dfs+set}" = set; then
withval="$with_dfs"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:15881: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_DFS 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:15889: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:15894: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for Kerberos IV auth system
-echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
-echo "configure:11417: checking whether to use Kerberos IV" >&5
+echo "$as_me:15901: checking whether to use Kerberos IV" >&5
+echo $ECHO_N "checking whether to use Kerberos IV... $ECHO_C" >&6
+
# Check whether --with-krb4 or --without-krb4 was given.
if test "${with_krb4+set}" = set; then
withval="$with_krb4"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:15909: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define KRB4_AUTH 1
EOF
- echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:11429: checking for dn_expand in -lresolv" >&5
-ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:15915: checking for dn_expand in -lresolv" >&5
+echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 11437 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 15923 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dn_expand();
-
-int main() {
-dn_expand()
-; return 0; }
-EOF
-if { (eval echo configure:11448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char dn_expand ();
+int
+main ()
+{
+dn_expand ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15942: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15945: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15948: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15951: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_dn_expand=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_dn_expand=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:15962: result: $ac_cv_lib_resolv_dn_expand" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
+if test $ac_cv_lib_resolv_dn_expand = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBRESOLV 1
EOF
LIBS="-lresolv $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
LIBS="$LIBS -lkrb -ldes"
@@ -11476,26 +15975,29 @@ fi
LDFLAGS="$LDFLAGS -L$withval/lib"
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:15978: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:15983: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for Kerberos 5 auth system
-echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
-echo "configure:11492: checking whether to use Kerberos 5" >&5
+echo "$as_me:15990: checking whether to use Kerberos 5" >&5
+echo $ECHO_N "checking whether to use Kerberos 5... $ECHO_C" >&6
+
# Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then
withval="$with_krb5"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:15998: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define KRB5_AUTH 1
EOF
@@ -11504,44 +16006,49 @@ EOF
LDFLAGS="$LDFLAGS -L$withval/lib"
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16009: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16014: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for automount support
-echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
-echo "configure:11520: checking whether to use AUTOMOUNT" >&5
+echo "$as_me:16021: checking whether to use AUTOMOUNT" >&5
+echo $ECHO_N "checking whether to use AUTOMOUNT... $ECHO_C" >&6
+
# Check whether --with-automount or --without-automount was given.
if test "${with_automount+set}" = set; then
withval="$with_automount"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16029: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_AUTOMOUNT 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16037: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16042: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for smbmount support
-echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
-echo "configure:11545: checking whether to use SMBMOUNT" >&5
+echo "$as_me:16049: checking whether to use SMBMOUNT" >&5
+echo $ECHO_N "checking whether to use SMBMOUNT... $ECHO_C" >&6
+
# Check whether --with-smbmount or --without-smbmount was given.
if test "${with_smbmount+set}" = set; then
withval="$with_smbmount"
@@ -11549,43 +16056,48 @@ if test "${with_smbmount+set}" = set; then
yes)
case "$host_os" in
*linux*)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16059: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_SMBMOUNT 1
EOF
MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
;;
*)
- { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
+ { { echo "$as_me:16068: error: not on a linux system!" >&5
+echo "$as_me: error: not on a linux system!" >&2;}
+ { (exit 1); exit 1; }; }
;;
esac
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16075: result: no" >&5
+echo "${ECHO_T}no" >&6
MPROGS=
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16081: result: no" >&5
+echo "${ECHO_T}no" >&6
MPROGS=
-fi
-
-
+fi;
#################################################
# check for a PAM password database
with_pam_for_crypt=no
-echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
-echo "configure:11582: checking whether to use PAM password database" >&5
+echo "$as_me:16090: checking whether to use PAM password database" >&5
+echo $ECHO_N "checking whether to use PAM password database... $ECHO_C" >&6
+
# Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then
withval="$with_pam"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16098: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_PAM 1
EOF
@@ -11593,81 +16105,98 @@ EOF
with_pam_for_crypt=yes
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16108: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16113: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
# we can't build a pam module if we don't have pam.
-echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
-echo "configure:11608: checking for pam_get_data in -lpam" >&5
-ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:16119: checking for pam_get_data in -lpam" >&5
+echo $ECHO_N "checking for pam_get_data in -lpam... $ECHO_C" >&6
+if test "${ac_cv_lib_pam_pam_get_data+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lpam $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 11616 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 16127 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char pam_get_data();
-
-int main() {
-pam_get_data()
-; return 0; }
-EOF
-if { (eval echo configure:11627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ builtin and then its argument prototype would still apply. */
+char pam_get_data ();
+int
+main ()
+{
+pam_get_data ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:16146: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16149: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:16152: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16155: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_pam_pam_get_data=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_pam_pam_get_data=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:16166: result: $ac_cv_lib_pam_pam_get_data" >&5
+echo "${ECHO_T}$ac_cv_lib_pam_pam_get_data" >&6
+if test $ac_cv_lib_pam_pam_get_data = yes; then
+ cat >>confdefs.h <<\EOF
#define HAVE_LIBPAM 1
EOF
-else
- echo "$ac_t""no" 1>&6
fi
-
#################################################
# check for pam_smbpass support
-echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
-echo "configure:11654: checking whether to use pam_smbpass" >&5
+echo "$as_me:16177: checking whether to use pam_smbpass" >&5
+echo $ECHO_N "checking whether to use pam_smbpass... $ECHO_C" >&6
+
# Check whether --with-pam_smbpass or --without-pam_smbpass was given.
if test "${with_pam_smbpass+set}" = set; then
withval="$with_pam_smbpass"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:16185: result: yes" >&5
+echo "${ECHO_T}yes" >&6
# Conditions under which pam_smbpass should not be built.
if test x$PICFLAG = x; then
- echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
+ echo "$as_me:16191: result: No support for PIC code - disabling pam_smbpass" >&5
+echo "${ECHO_T}No support for PIC code - disabling pam_smbpass" >&6
PAM_MOD=""
elif test x$ac_cv_lib_pam_pam_get_data = xno; then
- echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
+ echo "$as_me:16195: result: No libpam found -- disabling pam_smbpass" >&5
+echo "${ECHO_T}No libpam found -- disabling pam_smbpass" >&6
PAM_MOD=""
else
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define WITH_PAM_SMBPASS 1
EOF
@@ -11675,118 +16204,146 @@ EOF
fi
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16207: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
-
+ echo "$as_me:16212: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
###############################################
# test for where we get crypt() from, but only
# if not using PAM
if test $with_pam_for_crypt = no; then
+
for ac_func in crypt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11696: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 11701 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:16225: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16231 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* 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() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+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();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:16262: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16265: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:16268: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16271: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:16281: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:11724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
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:11750: 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
+ echo "$as_me:16292: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypt $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 11758 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 16300 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char crypt();
-
-int main() {
-crypt()
-; return 0; }
-EOF
-if { (eval echo configure:11769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:16319: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16322: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:16325: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16328: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:16339: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
LIBS="$LIBS -lcrypt";
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_CRYPT 1
EOF
-else
- echo "$ac_t""no" 1>&6
fi
fi
@@ -11799,44 +16356,51 @@ fi
## $with_pam_for_crypt variable as above --jerry
##
if test $with_pam_for_crypt = no; then
-echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
-echo "configure:11804: checking for a crypt that needs truncated salt" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:16359: checking for a crypt that needs truncated salt" >&5
+echo $ECHO_N "checking for a crypt that needs truncated salt... $ECHO_C" >&6
+if test "${samba_cv_HAVE_TRUNCATED_SALT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+
if test "$cross_compiling" = yes; then
samba_cv_HAVE_TRUNCATED_SALT=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 11813 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16369 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/crypttest.c"
-EOF
-if { (eval echo configure:11817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:16374: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16377: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:16379: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16382: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_TRUNCATED_SALT=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- samba_cv_HAVE_TRUNCATED_SALT=yes
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_TRUNCATED_SALT=yes
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
+echo "$as_me:16394: result: $samba_cv_HAVE_TRUNCATED_SALT" >&5
+echo "${ECHO_T}$samba_cv_HAVE_TRUNCATED_SALT" >&6
if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_TRUNCATED_SALT 1
EOF
fi
fi
-
########################################################################################
##
## TESTS FOR SAM BACKENDS. KEEP THESE GROUPED TOGETHER
@@ -11846,45 +16410,48 @@ fi
## set the with_smbpasswd_sam as the default
with_smbpasswd_sam=yes
-
-
#################################################
# check for a TDB password database
-echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
-echo "configure:11855: checking whether to use TDB SAM database" >&5
+echo "$as_me:16415: checking whether to use TDB SAM database" >&5
+echo $ECHO_N "checking whether to use TDB SAM database... $ECHO_C" >&6
+
# Check whether --with-tdbsam or --without-tdbsam was given.
if test "${with_tdbsam+set}" = set; then
withval="$with_tdbsam"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16423: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_TDB_SAM 1
EOF
with_smbpasswd_sam=no
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16432: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16437: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for a LDAP password database
-echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
-echo "configure:11881: checking whether to use LDAP SAM database" >&5
+echo "$as_me:16444: checking whether to use LDAP SAM database" >&5
+echo $ECHO_N "checking whether to use LDAP SAM database... $ECHO_C" >&6
+
# Check whether --with-ldapsam or --without-ldapsam was given.
if test "${with_ldapsam+set}" = set; then
withval="$with_ldapsam"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16452: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_LDAP_SAM 1
EOF
@@ -11892,101 +16459,112 @@ EOF
with_smbpasswd_sam=no
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16462: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16467: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for a NISPLUS password database
-echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
-echo "configure:11908: checking whether to use NISPLUS SAM database" >&5
+echo "$as_me:16474: checking whether to use NISPLUS SAM database" >&5
+echo $ECHO_N "checking whether to use NISPLUS SAM database... $ECHO_C" >&6
+
# Check whether --with-nisplussam or --without-nisplussam was given.
if test "${with_nisplussam+set}" = set; then
withval="$with_nisplussam"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16482: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_NISPLUS_SAM 1
EOF
with_smbpasswd_sam=no
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16491: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16496: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
################################################
# This test should come last because the
# smbpasswd SAM is only used if another format
# has not been defined
-echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
-echo "configure:11936: checking whether to use traditional smbpasswd file" >&5
+echo "$as_me:16505: checking whether to use traditional smbpasswd file" >&5
+echo $ECHO_N "checking whether to use traditional smbpasswd file... $ECHO_C" >&6
if test $with_smbpasswd_sam = yes; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16508: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_SMBPASSWD_SAM 1
EOF
PDBEDIT=""
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16516: result: no" >&5
+echo "${ECHO_T}no" >&6
PDBEDIT=bin/pdbedit
fi
########################################################################################
##
-## END OF TESTS FOR SAM BACKENDS.
+## END OF TESTS FOR SAM BACKENDS.
##
########################################################################################
#################################################
-# check for a NISPLUS_HOME support
-echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
-echo "configure:11958: checking whether to use NISPLUS_HOME" >&5
+# check for a NISPLUS_HOME support
+echo "$as_me:16529: checking whether to use NISPLUS_HOME" >&5
+echo $ECHO_N "checking whether to use NISPLUS_HOME... $ECHO_C" >&6
+
# Check whether --with-nisplus-home or --without-nisplus-home was given.
if test "${with_nisplus_home+set}" = set; then
withval="$with_nisplus_home"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16537: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_NISPLUS_HOME 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16545: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16550: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for the secure socket layer
-echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
-echo "configure:11983: checking whether to use SSL" >&5
+echo "$as_me:16557: checking whether to use SSL" >&5
+echo $ECHO_N "checking whether to use SSL... $ECHO_C" >&6
+
# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
withval="$with_ssl"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16565: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_SSL 1
EOF
@@ -12007,7 +16585,7 @@ EOF
else
- CFLAGS="-I/usr/local/ssl/include $CFLAGS"
+ CFLAGS="-I/usr/local/ssl/include $CFLAGS"
fi
@@ -12035,96 +16613,104 @@ EOF
# if test ! -d ${withval}; then
# echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
# exit 1
-# fi
+# fi
CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16622: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16627: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for syslog logging
-echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
-echo "configure:12057: checking whether to use syslog logging" >&5
+echo "$as_me:16634: checking whether to use syslog logging" >&5
+echo $ECHO_N "checking whether to use syslog logging... $ECHO_C" >&6
+
# Check whether --with-syslog or --without-syslog was given.
if test "${with_syslog+set}" = set; then
withval="$with_syslog"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16642: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_SYSLOG 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16650: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16655: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for a shared memory profiling support
-echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
-echo "configure:12082: checking whether to use profiling" >&5
+echo "$as_me:16662: checking whether to use profiling" >&5
+echo $ECHO_N "checking whether to use profiling... $ECHO_C" >&6
+
# Check whether --with-profiling-data or --without-profiling-data was given.
if test "${with_profiling_data+set}" = set; then
withval="$with_profiling_data"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16670: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_PROFILE 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16678: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
-
+ echo "$as_me:16683: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for experimental disk-quotas support
QUOTAOBJS=smbd/noquotas.o
-echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
-echo "configure:12110: checking whether to support disk-quotas" >&5
+echo "$as_me:16692: checking whether to support disk-quotas" >&5
+echo $ECHO_N "checking whether to support disk-quotas... $ECHO_C" >&6
+
# Check whether --with-quotas or --without-quotas was given.
if test "${with_quotas+set}" = set; then
withval="$with_quotas"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:16700: result: yes" >&5
+echo "${ECHO_T}yes" >&6
QUOTAOBJS=smbd/quotas.o
case "$host_os" in
*linux*)
# Check for kernel 2.4.x quota braindamage...
- echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
-echo "configure:12122: checking for linux 2.4.x quota braindamage.." >&5
-if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:16706: checking for linux 2.4.x quota braindamage.." >&5
+echo $ECHO_N "checking for linux 2.4.x quota braindamage..... $ECHO_C" >&6
+if test "${samba_cv_linux_2_4_quota_braindamage+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 12128 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16713 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
@@ -12132,30 +16718,43 @@ else
#include <linux/quota.h>
#include <mntent.h>
#include <linux/unistd.h>
-int main() {
+int
+main ()
+{
struct mem_dqblk D;
-; return 0; }
-EOF
-if { (eval echo configure:12140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:16730: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:16733: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:16736: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16739: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_linux_2_4_quota_braindamage=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_linux_2_4_quota_braindamage=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_linux_2_4_quota_braindamage=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
+echo "$as_me:16749: result: $samba_cv_linux_2_4_quota_braindamage" >&5
+echo "${ECHO_T}$samba_cv_linux_2_4_quota_braindamage" >&6
if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define LINUX_QUOTAS_2 1
EOF
else
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define LINUX_QUOTAS_1 1
EOF
@@ -12166,102 +16765,82 @@ fi
esac
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16768: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
-
+ echo "$as_me:16773: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for experimental utmp accounting
-echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
-echo "configure:12184: checking whether to support utmp accounting" >&5
+echo "$as_me:16781: checking whether to support utmp accounting" >&5
+echo $ECHO_N "checking whether to support utmp accounting... $ECHO_C" >&6
+
# Check whether --with-utmp or --without-utmp was given.
if test "${with_utmp+set}" = set; then
withval="$with_utmp"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16789: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_UTMP 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16797: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16802: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for MS Dfs support
-echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
-echo "configure:12210: checking whether to support Microsoft Dfs" >&5
+echo "$as_me:16810: checking whether to support Microsoft Dfs" >&5
+echo $ECHO_N "checking whether to support Microsoft Dfs... $ECHO_C" >&6
+
# Check whether --with-msdfs or --without-msdfs was given.
if test "${with_msdfs+set}" = set; then
withval="$with_msdfs"
case "$withval" in
yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:16818: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define WITH_MSDFS 1
EOF
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16826: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
-else
- echo "$ac_t""no" 1>&6
-
-fi
-
-
-#################################################
-# check for Samba VFS support
-
-echo $ac_n "checking whether to support the experimental Samba vfs""... $ac_c" 1>&6
-echo "configure:12236: checking whether to support the experimental Samba vfs" >&5
-# Check whether --with-vfs or --without-vfs was given.
-if test "${with_vfs+set}" = set; then
- withval="$with_vfs"
- case "$withval" in
- yes)
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define WITH_VFS 1
-EOF
-
- ;;
- *)
- echo "$ac_t""no" 1>&6
- ;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
-
+ echo "$as_me:16831: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# should we build libsmbclient?
LIBSMBCLIENT_SHARED=
LIBSMBCLIENT=
-echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
-echo "configure:12265: checking whether to build the libsmbclient shared library" >&5
+echo "$as_me:16841: checking whether to build the libsmbclient shared library" >&5
+echo $ECHO_N "checking whether to build the libsmbclient shared library... $ECHO_C" >&6
+
# Check whether --with-libsmbclient or --without-libsmbclient was given.
if test "${with_libsmbclient+set}" = set; then
withval="$with_libsmbclient"
@@ -12270,40 +16849,43 @@ if test "${with_libsmbclient+set}" = set; then
if test $BLDSHARED = true; then
LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
LIBSMBCLIENT=libsmbclient
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:16852: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "$ac_t""no shared library support" 1>&6
+ echo "$as_me:16855: result: no shared library support" >&5
+echo "${ECHO_T}no shared library support" >&6
fi
;;
*)
- echo "$ac_t""no" 1>&6
+ echo "$as_me:16860: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
- esac
+ esac
else
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:16865: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# these tests are taken from the GNU fileutils package
-echo "checking how to get filesystem space usage" 1>&6
-echo "configure:12292: checking how to get filesystem space usage" >&5
+{ echo "$as_me:16872: checking how to get filesystem space usage..." >&5
+echo "$as_me: checking how to get filesystem space usage..." >&6;}
space=no
# Test for statvfs64.
if test $space = no; then
# SVR4
- echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
-echo "configure:12299: checking statvfs64 function (SVR4)" >&5
-if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:16879: checking statvfs64 function (SVR4)" >&5
+echo $ECHO_N "checking statvfs64 function (SVR4)... $ECHO_C" >&6
+if test "${fu_cv_sys_stat_statvfs64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
fu_cv_sys_stat_statvfs64=cross
else
- cat > conftest.$ac_ext <<EOF
-#line 12307 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16888 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -12316,25 +16898,33 @@ else
struct statvfs64 fsd;
exit (statvfs64 (".", &fsd));
}
-EOF
-if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:16903: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16906: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:16908: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16911: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_statvfs64=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- fu_cv_sys_stat_statvfs64=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_statvfs64=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
+echo "$as_me:16923: result: $fu_cv_sys_stat_statvfs64" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statvfs64" >&6
if test $fu_cv_sys_stat_statvfs64 = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATVFS64 1
EOF
@@ -12349,36 +16939,49 @@ fi
# is what it gets when this test fails.
if test $space = no; then
# SVR4
- echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
-echo "configure:12354: checking statvfs function (SVR4)" >&5
-if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:16942: checking statvfs function (SVR4)" >&5
+echo $ECHO_N "checking statvfs function (SVR4)... $ECHO_C" >&6
+if test "${fu_cv_sys_stat_statvfs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 12359 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16948 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
-int main() {
+int
+main ()
+{
struct statvfs fsd; statvfs (0, &fsd);
-; return 0; }
-EOF
-if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:16961: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16964: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:16967: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16970: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_statvfs=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- fu_cv_sys_stat_statvfs=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_statvfs=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
+echo "$as_me:16980: result: $fu_cv_sys_stat_statvfs" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6
if test $fu_cv_sys_stat_statvfs = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATVFS 1
EOF
@@ -12387,16 +16990,16 @@ fi
if test $space = no; then
# DEC Alpha running OSF/1
- echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
-echo "configure:12392: checking for 3-argument statfs function (DEC OSF/1)" >&5
- if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:16993: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6
+ if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
fu_cv_sys_stat_statfs3_osf1=no
else
- cat > conftest.$ac_ext <<EOF
-#line 12400 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17002 "configure"
#include "confdefs.h"
#include <sys/param.h>
@@ -12408,25 +17011,34 @@ else
fsd.f_fsize = 0;
exit (statfs (".", &fsd, sizeof (struct statfs)));
}
-EOF
-if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17016: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17019: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17021: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17024: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_statfs3_osf1=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- fu_cv_sys_stat_statfs3_osf1=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_statfs3_osf1=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
- echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
+ echo "$as_me:17037: result: $fu_cv_sys_stat_statfs3_osf1" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATFS3_OSF1 1
EOF
@@ -12435,16 +17047,16 @@ fi
if test $space = no; then
# AIX
- echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
-echo "configure:12440: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
- if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:17050: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6
+ if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
fu_cv_sys_stat_statfs2_bsize=no
else
- cat > conftest.$ac_ext <<EOF
-#line 12448 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17059 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_PARAM_H
@@ -12462,25 +17074,34 @@ else
fsd.f_bsize = 0;
exit (statfs (".", &fsd));
}
-EOF
-if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17079: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17082: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17084: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17087: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_statfs2_bsize=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- fu_cv_sys_stat_statfs2_bsize=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_statfs2_bsize=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
- echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
+ echo "$as_me:17100: result: $fu_cv_sys_stat_statfs2_bsize" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6
if test $fu_cv_sys_stat_statfs2_bsize = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATFS2_BSIZE 1
EOF
@@ -12489,16 +17110,16 @@ fi
if test $space = no; then
# SVR3
- echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
-echo "configure:12494: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
- if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:17113: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6
+ if test "${fu_cv_sys_stat_statfs4+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
fu_cv_sys_stat_statfs4=no
else
- cat > conftest.$ac_ext <<EOF
-#line 12502 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17122 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
@@ -12507,25 +17128,34 @@ else
struct statfs fsd;
exit (statfs (".", &fsd, sizeof fsd, 0));
}
-EOF
-if { (eval echo configure:12512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17133: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17136: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17138: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17141: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_statfs4=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- fu_cv_sys_stat_statfs4=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_statfs4=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
- echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
+ echo "$as_me:17154: result: $fu_cv_sys_stat_statfs4" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6
if test $fu_cv_sys_stat_statfs4 = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATFS4 1
EOF
@@ -12534,16 +17164,16 @@ fi
if test $space = no; then
# 4.4BSD and NetBSD
- echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
-echo "configure:12539: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
- if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:17167: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6
+ if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
fu_cv_sys_stat_statfs2_fsize=no
else
- cat > conftest.$ac_ext <<EOF
-#line 12547 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17176 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -12558,25 +17188,34 @@ else
fsd.f_fsize = 0;
exit (statfs (".", &fsd));
}
-EOF
-if { (eval echo configure:12563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17193: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17196: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17198: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17201: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_statfs2_fsize=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- fu_cv_sys_stat_statfs2_fsize=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_statfs2_fsize=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
- echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
+ echo "$as_me:17214: result: $fu_cv_sys_stat_statfs2_fsize" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6
if test $fu_cv_sys_stat_statfs2_fsize = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATFS2_FSIZE 1
EOF
@@ -12585,16 +17224,16 @@ fi
if test $space = no; then
# Ultrix
- echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
-echo "configure:12590: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
- if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:17227: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6
+ if test "${fu_cv_sys_stat_fs_data+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
fu_cv_sys_stat_fs_data=no
else
- cat > conftest.$ac_ext <<EOF
-#line 12598 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17236 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -12613,25 +17252,34 @@ else
0 for not mounted, -1 for failure. */
exit (statfs (".", &fsd) != 1);
}
-EOF
-if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17257: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17260: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17262: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17265: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
fu_cv_sys_stat_fs_data=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- fu_cv_sys_stat_fs_data=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fu_cv_sys_stat_fs_data=no
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
- echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
+ echo "$as_me:17278: result: $fu_cv_sys_stat_fs_data" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6
if test $fu_cv_sys_stat_fs_data = yes; then
space=yes
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define STAT_STATFS2_FS_DATA 1
EOF
@@ -12646,10 +17294,10 @@ fi
# If we don't have all of these then disable large
# file support.
#
-echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
-echo "configure:12651: checking if large file support can be enabled" >&5
-cat > conftest.$ac_ext <<EOF
-#line 12653 "configure"
+echo "$as_me:17297: checking if large file support can be enabled" >&5
+echo $ECHO_N "checking if large file support can be enabled... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 17300 "configure"
#include "confdefs.h"
#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
@@ -12658,66 +17306,79 @@ cat > conftest.$ac_ext <<EOF
__COMPILE_ERROR_
#endif
-int main() {
+int
+main ()
+{
int i
-; return 0; }
-EOF
-if { (eval echo configure:12666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:17318: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:17321: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:17324: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17327: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17337: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
EOF
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:17344: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# Check whether --with-spinlocks or --without-spinlocks was given.
if test "${with_spinlocks+set}" = set; then
withval="$with_spinlocks"
- :
-fi
+fi;
if test "x$with_spinlocks" = "xyes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define USE_SPINLOCKS 1
EOF
-
case "$host_cpu" in
sparc)
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define SPARC_SPINLOCKS 1
EOF
;;
i386|i486|i586|i686)
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define INTEL_SPINLOCKS 1
EOF
;;
mips)
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define MIPS_SPINLOCKS 1
EOF
;;
powerpc)
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define POWERPC_SPINLOCKS 1
EOF
@@ -12728,8 +17389,9 @@ fi
#################################################
# check for ACL support
-echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
-echo "configure:12733: checking whether to support ACLs" >&5
+echo "$as_me:17392: checking whether to support ACLs" >&5
+echo $ECHO_N "checking whether to support ACLs... $ECHO_C" >&6
+
# Check whether --with-acl-support or --without-acl-support was given.
if test "${with_acl_support+set}" = set; then
withval="$with_acl_support"
@@ -12738,160 +17400,205 @@ if test "${with_acl_support+set}" = set; then
case "$host_os" in
*sysv5*)
- echo "$ac_t""Using UnixWare ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17403: result: Using UnixWare ACLs" >&5
+echo "${ECHO_T}Using UnixWare ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_UNIXWARE_ACLS 1
EOF
;;
*solaris*)
- echo "$ac_t""Using solaris ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17411: result: Using solaris ACLs" >&5
+echo "${ECHO_T}Using solaris ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_SOLARIS_ACLS 1
EOF
;;
*hpux*)
- echo "$ac_t""Using HPUX ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17419: result: Using HPUX ACLs" >&5
+echo "${ECHO_T}Using HPUX ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_HPUX_ACLS 1
EOF
;;
*irix*)
- echo "$ac_t""Using IRIX ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17427: result: Using IRIX ACLs" >&5
+echo "${ECHO_T}Using IRIX ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_IRIX_ACLS 1
EOF
;;
*aix*)
- echo "$ac_t""Using AIX ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17435: result: Using AIX ACLs" >&5
+echo "${ECHO_T}Using AIX ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_AIX_ACLS 1
EOF
;;
*osf*)
- echo "$ac_t""Using Tru64 ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17443: result: Using Tru64 ACLs" >&5
+echo "${ECHO_T}Using Tru64 ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_TRU64_ACLS 1
EOF
LIBS="$LIBS -lpacl"
;;
*)
- echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
-echo "configure:12786: checking for acl_get_file in -lacl" >&5
-ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:17453: checking for acl_get_file in -lacl" >&5
+echo $ECHO_N "checking for acl_get_file in -lacl... $ECHO_C" >&6
+if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lacl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 12794 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 17461 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char acl_get_file();
-
-int main() {
-acl_get_file()
-; return 0; }
-EOF
-if { (eval echo configure:12805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "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"
-
-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 acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ builtin and then its argument prototype would still apply. */
+char acl_get_file ();
+int
+main ()
+{
+acl_get_file ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17480: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17483: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17486: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17489: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_acl_acl_get_file=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_acl_acl_get_file=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:17500: result: $ac_cv_lib_acl_acl_get_file" >&5
+echo "${ECHO_T}$ac_cv_lib_acl_acl_get_file" >&6
+if test $ac_cv_lib_acl_acl_get_file = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBACL 1
EOF
LIBS="-lacl $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
- echo $ac_n "checking for ACL support""... $ac_c" 1>&6
-echo "configure:12833: checking for ACL support" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:17511: checking for ACL support" >&5
+echo $ECHO_N "checking for ACL support... $ECHO_C" >&6
+if test "${samba_cv_HAVE_POSIX_ACLS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 12839 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17518 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
-int main() {
+int
+main ()
+{
acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
-; return 0; }
-EOF
-if { (eval echo configure:12847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17531: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17534: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17537: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17540: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_POSIX_ACLS=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_POSIX_ACLS=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_POSIX_ACLS=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
+echo "$as_me:17550: result: $samba_cv_HAVE_POSIX_ACLS" >&5
+echo "${ECHO_T}$samba_cv_HAVE_POSIX_ACLS" >&6
if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
- echo "$ac_t""Using posix ACLs" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17553: result: Using posix ACLs" >&5
+echo "${ECHO_T}Using posix ACLs" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_POSIX_ACLS 1
EOF
- echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
-echo "configure:12867: checking for acl_get_perm_np" >&5
-if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:17559: checking for acl_get_perm_np" >&5
+echo $ECHO_N "checking for acl_get_perm_np... $ECHO_C" >&6
+if test "${samba_cv_HAVE_ACL_GET_PERM_NP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 12873 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17566 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/acl.h>
-int main() {
+int
+main ()
+{
acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
-; return 0; }
-EOF
-if { (eval echo configure:12881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17579: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17582: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17585: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17588: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
samba_cv_HAVE_ACL_GET_PERM_NP=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- samba_cv_HAVE_ACL_GET_PERM_NP=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_HAVE_ACL_GET_PERM_NP=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-
-echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
+echo "$as_me:17598: result: $samba_cv_HAVE_ACL_GET_PERM_NP" >&5
+echo "${ECHO_T}$samba_cv_HAVE_ACL_GET_PERM_NP" >&6
if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_ACL_GET_PERM_NP 1
EOF
@@ -12901,22 +17608,23 @@ EOF
esac
;;
*)
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:17611: result: no" >&5
+echo "${ECHO_T}no" >&6
+ cat >>confdefs.h <<\EOF
#define HAVE_NO_ACLS 1
EOF
;;
- esac
+ esac
else
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_NO_ACLS 1
EOF
- echo "$ac_t""no" 1>&6
-
-fi
+ echo "$as_me:17624: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
#################################################
# check for the historical SAMBA installation
@@ -12931,15 +17639,24 @@ fi
# build and install client programs (WINBIND_TARGETS), sbin programs
# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
-echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
-echo "configure:12936: checking whether to build winbind" >&5
+echo "$as_me:17642: checking whether to build winbind" >&5
+echo $ECHO_N "checking whether to build winbind... $ECHO_C" >&6
# Initially, the value of $host_os decides whether winbind is supported
-case "$host_os" in
- *linux*|*solaris*|*irix*|*hpux11*)
+case "$host_os" in
+ *linux*|*irix*)
HAVE_WINBIND=yes
;;
+ *solaris*)
+ HAVE_WINBIND=yes
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+ WINBIND_NSS_EXTRA_LIBS="-lsocket"
+ ;;
+ *hpux11*)
+ HAVE_WINBIND=yes
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+ ;;
*)
HAVE_WINBIND=no
winbind_no_reason=", unsupported on $host_os"
@@ -12951,7 +17668,7 @@ esac
# Check whether --with-winbind or --without-winbind was given.
if test "${with_winbind+set}" = set; then
withval="$with_winbind"
-
+
case "$withval" in
yes)
HAVE_WINBIND=yes
@@ -12960,9 +17677,8 @@ if test "${with_winbind+set}" = set; then
HAVE_WINBIND=no
winbind_reason=""
;;
- esac
-fi
-
+ esac
+fi;
# We need unix domain sockets for winbind
@@ -12977,11 +17693,19 @@ fi
if test x"$HAVE_WINBIND" = x"yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:17696: result: yes" >&5
+echo "${ECHO_T}yes" >&6
WINBIND_TARGETS="bin/wbinfo"
WINBIND_STARGETS="bin/winbindd"
- WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
+ case "$host_os" in
+ *irix*)
+ WINBIND_LTARGETS="libns_winbind.so"
+ ;;
+ *)
+ WINBIND_LTARGETS="libnss_winbind.so"
+ ;;
+ esac
case "$with_pam" in
yes)
@@ -12989,7 +17713,8 @@ if test x"$HAVE_WINBIND" = x"yes"; then
;;
esac
else
- echo "$ac_t""no$winbind_no_reason" 1>&6
+ echo "$as_me:17716: result: no$winbind_no_reason" >&5
+echo "${ECHO_T}no$winbind_no_reason" >&6
WINBIND_TARGETS=""
WINBIND_STARGETS=""
@@ -12997,443 +17722,1058 @@ else
WINBIND_PAM_TARGETS=""
fi
+# Check for FreeBSD problem with getgroups
+# It returns EGID too many times in the list of groups
+# and causes a security problem
+echo "$as_me:17728: checking whether or not getgroups returns EGID too many times" >&5
+echo $ECHO_N "checking whether or not getgroups returns EGID too many times... $ECHO_C" >&6
+if test "${samba_cv_have_getgroups_too_many_egids+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ samba_cv_have_getgroups_too_many_egids=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17737 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ gid_t groups[10];
+ int n = 10;
+
+ n = getgroups(n, &groups);
+ /* Could actually pass back the number of EGIDs there ... */
+ exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17754: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17757: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17759: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17762: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ samba_cv_have_getgroups_too_many_egids=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+samba_cv_have_getgroups_too_many_egids=yes
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:17774: result: $samba_cv_have_getgroups_too_many_egids" >&5
+echo "${ECHO_T}$samba_cv_have_getgroups_too_many_egids" >&6
+if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_GETGROUPS_TOO_MANY_EGIDS 1
+EOF
+
+fi
+
# Substitution time!
+#################################################
+# Check to see if we should use the included popt
+
+# Check whether --with-included-popt or --without-included-popt was given.
+if test "${with_included_popt+set}" = set; then
+ withval="$with_included_popt"
+ case "$withval" in
+ yes)
+ INCLUDED_POPT=yes
+ ;;
+ no)
+ INCLUDED_POPT=no
+ ;;
+ esac
+fi;
+if test x"$INCLUDED_POPT" != x"yes"; then
+ echo "$as_me:17802: checking for poptGetContext in -lpopt" >&5
+echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6
+if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpopt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 17810 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char poptGetContext ();
+int
+main ()
+{
+poptGetContext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17829: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17832: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17835: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17838: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_popt_poptGetContext=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_popt_poptGetContext=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:17849: result: $ac_cv_lib_popt_poptGetContext" >&5
+echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6
+if test $ac_cv_lib_popt_poptGetContext = yes; then
+ INCLUDED_POPT=no
+else
+ INCLUDED_POPT=yes
+fi
+fi
+echo "$as_me:17859: checking whether to use included popt" >&5
+echo $ECHO_N "checking whether to use included popt... $ECHO_C" >&6
+if test x"$INCLUDED_POPT" = x"yes"; then
+ echo "$as_me:17862: result: $srcdir/popt" >&5
+echo "${ECHO_T}$srcdir/popt" >&6
+ BUILD_POPT='$(POPT_OBJS)'
+ FLAGS1="-I$srcdir/popt"
+else
+ echo "$as_me:17867: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$LIBS -lpopt"
+fi
#################################################
# final configure stuff
-echo "checking configure summary"
+echo "$as_me:17874: checking configure summary" >&5
+echo $ECHO_N "checking configure summary... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
- :
+ { echo "$as_me:17877: WARNING: cannot run when cross-compiling" >&5
+echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
else
- cat > conftest.$ac_ext <<EOF
-#line 13015 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17881 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
-EOF
-if { (eval echo configure:13019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- echo "configure OK";
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
-fi
-rm -fr conftest*
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:17886: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17889: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:17891: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17894: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:17896: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:17902: error: summary failure. Aborting config" >&5
+echo "$as_me: error: summary failure. Aborting config" >&2;}
+ { (exit 1); exit 1; }; }; exit 1;
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
builddir=`pwd`
-
-trap '' 1 2 15
-cat > confcache <<\EOF
+ac_config_files="$ac_config_files include/stamp-h Makefile"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:17991: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\EOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.52,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
do
- case "\$ac_option" in
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=false;;
+ esac
+
+ case $1 in
+ # Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:18164: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES="$CONFIG_FILES $1"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ ac_need_defaults=false;;
+
+ # This is an error.
+ -*) { { echo "$as_me:18183: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
esac
+ shift
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+exec 5>>config.log
+cat >&5 << _ACEOF
-trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+## ----------------------- ##
+## Running config.status. ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52, executed with
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_ACEOF
EOF
-cat >> $CONFIG_STATUS <<EOF
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@codepagedir@%$codepagedir%g
-s%@configdir@%$configdir%g
-s%@lockdir@%$lockdir%g
-s%@logfilebase@%$logfilebase%g
-s%@privatedir@%$privatedir%g
-s%@swatdir@%$swatdir%g
-s%@RUNPROG@%$RUNPROG%g
-s%@MPROGS@%$MPROGS%g
-s%@LDSHFLAGS@%$LDSHFLAGS%g
-s%@SONAMEFLAG@%$SONAMEFLAG%g
-s%@SHLD@%$SHLD%g
-s%@HOST_OS@%$HOST_OS%g
-s%@PAM_MOD@%$PAM_MOD%g
-s%@PDBEDIT@%$PDBEDIT%g
-s%@WRAP@%$WRAP%g
-s%@WRAP32@%$WRAP32%g
-s%@PICFLAG@%$PICFLAG%g
-s%@PICSUFFIX@%$PICSUFFIX%g
-s%@SHLIBEXT@%$SHLIBEXT%g
-s%@BLDSHARED@%$BLDSHARED%g
-s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
-s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@AWK@%$AWK%g
-s%@BROKEN_CC@%$BROKEN_CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CPP@%$CPP%g
-s%@LIBOBJS@%$LIBOBJS%g
-s%@TERMLIBS@%$TERMLIBS%g
-s%@TERMLDFLAGS@%$TERMLDFLAGS%g
-s%@ROFF@%$ROFF%g
-s%@QUOTAOBJS@%$QUOTAOBJS%g
-s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
-s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
-s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
-s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
-s%@builddir@%$builddir%g
+cat >>$CONFIG_STATUS <<\EOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "include/stamp-h" ) CONFIG_FILES="$CONFIG_FILES include/stamp-h" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
+ *) { { echo "$as_me:18221: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
-CEOF
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<EOF
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@DEFS@,$DEFS,;t t
+s,@LIBS@,$LIBS,;t t
+s,@codepagedir@,$codepagedir,;t t
+s,@configdir@,$configdir,;t t
+s,@lockdir@,$lockdir,;t t
+s,@piddir@,$piddir,;t t
+s,@logfilebase@,$logfilebase,;t t
+s,@privatedir@,$privatedir,;t t
+s,@swatdir@,$swatdir,;t t
+s,@RUNPROG@,$RUNPROG,;t t
+s,@MPROGS@,$MPROGS,;t t
+s,@LDSHFLAGS@,$LDSHFLAGS,;t t
+s,@SONAMEFLAG@,$SONAMEFLAG,;t t
+s,@SHLD@,$SHLD,;t t
+s,@HOST_OS@,$HOST_OS,;t t
+s,@PAM_MOD@,$PAM_MOD,;t t
+s,@PDBEDIT@,$PDBEDIT,;t t
+s,@WRAP@,$WRAP,;t t
+s,@WRAP32@,$WRAP32,;t t
+s,@WRAPPROG@,$WRAPPROG,;t t
+s,@PICFLAG@,$PICFLAG,;t t
+s,@PICSUFFIX@,$PICSUFFIX,;t t
+s,@SHLIBEXT@,$SHLIBEXT,;t t
+s,@BLDSHARED@,$BLDSHARED,;t t
+s,@LIBSMBCLIENT_SHARED@,$LIBSMBCLIENT_SHARED,;t t
+s,@LIBSMBCLIENT@,$LIBSMBCLIENT,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@AWK@,$AWK,;t t
+s,@BROKEN_CC@,$BROKEN_CC,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CPP@,$CPP,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@TERMLIBS@,$TERMLIBS,;t t
+s,@TERMLDFLAGS@,$TERMLDFLAGS,;t t
+s,@ROFF@,$ROFF,;t t
+s,@DYNEXP@,$DYNEXP,;t t
+s,@QUOTAOBJS@,$QUOTAOBJS,;t t
+s,@WINBIND_TARGETS@,$WINBIND_TARGETS,;t t
+s,@WINBIND_STARGETS@,$WINBIND_STARGETS,;t t
+s,@WINBIND_LTARGETS@,$WINBIND_LTARGETS,;t t
+s,@WINBIND_PAM_TARGETS@,$WINBIND_PAM_TARGETS,;t t
+s,@WINBIND_NSS_EXTRA_OBJS@,$WINBIND_NSS_EXTRA_OBJS,;t t
+s,@WINBIND_NSS_EXTRA_LIBS@,$WINBIND_NSS_EXTRA_LIBS,;t t
+s,@BUILD_POPT@,$BUILD_POPT,;t t
+s,@FLAGS1@,$FLAGS1,;t t
+s,@builddir@,$builddir,;t t
+CEOF
+
+EOF
+
+ cat >>$CONFIG_STATUS <<\EOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
+fi # test -n "$CONFIG_FILES"
-CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+cat >>$CONFIG_STATUS <<\EOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
# A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
else
ac_dir_suffix= ac_dots=
fi
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ case $srcdir in
+ .) ac_srcdir=.
+ if test -z "$ac_dots"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* )
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
*) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_dots$srcdir ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_dots$INSTALL ;;
esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:18480: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ configure_input="Generated automatically from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:18498: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:18511: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+EOF
+cat >>$CONFIG_STATUS <<EOF
+ sed "$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
+ac_uD=',;t'
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="include/config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:18572: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:18583: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:18596: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+EOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\EOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+EOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+cat >>conftest.undefs <<\EOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
EOF
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\EOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated automatically by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ { echo "$as_me:18713: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ fi
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
-
+done
EOF
-cat >> $CONFIG_STATUS <<EOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
-exit 0
+{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/source/configure.in b/source/configure.in
index d0bb8d463d7..e8de80c1f6d 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -13,13 +13,15 @@ AC_ARG_WITH(fhs,
codepagedir="\$(DATADIR)/samba/codepages"
configdir="${sysconfdir}/samba"
lockdir="\${VARDIR}/cache/samba"
+ piddir="\$(VARDIR)/run/samba"
logfilebase="\${VARDIR}/log/samba"
privatedir="\${CONFIGDIR}/private"
swatdir="\${DATADIR}/samba/swat",
codepagedir="\$(LIBDIR)/codepages"
configdir="\$(LIBDIR)"
- lockdir="\$(VARDIR)/locks"
logfilebase="\$(VARDIR)"
+ lockdir="\${VARDIR}/locks"
+ piddir="\$(VARDIR)/locks"
privatedir="\${prefix}/private"
swatdir="\${prefix}/swat")
@@ -56,6 +58,22 @@ AC_ARG_WITH(lockdir,
esac])
#################################################
+# set pid directory location
+AC_ARG_WITH(piddir,
+[ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-piddir called without argument - will use default])
+ ;;
+ * )
+ piddir="$withval"
+ ;;
+ esac])
+
+#################################################
# set SWAT directory location
AC_ARG_WITH(swatdir,
[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
@@ -122,6 +140,7 @@ AC_ARG_WITH(logfilebase,
AC_SUBST(codepagedir)
AC_SUBST(configdir)
AC_SUBST(lockdir)
+AC_SUBST(piddir)
AC_SUBST(logfilebase)
AC_SUBST(privatedir)
AC_SUBST(swatdir)
@@ -140,6 +159,7 @@ AC_SUBST(PAM_MOD)
AC_SUBST(PDBEDIT)
AC_SUBST(WRAP)
AC_SUBST(WRAP32)
+AC_SUBST(WRAPPROG)
AC_SUBST(PICFLAG)
AC_SUBST(PICSUFFIX)
AC_SUBST(SHLIBEXT)
@@ -192,6 +212,8 @@ esac
AC_VALIDATE_CACHE_SYSTEM_TYPE
+DYNEXP=
+
#
# Config CPPFLAG settings for strange OS's that must be set
# before other tests.
@@ -214,12 +236,22 @@ case "$host_os" in
*9*|*10*)
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
AC_DEFINE(USE_BOTH_CRYPT_CALLS)
+ AC_DEFINE(_HPUX_SOURCE)
+ AC_DEFINE(_POSIX_SOURCE)
+ AC_DEFINE(_ALIGNMENT_REQUIRED,1)
+ AC_DEFINE(_MAX_ALIGNMENT,4)
;;
*11*)
CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
+ AC_DEFINE(_HPUX_SOURCE)
+ AC_DEFINE(_POSIX_SOURCE)
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_ALIGNMENT_REQUIRED,1)
+ AC_DEFINE(_MAX_ALIGNMENT,4)
AC_DEFINE(USE_BOTH_CRYPT_CALLS)
;;
esac
+ DYNEXP="-Wl,-E"
;;
@@ -237,6 +269,7 @@ case "$host_os" in
*aix4*)
AC_MSG_RESULT([enabling large file support])
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
+ AC_DEFINE(_LARGE_FILES)
;;
#
# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
@@ -260,13 +293,19 @@ case "$host_os" in
case "$ac_cv_gcc_compiler_version_number" in
*"gcc version 2.6"*|*"gcc version 2.7"*)
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ AC_DEFINE(_LARGEFILE64_SOURCE)
;;
*)
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_FILE_OFFSET_BITS,64)
;;
esac
else
+ DYNEXP="-dc -dp"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_FILE_OFFSET_BITS,64)
fi
;;
esac
@@ -291,6 +330,7 @@ exit(1);
CPPFLAGS="$old_CPPFLAGS"
if test x$SINIX_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
+ AC_DEFINE(_LARGEFILE64_SOURCE)
CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
LIBS="`getconf LFS64_LIBS` $LIBS"
@@ -343,6 +383,9 @@ main() {
CPPFLAGS="$old_CPPFLAGS"
if test x$LINUX_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_FILE_OFFSET_BITS,64)
+ AC_DEFINE(_GNU_SOURCE)
fi
AC_MSG_RESULT([$LINUX_LFS_SUPPORT])
;;
@@ -363,6 +406,8 @@ exit(1);
CPPFLAGS="$old_CPPFLAGS"
if test x$GLIBC_LFS_SUPPORT = xyes ; then
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ AC_DEFINE(_LARGEFILE64_SOURCE)
+ AC_DEFINE(_GNU_SOURCE)
fi
AC_MSG_RESULT([$GLIBC_LFS_SUPPORT])
;;
@@ -379,9 +424,9 @@ AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
-AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
+AC_CHECK_HEADERS(syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
-AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h synch.h pthread.h nsswitch.h)
+AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h synch.h pthread.h nsswitch.h)
#
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
@@ -451,9 +496,13 @@ if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
fi
############################################
-# we need libdl for PAM and the new VFS code
-AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
- AC_DEFINE(HAVE_LIBDL)])
+# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
+AC_CHECK_FUNCS(dlopen)
+if test x"$ac_cv_func_dlopen" = x"no"; then
+ AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
+ AC_DEFINE(HAVE_DLOPEN)])
+fi
+# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
############################################
# check if the compiler can do immediate structures
@@ -461,11 +510,17 @@ AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
AC_TRY_COMPILE([
#include <stdio.h>],
[
- #define X_FOOBAR(x) ((FOOBAR) { x })
- typedef struct {unsigned x;} FOOBAR;
- FOOBAR f = X_FOOBAR(1);
+ typedef struct {unsigned x;} FOOBAR;
+#define X_FOOBAR(x) ((FOOBAR) { x })
+#define FOO_ONE X_FOOBAR(1)
+ FOOBAR f = FOO_ONE;
+ static struct {
+ FOOBAR y;
+ } f2[] = {
+ {FOO_ONE}
+ };
],
- samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
+ samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
if test x"$samba_cv_immediate_structures" = x"yes"; then
AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES)
fi
@@ -658,8 +713,8 @@ else
RUNPROG=""
fi
-AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link)
-AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset setpgid mknod mknod64)
+AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link)
+AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64)
AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid)
AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf realpath)
@@ -789,6 +844,7 @@ case "$host_os" in
*linux*) AC_DEFINE(LINUX)
BLDSHARED="true"
LDSHFLAGS="-shared"
+ DYNEXP="-Wl,--export-dynamic"
PICFLAG="-fPIC"
SONAMEFLAG="-Wl,-soname="
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
@@ -822,7 +878,7 @@ case "$host_os" in
esac
ATTEMPT_WRAP32_BUILD=yes
BLDSHARED="true"
- LDSHFLAGS="-soname \$@ -shared"
+ LDSHFLAGS="-set_version sgi1.0 -soname \$@ -shared"
SHLD="\${LD}"
if test "${ac_cv_prog_CC}" = "gcc"; then
PICFLAG="-fPIC"
@@ -846,6 +902,7 @@ case "$host_os" in
LDSHFLAGS="-B symbolic -b -z +h \$@"
PICFLAG="+z"
fi
+ DYNEXP="-Wl,-E"
AC_DEFINE(STAT_ST_BLOCKSIZE,8192)
;;
*qnx*) AC_DEFINE(QNX);;
@@ -868,6 +925,7 @@ case "$host_os" in
AC_DEFINE(HAVE_MEMSET)
fi
LDSHFLAGS="-G"
+ DYNEXP="-Bexport"
;;
*mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX);;
esac
@@ -879,6 +937,7 @@ case "$host_os" in
LDSHFLAGS="-G"
;;
esac
+AC_SUBST(DYNEXP)
AC_MSG_RESULT($BLDSHARED)
AC_MSG_CHECKING([linker flags for shared libraries])
AC_MSG_RESULT([$LDSHFLAGS])
@@ -886,9 +945,11 @@ AC_MSG_CHECKING([compiler flags for position-independent code])
AC_MSG_RESULT([$PICFLAGS])
# try to work out how to produce pic code with this compiler
-AC_PROG_CC_FLAG(fpic)
-if test $ac_cv_prog_cc_fpic = yes; then
- PICFLAG="-fpic";
+if test x$PICFLAG = x; then
+ AC_PROG_CC_FLAG(fpic)
+ if test $ac_cv_prog_cc_fpic = yes; then
+ PICFLAG="-fpic";
+ fi
fi
if test x$PICFLAG = x; then
AC_PROG_CC_FLAG(KPIC)
@@ -1086,25 +1147,30 @@ AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[
AC_TRY_RUN([
#include <sys/types.h>
#include <stdarg.h>
-void foo(const char *format, ...) {
- va_list ap;
- int len;
- char buf[5];
+void foo(const char *format, ...) {
+ va_list ap;
+ int len;
+ char buf[5];
+
+ va_start(ap, format);
+ len = vsnprintf(buf, 0, format, ap);
+ va_end(ap);
+ if (len != 5) exit(1);
- va_start(ap, format);
- len = vsnprintf(0, 0, format, ap);
- va_end(ap);
- if (len != 5) exit(1);
+ va_start(ap, format);
+ len = vsnprintf(0, 0, format, ap);
+ va_end(ap);
+ if (len != 5) exit(1);
- if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
+ if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
- exit(0);
+ exit(0);
}
main() { foo("hello"); }
],
samba_cv_HAVE_C99_VSNPRINTF=yes,samba_cv_HAVE_C99_VSNPRINTF=no,samba_cv_HAVE_C99_VSNPRINTF=cross)])
if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
- AC_DEFINE(HAVE_C99_VSNPRINTF)
+ AC_DEFINE(HAVE_C99_VSNPRINTF)
fi
AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[
@@ -1700,7 +1766,8 @@ AC_ARG_WITH(smbwrapper,
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_SMBWRAPPER)
- WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
+ WRAPPROG="bin/smbsh"
+ WRAP="bin/smbwrapper.$SHLIBEXT"
if test x$ATTEMPT_WRAP32_BUILD = x; then
WRAP32=""
@@ -1712,10 +1779,12 @@ AC_ARG_WITH(smbwrapper,
if test x$PICFLAG = x; then
echo No support for PIC code - disabling smbwrapper and smbsh
+ WRAPPROG=""
WRAP=""
WRAP32=""
elif test x$ac_cv_func_syscall = xno; then
AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
+ WRAPPROG=""
WRAP=""
WRAP32=""
fi
@@ -2211,25 +2280,6 @@ AC_ARG_WITH(msdfs,
)
#################################################
-# check for Samba VFS support
-
-AC_MSG_CHECKING(whether to support the experimental Samba vfs)
-AC_ARG_WITH(vfs,
-[ --with-vfs Include Samba vfs support (default=no)],
-[ case "$withval" in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_VFS)
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
-
-
-#################################################
# should we build libsmbclient?
LIBSMBCLIENT_SHARED=
@@ -2571,9 +2621,18 @@ AC_MSG_CHECKING(whether to build winbind)
# Initially, the value of $host_os decides whether winbind is supported
case "$host_os" in
- *linux*|*solaris*|*irix*|*hpux11*)
+ *linux*|*irix*)
HAVE_WINBIND=yes
;;
+ *solaris*)
+ HAVE_WINBIND=yes
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+ WINBIND_NSS_EXTRA_LIBS="-lsocket"
+ ;;
+ *hpux11*)
+ HAVE_WINBIND=yes
+ WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
+ ;;
*)
HAVE_WINBIND=no
winbind_no_reason=", unsupported on $host_os"
@@ -2613,7 +2672,15 @@ if test x"$HAVE_WINBIND" = x"yes"; then
WINBIND_TARGETS="bin/wbinfo"
WINBIND_STARGETS="bin/winbindd"
- WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
+ case "$host_os" in
+ *irix*)
+ WINBIND_LTARGETS="libns_winbind.so"
+ ;;
+ *)
+ WINBIND_LTARGETS="libnss_winbind.so"
+ ;;
+ esac
+
case "$with_pam" in
yes)
@@ -2629,19 +2696,76 @@ else
WINBIND_PAM_TARGETS=""
fi
+# Check for FreeBSD problem with getgroups
+# It returns EGID too many times in the list of groups
+# and causes a security problem
+AC_CACHE_CHECK([whether or not getgroups returns EGID too many times],
+ samba_cv_have_getgroups_too_many_egids,[AC_TRY_RUN([
+#include <sys/types.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ gid_t groups[10];
+ int n = 10;
+
+ n = getgroups(n, &groups);
+ /* Could actually pass back the number of EGIDs there ... */
+ exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
+}],
+ samba_cv_have_getgroups_too_many_egids=no,samba_cv_have_getgroups_too_many_egids=yes, samba_cv_have_getgroups_too_many_egids=cross)])
+if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
+ AC_DEFINE(HAVE_GETGROUPS_TOO_MANY_EGIDS)
+fi
+
# Substitution time!
AC_SUBST(WINBIND_TARGETS)
AC_SUBST(WINBIND_STARGETS)
AC_SUBST(WINBIND_LTARGETS)
AC_SUBST(WINBIND_PAM_TARGETS)
+AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
+AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
+
+#################################################
+# Check to see if we should use the included popt
+
+AC_ARG_WITH(included-popt,
+[ --with-included-popt use bundled popt library, not from system],
+[
+ case "$withval" in
+ yes)
+ INCLUDED_POPT=yes
+ ;;
+ no)
+ INCLUDED_POPT=no
+ ;;
+ esac ],
+)
+if test x"$INCLUDED_POPT" != x"yes"; then
+ AC_CHECK_LIB(popt, poptGetContext,
+ INCLUDED_POPT=no, INCLUDED_POPT=yes)
+fi
+
+AC_MSG_CHECKING(whether to use included popt)
+if test x"$INCLUDED_POPT" = x"yes"; then
+ AC_MSG_RESULT($srcdir/popt)
+ BUILD_POPT='$(POPT_OBJS)'
+ FLAGS1="-I$srcdir/popt"
+else
+ AC_MSG_RESULT(no)
+ LIBS="$LIBS -lpopt"
+fi
+AC_SUBST(BUILD_POPT)
+AC_SUBST(FLAGS1)
#################################################
# final configure stuff
-echo "checking configure summary"
+AC_MSG_CHECKING([configure summary])
AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
- echo "configure OK";,
- AC_MSG_ERROR([summary failure. Aborting config]),:)
+ AC_MSG_RESULT(yes),
+ AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
+ AC_MSG_WARN([cannot run when cross-compiling]))
builddir=`pwd`
AC_SUBST(builddir)
diff --git a/source/include/byteorder.h b/source/include/byteorder.h
index fab77060be0..2cbe711a7a7 100644
--- a/source/include/byteorder.h
+++ b/source/include/byteorder.h
@@ -117,7 +117,7 @@ it also defines lots of intermediate macros, just ignore those :-)
#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
-#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(val)&0xFF,CVAL_NC(buf,pos+1)=(val)>>8)
+#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8))
#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
#define SVALS(buf,pos) ((const int16)SVAL(buf,pos))
#define IVALS(buf,pos) ((const int32)IVAL(buf,pos))
diff --git a/source/include/config.h.in b/source/include/config.h.in
index bc956315e6b..b4f454ec3fc 100644
--- a/source/include/config.h.in
+++ b/source/include/config.h.in
@@ -42,6 +42,9 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
@@ -185,7 +188,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
@@ -236,6 +242,35 @@
#undef HAVE_DEVICE_MAJOR_FN
#undef HAVE_DEVICE_MINOR_FN
#undef HAVE_MAKEDEV_FN
+#undef HAVE_GETGROUPS_TOO_MANY_EGIDS
+/*
+ * Add these definitions to allow VFS modules to
+ * see the CPPFLAGS defines.
+ */
+#ifndef _HPUX_SOURCE
+#undef _HPUX_SOURCE
+#endif
+#ifndef _POSIX_SOURCE
+#undef _POSIX_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
+#undef _LARGEFILE64_SOURCE
+#endif
+#ifndef _ALIGNMENT_REQUIRED
+#undef _ALIGNMENT_REQUIRED
+#endif
+#ifndef _MAX_ALIGNMENT
+#undef _MAX_ALIGNMENT
+#endif
+#ifndef _LARGE_FILES
+#undef _LARGE_FILES
+#endif
+#ifndef _FILE_OFFSET_BITS
+#undef _FILE_OFFSET_BITS
+#endif
+#ifndef _GNU_SOURCE
+#undef _GNU_SOURCE
+#endif
/* The number of bytes in a int. */
#undef SIZEOF_INT
@@ -489,6 +524,18 @@
/* Define if you have the crypt16 function. */
#undef HAVE_CRYPT16
+/* Define if you have the dlclose function. */
+#undef HAVE_DLCLOSE
+
+/* Define if you have the dlerror function. */
+#undef HAVE_DLERROR
+
+/* Define if you have the dlopen function. */
+#undef HAVE_DLOPEN
+
+/* Define if you have the dlsym function. */
+#undef HAVE_DLSYM
+
/* Define if you have the dup2 function. */
#undef HAVE_DUP2
@@ -741,6 +788,12 @@
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
+/* Define if you have the strlcat function. */
+#undef HAVE_STRLCAT
+
+/* Define if you have the strlcpy function. */
+#undef HAVE_STRLCPY
+
/* Define if you have the strpbrk function. */
#undef HAVE_STRPBRK
@@ -807,6 +860,9 @@
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
+/* Define if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -1002,6 +1058,9 @@
/* Define if you have the <sys/syscall.h> header file. */
#undef HAVE_SYS_SYSCALL_H
+/* Define if you have the <sys/syslog.h> header file. */
+#undef HAVE_SYS_SYSLOG_H
+
/* Define if you have the <sys/termio.h> header file. */
#undef HAVE_SYS_TERMIO_H
@@ -1020,6 +1079,9 @@
/* Define if you have the <syscall.h> header file. */
#undef HAVE_SYSCALL_H
+/* Define if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
/* Define if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
diff --git a/source/include/doserr.h b/source/include/doserr.h
index a2c53791cc8..ca0baa307d7 100644
--- a/source/include/doserr.h
+++ b/source/include/doserr.h
@@ -162,13 +162,17 @@
#define WERR_NOMEM W_ERROR(8)
#define WERR_INVALID_NAME W_ERROR(123)
#define WERR_UNKNOWN_LEVEL W_ERROR(124)
+#define WERR_OBJECT_PATH_INVALID W_ERROR(161)
#define WERR_NO_MORE_ITEMS W_ERROR(259)
#define WERR_MORE_DATA W_ERROR(234)
+#define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338)
#define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797)
#define WERR_INVALID_PRINTER_NAME W_ERROR(1801)
#define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802)
#define WERR_INVALID_DATATYPE W_ERROR(1804)
#define WERR_INVALID_ENVIRONMENT W_ERROR(1805)
+#define WERR_INVALID_FORM_NAME W_ERROR(1902)
+#define WERR_INVALID_FORM_SIZE W_ERROR(1903)
#define WERR_BUF_TOO_SMALL W_ERROR(2123)
#define WERR_JOB_NOT_FOUND W_ERROR(2151)
#define WERR_DEST_NOT_FOUND W_ERROR(2152)
diff --git a/source/include/includes.h b/source/include/includes.h
index d19862cf124..f8dcee4aab5 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -205,7 +205,9 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#ifdef HAVE_SYSLOG_H
#include <syslog.h>
+#endif
#include <sys/file.h>
#ifdef HAVE_NETINET_TCP_H
@@ -655,7 +657,6 @@ extern int errno;
#include "nterr.h"
#include "secrets.h"
#include "messages.h"
-#include "util_list.h"
#include "util_getent.h"
@@ -685,6 +686,8 @@ extern int errno;
#include "rap.h"
+#include "popt.h"
+
#ifndef MAXCODEPAGELINES
#define MAXCODEPAGELINES 256
#endif
@@ -860,6 +863,14 @@ int rename(const char *zfrom, const char *zto);
time_t mktime(struct tm *t);
#endif
+#ifndef HAVE_STRLCPY
+size_t strlcpy(char *d, const char *s, size_t bufsize);
+#endif
+
+#ifndef HAVE_STRLCAT
+size_t strlcat(char *d, const char *s, size_t bufsize);
+#endif
+
#ifndef HAVE_FTRUNCATE
int ftruncate(int f,long l);
#endif
@@ -917,7 +928,7 @@ int vasprintf(char **ptr, const char *format, va_list ap);
/* Load header file for libdl stuff */
-#ifdef HAVE_LIBDL
+#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
@@ -966,6 +977,39 @@ int vasprintf(char **ptr, const char *format, va_list ap);
#define S_IXOTH 00001 /* execute permission: other */
#endif
+/* For sys_adminlog(). */
+#ifndef LOG_EMERG
+#define LOG_EMERG 0 /* system is unusable */
+#endif
+
+#ifndef LOG_ALERT
+#define LOG_ALERT 1 /* action must be taken immediately */
+#endif
+
+#ifndef LOG_CRIT
+#define LOG_CRIT 2 /* critical conditions */
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 3 /* error conditions */
+#endif
+
+#ifndef LOG_WARNING
+#define LOG_WARNING 4 /* warning conditions */
+#endif
+
+#ifndef LOG_NOTICE
+#define LOG_NOTICE 5 /* normal but significant condition */
+#endif
+
+#ifndef LOG_INFO
+#define LOG_INFO 6 /* informational */
+#endif
+
+#ifndef LOG_DEBUG
+#define LOG_DEBUG 7 /* debug-level messages */
+#endif
+
/* NetBSD doesn't have these */
#ifndef SHM_R
#define SHM_R 0400
diff --git a/source/include/kanji.h b/source/include/kanji.h
index 58774a699df..bbe7da3719c 100644
--- a/source/include/kanji.h
+++ b/source/include/kanji.h
@@ -29,55 +29,55 @@
/* FOR SHIFT JIS CODE */
#define is_shift_jis(c) \
- ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \
- || (0xe0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc))
+ ((0x81 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0x9f) \
+ || (0xe0 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xfc))
#define is_shift_jis2(c) \
- (0x40 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc \
- && ((unsigned char) (c)) != 0x7f)
-#define is_kana(c) ((0xa0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xdf))
+ (0x40 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xfc \
+ && ((const unsigned char) (c)) != 0x7f)
+#define is_kana(c) ((0xa0 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xdf))
/* case conversion */
#define is_sj_upper2(c) \
- ((0x60 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x79))
+ ((0x60 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x79))
#define is_sj_lower2(c) \
- ((0x81 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x9A))
+ ((0x81 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x9A))
#define sjis_alph 0x82
-#define is_sj_alph(c) (sjis_alph == (unsigned char) (c))
+#define is_sj_alph(c) (sjis_alph == (const unsigned char) (c))
#define is_sj_upper(c1, c2) (is_sj_alph (c1) && is_sj_upper2 (c2))
#define is_sj_lower(c1, c2) (is_sj_alph (c1) && is_sj_lower2 (c2))
#define sj_toupper2(c) \
- (is_sj_lower2 (c) ? ((int) ((unsigned char) (c) - 0x81 + 0x60)) : \
- ((int) (unsigned char) (c)))
+ (is_sj_lower2 (c) ? ((const int) ((const unsigned char) (c) - 0x81 + 0x60)) : \
+ ((int) (const unsigned char) (c)))
#define sj_tolower2(c) \
- (is_sj_upper2 (c) ? ((int) ((unsigned char) (c) - 0x60 + 0x81)) : \
- ((int) (unsigned char) (c)))
+ (is_sj_upper2 (c) ? ((const int) ((const unsigned char) (c) - 0x60 + 0x81)) : \
+ ((const int) (const unsigned char) (c)))
#define is_sj_ru_upper2(c) \
- ((0x40 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x60))
+ ((0x40 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x60))
#define is_sj_ru_lower2(c) \
- (((0x70 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x7e)) || \
- ((0x80 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x91)))
+ (((0x70 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x7e)) || \
+ ((0x80 <= (const unsigned char) (c)) && ((const unsigned char) (c) <= 0x91)))
#define sjis_russian 0x84
-#define is_sj_russian(c) (sjis_russian == (unsigned char) (c))
+#define is_sj_russian(c) (sjis_russian == (const unsigned char) (c))
#define is_sj_ru_upper(c1, c2) (is_sj_russian (c1) && is_sj_ru_upper2 (c2))
#define is_sj_ru_lower(c1, c2) (is_sj_russian (c1) && is_sj_ru_lower2 (c2))
#define sj_ru_toupper2(c) \
- (is_sj_ru_lower2 (c) ? ((int) ((unsigned char) (c) + \
- (((unsigned char)(c) >= 0x4f) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \
- ((int) (unsigned char) (c)))
+ (is_sj_ru_lower2 (c) ? ((const int) ((const unsigned char) (c) + \
+ (((const unsigned char)(c) >= 0x4f) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \
+ ((const int) (const unsigned char) (c)))
#define sj_ru_tolower2(c) \
- (is_sj_ru_upper2 (c) ? ((int) ((unsigned char) (c) - \
- (((unsigned char)(c) >= 0x80) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \
- ((int) (unsigned char) (c)))
+ (is_sj_ru_upper2 (c) ? ((const int) ((const unsigned char) (c) - \
+ (((const unsigned char)(c) >= 0x80) ? (0x70 - 0x40) : (0x80 - 0x4f)))) : \
+ ((const int) (const unsigned char) (c)))
#ifdef _KANJI_C_
/* FOR EUC CODE */
#define euc_kana (0x8e)
-#define is_euc_kana(c) (((unsigned char) (c)) == euc_kana)
-#define is_euc(c) (0xa0 < ((unsigned char) (c)) && ((unsigned char) (c)) < 0xff)
+#define is_euc_kana(c) (((const unsigned char) (c)) == euc_kana)
+#define is_euc(c) (0xa0 < ((const unsigned char) (c)) && ((const unsigned char) (c)) < 0xff)
#define euc_sup (0x8f)
-#define is_euc_sup(c) (((unsigned char ) (c)) == euc_sup)
+#define is_euc_sup(c) (((const unsigned char ) (c)) == euc_sup)
/* FOR JIS CODE */
/* default jis third shift code, use for output */
@@ -96,18 +96,18 @@
#define jis_si (0x0f)
#define jis_si1 ('(')
#define jis_si2 ('J')
-#define is_esc(c) (((unsigned char) (c)) == jis_esc)
-#define is_so1(c) (((unsigned char) (c)) == jis_so1)
-#define is_so2(c) (((unsigned char) (c)) == jis_so2 || ((unsigned char) (c)) == '@')
-#define is_si1(c) (((unsigned char) (c)) == jis_si1)
-#define is_si2(c) (((unsigned char) (c)) == jis_si2 || ((unsigned char) (c)) == 'B' \
- || ((unsigned char) (c)) == 'H')
-#define is_so(c) (((unsigned char) (c)) == jis_so)
-#define is_si(c) (((unsigned char) (c)) == jis_si)
+#define is_esc(c) (((const unsigned char) (c)) == jis_esc)
+#define is_so1(c) (((const unsigned char) (c)) == jis_so1)
+#define is_so2(c) (((const unsigned char) (c)) == jis_so2 || ((const unsigned char) (c)) == '@')
+#define is_si1(c) (((const unsigned char) (c)) == jis_si1)
+#define is_si2(c) (((const unsigned char) (c)) == jis_si2 || ((const unsigned char) (c)) == 'B' \
+ || ((const unsigned char) (c)) == 'H')
+#define is_so(c) (((const unsigned char) (c)) == jis_so)
+#define is_si(c) (((const unsigned char) (c)) == jis_si)
#define junet_kana1 ('(')
#define junet_kana2 ('I')
-#define is_juk1(c) (((unsigned char) (c)) == junet_kana1)
-#define is_juk2(c) (((unsigned char) (c)) == junet_kana2)
+#define is_juk1(c) (((const unsigned char) (c)) == junet_kana1)
+#define is_juk2(c) (((const unsigned char) (c)) == junet_kana2)
#define _KJ_ROMAN (0)
#define _KJ_KANJI (1)
@@ -116,22 +116,22 @@
/* FOR HEX */
#define HEXTAG ':'
#define hex2bin(x) \
- ( ((int) '0' <= ((int) (x)) && ((int) (x)) <= (int)'9')? \
- (((int) (x))-(int)'0'): \
- ((int) 'a'<= ((int) (x)) && ((int) (x))<= (int) 'f')? \
- (((int) (x)) - (int)'a'+10): \
- (((int) (x)) - (int)'A'+10) )
+ ( ((const int) '0' <= ((const int) (x)) && ((const int) (x)) <= (const int)'9')? \
+ (((const int) (x))-(const int)'0'): \
+ ((const int) 'a'<= ((const int) (x)) && ((const int) (x))<= (const int) 'f')? \
+ (((const int) (x)) - (const int)'a'+10): \
+ (((const int) (x)) - (const int)'A'+10) )
#define bin2hex(x) \
- ( (((int) (x)) >= 10)? (((int) (x))-10 + (int) 'a'): (((int) (x)) + (int) '0') )
+ ( (((const int) (x)) >= 10)? (((const int) (x))-10 + (const int) 'a'): (((const int) (x)) + (const int) '0') )
/* For Hangul (Korean - code page 949). */
-#define is_hangul(c) ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfd))
+#define is_hangul(c) ((0x81 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xfd))
/* For traditional Chinese (known as Big5 encoding - code page 950). */
-#define is_big5_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf9))
+#define is_big5_c1(c) ((0xa1 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xf9))
/* For simplified Chinese (code page - 936). */
-#define is_simpch_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf7))
+#define is_simpch_c1(c) ((0xa1 <= ((const unsigned char) (c)) && ((const unsigned char) (c)) <= 0xf7))
#else /* not _KANJI_C_ */
@@ -164,9 +164,11 @@ extern char *(*multibyte_strchr)(const char *s, int c);
extern char *(*multibyte_strrchr)(const char *s, int c);
extern char *(*multibyte_strstr)(const char *s1, const char *s2);
extern char *(*multibyte_strtok)(char *s1, const char *s2);
-extern char *(*_dos_to_unix)(char *str, BOOL overwrite);
-extern char *(*_unix_to_dos)(char *str, BOOL overwrite);
-extern char *(*_dos_to_dos)(char *str, BOOL overwrite);
+extern char *(*_dos_to_unix)(char *str);
+extern char *(*_dos_to_unix_static)(const char *str);
+extern char *(*_unix_to_dos)(char *str);
+extern char *(*_unix_to_dos_static)(const char *str);
+extern char *(*_dos_to_dos_static)(const char *str);
extern BOOL (*is_multibyte_char)(char c);
extern int (*_skip_multibyte_char)(char c);
@@ -174,9 +176,11 @@ extern int (*_skip_multibyte_char)(char c);
#define strrchr(s1, c) ((*multibyte_strrchr)((s1), (c)))
#define strstr(s1, s2) ((*multibyte_strstr)((s1), (s2)))
#define strtok(s1, s2) ((*multibyte_strtok)((s1), (s2)))
-#define dos_to_unix(x,y) ((*_dos_to_unix)((x), (y)))
-#define unix_to_dos(x,y) ((*_unix_to_dos)((x), (y)))
-#define dos_to_dos(x,y) ((*_dos_to_dos)((x), (y)))
+#define dos_to_unix(x) ((*_dos_to_unix)(x))
+#define dos_to_unix_static(x) ((*_dos_to_unix_static)(x))
+#define unix_to_dos(x) ((*_unix_to_dos)(x))
+#define unix_to_dos_static(x) ((*_unix_to_dos_static)(x))
+#define dos_to_dos_static(x) ((*_dos_to_dos)(x))
#define skip_multibyte_char(c) ((*_skip_multibyte_char)((c)))
#endif /* _KANJI_C_ */
@@ -197,8 +201,8 @@ extern int (*_skip_multibyte_char)(char c);
/* For conversion */
-#define EXTSJISC(c) (0xf0 <= ((unsigned char)(c)) \
- && ((unsigned char)(c) <= 0xfc))
+#define EXTSJISC(c) (0xf0 <= ((const unsigned char)(c)) \
+ && ((const unsigned char)(c) <= 0xfc))
#define GETAHI (0x81)
#define GETALO (0xac)
diff --git a/source/include/messages.h b/source/include/messages.h
index dfbc4862117..f49055b3bd8 100644
--- a/source/include/messages.h
+++ b/source/include/messages.h
@@ -36,8 +36,8 @@
#define MSG_FORCE_ELECTION 1001
/* rpc messages */
-#define MSG_PRINTER_NOTIFY 2001
-#define MSG_PRINTER_UPDATE 2002
+#define MSG_PRINTER_NOTIFY 2001
+#define MSG_PRINTER_DRVUPGRADE 2002
/* smbd messages */
#define MSG_SMB_CONF_UPDATED 3001
diff --git a/source/include/msdfs.h b/source/include/msdfs.h
index 1a5c5d52a83..8c887e4d213 100644
--- a/source/include/msdfs.h
+++ b/source/include/msdfs.h
@@ -61,21 +61,24 @@ struct dfs_path
#ifdef WITH_MSDFS
-#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) \
-{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && \
- lp_host_msdfs() && dfs_redirect(name,conn,False)) \
+#define RESOLVE_DFSPATH(name, conn, inbuf, outbuf) \
+{ if ((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && \
+ lp_host_msdfs() && lp_msdfs_root(SNUM(conn)) && \
+ dfs_redirect(name,conn,False)) \
return(dfs_path_error(inbuf,outbuf)); }
-#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) \
-{ if ( (SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) || \
- ((get_remote_arch() == RA_WIN95) && lp_msdfs_root(SNUM(conn))) )\
- if (lp_host_msdfs() && dfs_redirect(name,conn,True)) \
+#define RESOLVE_FINDFIRST_DFSPATH(name, conn, inbuf, outbuf) \
+{ if ( (SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) || \
+ ((get_remote_arch() == RA_WIN95) && lp_msdfs_root(SNUM(conn))) ) \
+ if (lp_host_msdfs() && dfs_redirect(name,conn,True)) \
return(dfs_path_error(inbuf,outbuf)); }
-#define init_dfsroot(conn, inbuf, outbuf) \
-{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \
- DEBUG(1,("Serving %s as a Dfs root\n", lp_servicename(SNUM(conn)) )); \
- SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS | SVAL(outbuf, smb_vwv2)); \
+#define init_dfsroot(conn, inbuf, outbuf) \
+{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \
+ DEBUG(2,("Serving %s as a Dfs root\n", \
+ lp_servicename(SNUM(conn)) )); \
+ SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS \
+ | SVAL(outbuf, smb_vwv2)); \
} }
#else
diff --git a/source/include/nterr.h b/source/include/nterr.h
index 69b5d7981de..fa96869b63a 100644
--- a/source/include/nterr.h
+++ b/source/include/nterr.h
@@ -30,10 +30,13 @@
#define STATUS_BUFFER_OVERFLOW NT_STATUS(0x80000005)
#define NT_STATUS_NO_MORE_ENTRIES NT_STATUS(0x8000001a)
-#define STATUS_MORE_ENTRIES NT_STATUS(0x0105)
#define ERROR_INVALID_PARAMETER NT_STATUS(0x0057)
#define ERROR_INSUFFICIENT_BUFFER NT_STATUS(0x007a)
-#define STATUS_1804 NT_STATUS(0x070c)
+#define STATUS_MORE_ENTRIES NT_STATUS(0x0105)
+#define STATUS_SOME_UNMAPPED NT_STATUS(0x0107)
+#define ERROR_INVALID_DATATYPE NT_STATUS(0x070c)
+
+#define STATUS_MORE_ENTRIES NT_STATUS(0x0105)
#define STATUS_NOTIFY_ENUM_DIR NT_STATUS(0x010c)
/* Win32 Error codes extracted using a loop in smbclient then printing a
diff --git a/source/include/printing.h b/source/include/printing.h
index ee0b25d63fd..53a5df69484 100644
--- a/source/include/printing.h
+++ b/source/include/printing.h
@@ -1,3 +1,6 @@
+#ifndef PRINTING_H_
+#define PRINTING_H_
+
/*
Unix SMB/Netbios implementation.
Version 3.0
@@ -34,12 +37,13 @@ struct printjob {
time_t starttime; /* when the job started spooling */
int status; /* the status of this job */
size_t size; /* the size of the job so far */
+ int page_count; /* then number of pages so far */
BOOL spooled; /* has it been sent to the spooler yet? */
BOOL smbjob; /* set if the job is a SMB job */
fstring filename; /* the filename used to spool the file */
fstring jobname; /* the job name given to us by the client */
fstring user; /* the user who started the job */
- fstring qname; /* name of the print queue the job was sent to */
+ fstring queuename; /* service number of printer for this job */
};
/* Information for print interfaces */
@@ -65,5 +69,9 @@ extern struct printif cups_printif;
#define UNIX_JOB_START PRINT_MAX_JOBID
#define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
+#define MAX_CACHE_VALID_TIME 3600
+
#define PRINT_SPOOL_PREFIX "smbprn."
-#define PRINT_DATABASE_VERSION 2
+#define PRINT_DATABASE_VERSION 4
+
+#endif /* PRINTING_H_ */
diff --git a/source/include/proto.h b/source/include/proto.h
index 4d52cf9d370..81db73a6926 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -3,12 +3,12 @@
/* This file is automatically generated with "make proto". DO NOT EDIT */
-/*The following definitions come from client/client.c */
+/* The following definitions come from client/client.c */
void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs);
struct cli_state *do_connect(char *server, char *share);
-/*The following definitions come from client/clitar.c */
+/* The following definitions come from client/clitar.c */
void cmd_block(void);
void cmd_tarmode(void);
@@ -17,13 +17,13 @@ void cmd_tar(void);
int process_tar(void);
int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind);
-/*The following definitions come from lib/access.c */
+/* The following definitions come from lib/access.c */
BOOL allow_access(char *deny_list,char *allow_list,
char *cname,char *caddr);
BOOL check_access(int sock, char *allow_list, char *deny_list);
-/*The following definitions come from lib/bitmap.c */
+/* The following definitions come from lib/bitmap.c */
struct bitmap *bitmap_allocate(int n);
void bitmap_free(struct bitmap *bm);
@@ -32,29 +32,31 @@ BOOL bitmap_clear(struct bitmap *bm, unsigned i);
BOOL bitmap_query(struct bitmap *bm, unsigned i);
int bitmap_find(struct bitmap *bm, unsigned ofs);
-/*The following definitions come from lib/charcnv.c */
+/* The following definitions come from lib/charcnv.c */
-char *unix2dos_format(char *str,BOOL overwrite);
-char *dos2unix_format(char *str, BOOL overwrite);
+char *unix2dos_format_static(const char *str);
+char *unix2dos_format(char *str);
+char *dos2unix_format_static(const char *str);
+char *dos2unix_format(char *str);
void interpret_character_set(char *str, int codepage);
-/*The following definitions come from lib/charset.c */
+/* The following definitions come from lib/charset.c */
void charset_initialise(void);
void codepage_initialise(int client_codepage);
void add_char_string(char *s);
-/*The following definitions come from lib/crc32.c */
+/* The following definitions come from lib/crc32.c */
uint32 crc32_calc_buffer( char *buffer, uint32 count);
-/*The following definitions come from lib/debug.c */
+/* The following definitions come from lib/debug.c */
char* debug_classname_from_index(int ndx);
int debug_lookup_classname(char* classname);
BOOL debug_parse_params(char **params, int *debuglevel_class);
BOOL debug_parse_levels(char *params_str);
-void debug_message(int msg_type, pid_t src, void *buf, size_t len);
+void debug_message(int msg_level, pid_t src, void *buf, size_t len);
void debug_message_send(pid_t pid, int level);
void setup_logging(char *pname, BOOL interactive);
BOOL reopen_logs( void );
@@ -64,29 +66,29 @@ void check_log_size( void );
void dbgflush( void );
BOOL dbghdr( int level, char *file, char *func, int line );
-/*The following definitions come from lib/error.c */
+/* The following definitions come from lib/error.c */
NTSTATUS map_nt_error_from_unix(int unix_error);
-/*The following definitions come from lib/fault.c */
+/* The following definitions come from lib/fault.c */
void fault_setup(void (*fn)(void *));
-/*The following definitions come from lib/fsusage.c */
+/* The following definitions come from lib/fsusage.c */
int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-/*The following definitions come from lib/genrand.c */
+/* The following definitions come from lib/genrand.c */
void set_rand_reseed_data(unsigned char *data, size_t len);
void generate_random_buffer( unsigned char *out, int len, BOOL do_reseed_now);
char *generate_random_str(size_t len);
-/*The following definitions come from lib/getsmbpass.c */
+/* The following definitions come from lib/getsmbpass.c */
char *getsmbpass(char *prompt) ;
-/*The following definitions come from lib/hash.c */
+/* The following definitions come from lib/hash.c */
BOOL hash_table_init(hash_table *table, int num_buckets, compare_function compare_func);
hash_element *hash_lookup(hash_table *table, char *key);
@@ -94,7 +96,7 @@ hash_element *hash_insert(hash_table *table, char *value, char *key);
void hash_remove(hash_table *table, hash_element *hash_elem);
void hash_clear(hash_table *table);
-/*The following definitions come from lib/interface.c */
+/* The following definitions come from lib/interface.c */
void load_interfaces(void);
BOOL interfaces_changed(void);
@@ -109,64 +111,77 @@ unsigned iface_hash(void);
struct in_addr *iface_bcast(struct in_addr ip);
struct in_addr *iface_ip(struct in_addr ip);
-/*The following definitions come from lib/interfaces.c */
+/* The following definitions come from lib/interfaces.c */
int get_interfaces(struct iface_struct *ifaces, int max_interfaces);
-/*The following definitions come from lib/kanji.c */
+/* The following definitions come from lib/kanji.c */
void interpret_coding_system(char *str);
void initialize_multibyte_vectors( int client_codepage);
-/*The following definitions come from lib/md4.c */
+/* The following definitions come from lib/md4.c */
void mdfour(unsigned char *out, unsigned char *in, int n);
-/*The following definitions come from lib/messages.c */
+/* The following definitions come from lib/messages.c */
void ping_message(int msg_type, pid_t src, void *buf, size_t len);
void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len);
BOOL message_init(void);
-BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL duplicates_allowed);
+BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len,
+ BOOL duplicates_allowed);
void message_dispatch(void);
void message_register(int msg_type,
void (*fn)(int msg_type, pid_t pid, void *buf, size_t len));
void message_deregister(int msg_type);
-BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len, BOOL duplicates_allowed);
+BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type,
+ const void *buf, size_t len,
+ BOOL duplicates_allowed,
+ int *n_sent);
+BOOL message_named_mutex(char *name, unsigned int timeout);
+void message_named_mutex_release(char *name);
-/*The following definitions come from lib/ms_fnmatch.c */
+/* The following definitions come from lib/ms_fnmatch.c */
int ms_fnmatch(const char *pattern, const char *string);
-/*The following definitions come from lib/pidfile.c */
+/* The following definitions come from lib/pam_errors.c */
+
+NTSTATUS pam_to_nt_status(int pam_error);
+int nt_status_to_pam(NTSTATUS nt_status);
+NTSTATUS pam_to_nt_status(int pam_error);
+int nt_status_to_pam(NTSTATUS nt_status);
+
+/* The following definitions come from lib/pidfile.c */
pid_t pidfile_pid(char *name);
void pidfile_create(char *name);
-/*The following definitions come from lib/readline.c */
+/* The following definitions come from lib/readline.c */
char *smb_readline(char *prompt, void (*callback)(void),
char **(completion_fn)(const char *text, int start, int end));
void cmd_history(void);
-/*The following definitions come from lib/replace.c */
+/* The following definitions come from lib/replace.c */
char *rep_inet_ntoa(struct in_addr ip);
-/*The following definitions come from lib/select.c */
+/* The following definitions come from lib/select.c */
void sys_select_signal(void);
int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval);
-/*The following definitions come from lib/signal.c */
+/* The following definitions come from lib/signal.c */
void BlockSignals(BOOL block,int signum);
void CatchSignal(int signum,void (*handler)(int ));
void CatchChild(void);
void CatchChildLeaveStatus(void);
-/*The following definitions come from libsmb/cliconnect.c */
+/* The following definitions come from libsmb/cliconnect.c */
BOOL cli_session_setup(struct cli_state *cli,
char *user,
@@ -187,10 +202,16 @@ BOOL cli_establish_connection(struct cli_state *cli,
struct nmb_name *calling, struct nmb_name *called,
char *service, char *service_type,
BOOL do_shutdown, BOOL do_tcon);
+NTSTATUS cli_full_connection(struct cli_state **output_cli,
+ const char *my_name, const char *dest_host,
+ struct in_addr *dest_ip, int port,
+ char *service, char *service_type,
+ char *user, char *domain,
+ char *password, int pass_len) ;
BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost,
struct in_addr *pdest_ip);
-/*The following definitions come from libsmb/cli_dfs.c */
+/* The following definitions come from libsmb/cli_dfs.c */
struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name,
struct ntuser_creds *creds);
@@ -207,7 +228,7 @@ NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 info_level, DFS_INFO_CTR *ctr);
-/*The following definitions come from libsmb/clidgram.c */
+/* The following definitions come from libsmb/clidgram.c */
int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot,
char *buf, int len,
@@ -219,7 +240,7 @@ int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int
int cli_get_backup_list(const char *myname, const char *send_to_name);
int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize);
-/*The following definitions come from libsmb/clientgen.c */
+/* The following definitions come from libsmb/clientgen.c */
int cli_set_port(struct cli_state *cli, int port);
BOOL cli_receive_smb(struct cli_state *cli);
@@ -232,7 +253,7 @@ void cli_shutdown(struct cli_state *cli);
void cli_sockopt(struct cli_state *cli, char *options);
uint16 cli_setpid(struct cli_state *cli, uint16 pid);
-/*The following definitions come from libsmb/clierror.c */
+/* The following definitions come from libsmb/clierror.c */
char *cli_errstr(struct cli_state *cli);
NTSTATUS cli_nt_error(struct cli_state *cli);
@@ -244,7 +265,7 @@ BOOL cli_is_error(struct cli_state *cli);
BOOL cli_is_nt_error(struct cli_state *cli);
BOOL cli_is_dos_error(struct cli_state *cli);
-/*The following definitions come from libsmb/clifile.c */
+/* The following definitions come from libsmb/clifile.c */
uint32 unix_perms_to_wire(mode_t perms);
BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst);
@@ -262,6 +283,8 @@ int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredA
int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess);
int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
BOOL cli_close(struct cli_state *cli, int fnum);
+NTSTATUS cli_locktype(struct cli_state *cli, int fnum,
+ uint32 offset, uint32 len, int timeout, unsigned char locktype);
BOOL cli_lock(struct cli_state *cli, int fnum,
uint32 offset, uint32 len, int timeout, enum brl_type lock_type);
BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len);
@@ -278,7 +301,7 @@ BOOL cli_chkpath(struct cli_state *cli, const char *path);
BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path);
-/*The following definitions come from libsmb/clilist.c */
+/* The following definitions come from libsmb/clilist.c */
int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
void (*fn)(file_info *, const char *, void *), void *state);
@@ -287,7 +310,7 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
void (*fn)(file_info *, const char *, void *), void *state);
-/*The following definitions come from libsmb/cli_lsarpc.c */
+/* The following definitions come from libsmb/cli_lsarpc.c */
struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name,
struct ntuser_creds *creds);
@@ -299,10 +322,11 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol);
NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, int num_sids, DOM_SID *sids,
- char ***names, uint32 **types, int *num_names);
+ char ***domains, char ***names, uint32 **types);
NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, int num_names, char **names,
- DOM_SID **sids, uint32 **types, int *num_sids);
+ POLICY_HND *pol, int num_names,
+ const char **names, DOM_SID **sids,
+ uint32 **types);
NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
fstring domain_name, DOM_SID *domain_sid);
@@ -319,29 +343,41 @@ NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length,
uint32 *num_sids, DOM_SID **sids);
+NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access,
+ POLICY_HND *user_pol);
+NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 *count, LUID_ATTR **set);
+NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, char *name, LUID *luid);
+NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 sec_info,
+ SEC_DESC_BUF **psdb);
BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid);
-/*The following definitions come from libsmb/climessage.c */
+/* The following definitions come from libsmb/climessage.c */
BOOL cli_message_start(struct cli_state *cli, char *host, char *username,
int *grp);
BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp);
BOOL cli_message_end(struct cli_state *cli, int grp);
-/*The following definitions come from libsmb/cli_netlogon.c */
+/* The following definitions come from libsmb/cli_netlogon.c */
struct cli_state *cli_netlogon_initialise(struct cli_state *cli,
char *system_name,
struct ntuser_creds *creds);
NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal,
DOM_CHAL *srv_chal);
-NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
+NTSTATUS new_cli_net_auth2(struct cli_state *cli,
+ uint16 sec_chan,
uint32 neg_flags, DOM_CHAL *srv_chal);
NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli,
- unsigned char mach_pwd[16]);
+ uint16 sec_chan,
+ const unsigned char mach_pwd[16]);
NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 query_level);
-NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds,
uint32 database_id, uint32 *num_deltas,
SAM_DELTA_HDR **hdr_deltas,
SAM_DELTA_CTR **deltas);
@@ -353,27 +389,32 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
char *username, char *password,
int logon_type);
+NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ const char *username, const char *domain, const char *workstation,
+ const uint8 chal[8],
+ DATA_BLOB lm_response, DATA_BLOB nt_response,
+ NET_USER_INFO_3 *info3);
-/*The following definitions come from libsmb/clioplock.c */
+/* The following definitions come from libsmb/clioplock.c */
BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level);
void cli_oplock_handler(struct cli_state *cli,
BOOL (*handler)(struct cli_state *, int, unsigned char));
-/*The following definitions come from libsmb/cli_pipe_util.c */
+/* The following definitions come from libsmb/cli_pipe_util.c */
struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name,
char *pipe_name,
struct ntuser_creds *creds);
void cli_pipe_shutdown(struct cli_state *cli);
-/*The following definitions come from libsmb/cliprint.c */
+/* The following definitions come from libsmb/cliprint.c */
int cli_print_queue(struct cli_state *cli,
void (*fn)(struct print_job_info *));
int cli_printjob_del(struct cli_state *cli, int job);
-/*The following definitions come from libsmb/clirap.c */
+/* The following definitions come from libsmb/clirap.c */
BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name,
uint16 *setup, uint32 setup_count, uint32 max_setup_count,
@@ -407,7 +448,7 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata);
NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
-/*The following definitions come from libsmb/clireadwrite.c */
+/* The following definitions come from libsmb/clireadwrite.c */
ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size);
@@ -417,7 +458,7 @@ ssize_t cli_write(struct cli_state *cli,
ssize_t cli_smbwrite(struct cli_state *cli,
int fnum, char *buf, off_t offset, size_t size1);
-/*The following definitions come from libsmb/cli_reg.c */
+/* The following definitions come from libsmb/cli_reg.c */
struct cli_state *cli_winreg_initialise(struct cli_state *cli,
char *system_name,
@@ -426,7 +467,7 @@ NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx,
const char *msg, uint32 timeout, uint16 flags);
NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx);
-/*The following definitions come from libsmb/cli_samr.c */
+/* The following definitions come from libsmb/cli_samr.c */
struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name,
struct ntuser_creds *creds);
@@ -452,6 +493,9 @@ NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *user_pol, uint32 *num_groups,
DOM_GID **gid);
+NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid,
+ uint32 *num_aliases, uint32 **als_rids);
NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *group_pol, uint32 *num_mem,
uint32 **rid, uint32 **attr);
@@ -459,6 +503,10 @@ NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint32 *start_idx,
uint32 size, struct acct_info **dom_groups,
uint32 *num_dom_groups);
+NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 *start_idx,
+ uint32 size, struct acct_info **dom_groups,
+ uint32 *num_dom_groups);
NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *alias_pol, uint32 *num_mem,
DOM_SID **sids);
@@ -494,98 +542,88 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uchar sess_key[16], SAM_USERINFO_CTR *ctr);
NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *user_pol);
+NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *user_pol, uint16 switch_value,
+ TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf);
-/*The following definitions come from libsmb/clisecdesc.c */
+/* The following definitions come from libsmb/clisecdesc.c */
SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum,
TALLOC_CTX *mem_ctx);
BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd);
-/*The following definitions come from libsmb/cli_spoolss.c */
+/* The following definitions come from libsmb/cli_spoolss.c */
struct cli_state *cli_spoolss_initialise(struct cli_state *cli,
char *system_name,
struct ntuser_creds *creds);
-NTSTATUS cli_spoolss_open_printer_ex(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- char *printername,
- char *datatype,
- uint32 access_required,
- char *station,
- char *username,
- POLICY_HND *pol
-);
-NTSTATUS cli_spoolss_close_printer(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *pol
-);
-NTSTATUS cli_spoolss_enum_printers(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 flags,
- uint32 level,
- int *returned,
- PRINTER_INFO_CTR *ctr
-);
-NTSTATUS cli_spoolss_enum_ports(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- int *returned,
- PORT_INFO_CTR *ctr
-);
-NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr);
-NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr,
- uint32 command);
-NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 level, char* env,
- PRINTER_DRIVER_CTR *ctr);
-NTSTATUS cli_spoolss_enumprinterdrivers (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- char* env,
- uint32 *returned,
- PRINTER_DRIVER_CTR *ctr
-);
-NTSTATUS cli_spoolss_getprinterdriverdir (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- char* env,
- DRIVER_DIRECTORY_CTR *ctr
-);
-NTSTATUS cli_spoolss_addprinterdriver (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- PRINTER_DRIVER_CTR *ctr
-);
-NTSTATUS cli_spoolss_addprinterex (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- PRINTER_INFO_CTR *ctr
-);
-NTSTATUS cli_spoolss_deleteprinterdriver (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- char *arch,
- char *driver
-);
-NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- char *name,
- char *environment,
- fstring procdir);
-NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx,
+WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ char *printername, char *datatype, uint32 access_required,
+ char *station, char *username, POLICY_HND *pol);
+WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol);
+WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 flags, uint32 level,
+ uint32 *num_printers, PRINTER_INFO_CTR *ctr);
+WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 level, int *num_ports, PORT_INFO_CTR *ctr);
+WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *pol, uint32 level,
+ PRINTER_INFO_CTR *ctr);
+WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 level,
+ PRINTER_INFO_CTR *ctr, uint32 command);
+WERROR cli_spoolss_getprinterdriver(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *pol, uint32 level,
+ char *env, PRINTER_DRIVER_CTR *ctr);
+WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 level, char *env,
+ uint32 *num_drivers,
+ PRINTER_DRIVER_CTR *ctr);
+WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 level, char *env,
+ DRIVER_DIRECTORY_CTR *ctr);
+WERROR cli_spoolss_addprinterdriver (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, uint32 level,
+ PRINTER_DRIVER_CTR *ctr);
+WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 level, PRINTER_INFO_CTR*ctr);
+WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, char *arch,
+ char *driver);
+WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ char *name, char *environment,
+ fstring procdir);
+WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, uint32 level, FORM *form);
+WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, uint32 level, char *form_name,
+ FORM *form);
+WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *handle, char *formname, uint32 level,
+ FORM_1 *form);
+WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, char *form_name);
+WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *handle, int level, uint32 *num_forms,
+ FORM_1 **forms);
+WERROR cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, char* valname, char* value);
-/*The following definitions come from libsmb/cli_srvsvc.c */
+/* The following definitions come from libsmb/cli_srvsvc.c */
struct cli_state *cli_svrsvc_initialise(struct cli_state *cli,
char *system_name,
@@ -594,14 +632,14 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
uint32 switch_value, SRV_INFO_CTR *ctr);
-/*The following definitions come from libsmb/clistr.c */
+/* The following definitions come from libsmb/clistr.c */
int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags);
int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags);
int clistr_align_out(struct cli_state *cli, const void *p, int flags);
int clistr_align_in(struct cli_state *cli, const void *p, int flags);
-/*The following definitions come from libsmb/clitrans.c */
+/* The following definitions come from libsmb/clitrans.c */
BOOL cli_send_trans(struct cli_state *cli, int trans,
const char *pipe_name,
@@ -622,11 +660,11 @@ BOOL cli_receive_nt_trans(struct cli_state *cli,
char **param, int *param_len,
char **data, int *data_len);
-/*The following definitions come from libsmb/credentials.c */
+/* The following definitions come from libsmb/credentials.c */
-char *credstr(uchar *cred);
-void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
- uchar session_key[8]);
+char *credstr(const uchar *cred);
+void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass,
+ uchar session_key[8]);
void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp,
DOM_CHAL *cred);
int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred,
@@ -637,14 +675,18 @@ BOOL deal_with_creds(uchar sess_key[8],
DOM_CRED *sto_clnt_cred,
DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred);
-/*The following definitions come from libsmb/errormap.c */
+/* The following definitions come from libsmb/doserr.c */
+
+char *dos_errstr(WERROR werror);
+
+/* The following definitions come from libsmb/errormap.c */
NTSTATUS dos_to_ntstatus(int eclass, int ecode);
void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode);
NTSTATUS werror_to_ntstatus(WERROR error);
WERROR ntstatus_to_werror(NTSTATUS error);
-/*The following definitions come from libsmb/namequery.c */
+/* The following definitions come from libsmb/namequery.c */
struct node_status *node_status_query(int fd,struct nmb_name *name,
struct in_addr to_ip, int *num_names);
@@ -668,10 +710,10 @@ BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
BOOL find_master_ip(char *group, struct in_addr *master_ip);
BOOL lookup_dc_name(const char *srcname, const char *domain,
struct in_addr *dc_ip, char *ret_name);
-BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count);
+BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count);
BOOL get_lmb_list(struct in_addr **ip_list, int *count);
-/*The following definitions come from libsmb/nmblib.c */
+/* The following definitions come from libsmb/nmblib.c */
void debug_nmb_packet(struct packet_struct *p);
char *nmb_namestr(struct nmb_name *n);
@@ -694,18 +736,19 @@ int name_mangle( char *In, char *Out, char name_type );
int name_extract(char *buf,int ofs,char *name);
int name_len(char *s1);
-/*The following definitions come from libsmb/nterr.c */
+/* The following definitions come from libsmb/nterr.c */
char *get_nt_error_msg(NTSTATUS nt_code);
+char *nt_errstr(NTSTATUS nt_code);
char *get_nt_error_c_code(NTSTATUS nt_code);
-/*The following definitions come from libsmb/passchange.c */
+/* The following definitions come from libsmb/passchange.c */
BOOL remote_password_change(const char *remote_machine, const char *user_name,
const char *old_passwd, const char *new_passwd,
char *err_str, size_t err_str_len);
-/*The following definitions come from libsmb/pwd_cache.c */
+/* The following definitions come from libsmb/pwd_cache.c */
void pwd_init(struct pwd_info *pwd);
BOOL pwd_is_nullpwd(const struct pwd_info *pwd);
@@ -720,30 +763,30 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr);
void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]);
void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]);
-/*The following definitions come from lib/smbrun.c */
+/* The following definitions come from lib/smbrun.c */
int smbrun(char *cmd, int *outfd);
-/*The following definitions come from libsmb/smbdes.c */
+/* The following definitions come from libsmb/smbdes.c */
void E_P16(const unsigned char *p14,unsigned char *p16);
void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24);
void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out);
void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out);
-void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key);
-void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key);
-void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw);
+void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key);
+void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key);
+void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw);
void SamOEMhash( unsigned char *data, const unsigned char *key, int val);
void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw);
-/*The following definitions come from libsmb/smbencrypt.c */
+/* The following definitions come from libsmb/smbencrypt.c */
-void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24);
-void E_md4hash(uchar *passwd, uchar *p16);
+void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24);
+void E_md4hash(const uchar *passwd, uchar *p16);
void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]);
void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]);
void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]);
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24);
+void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24);
BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode);
BOOL encode_pw_buffer(char buffer[516], const char *new_pass,
int new_pw_len, BOOL nt_pass_set);
@@ -752,26 +795,25 @@ BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd,
uchar nt_p16[16], uchar p16[16]);
void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]);
-/*The following definitions come from libsmb/smberr.c */
+/* The following definitions come from libsmb/smberr.c */
char *smb_dos_err_name(uint8 class, uint16 num);
char *get_dos_error_msg(WERROR result);
char *smb_dos_err_class(uint8 class);
char *smb_dos_errstr(char *inbuf);
-char *werror_str(WERROR status);
WERROR map_werror_from_unix(int error);
-/*The following definitions come from libsmb/unexpected.c */
+/* The following definitions come from libsmb/unexpected.c */
void unexpected_packet(struct packet_struct *p);
void clear_unexpected(time_t t);
struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
char *mailslot_name);
-/*The following definitions come from lib/snprintf.c */
+/* The following definitions come from lib/snprintf.c */
-/*The following definitions come from lib/substitute.c */
+/* The following definitions come from lib/substitute.c */
void standard_sub_basic(char *str);
void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, char *str);
@@ -781,7 +823,7 @@ void standard_sub_snum(int snum, char *str);
void standard_sub_vuser(char *str, user_struct *vuser);
void standard_sub_vsnum(char *str, user_struct *vuser, int snum);
-/*The following definitions come from lib/sysacls.c */
+/* The following definitions come from lib/sysacls.c */
int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
@@ -938,9 +980,16 @@ int sys_acl_delete_def_file(const char *name);
int sys_acl_free_acl(SMB_ACL_T the_acl) ;
int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
-/*The following definitions come from lib/system.c */
+/* The following definitions come from lib/system.c */
int sys_usleep(long usecs);
+ssize_t sys_read(int fd, void *buf, size_t count);
+ssize_t sys_write(int fd, const void *buf, size_t count);
+ssize_t sys_send(int s, const void *msg, size_t len, int flags);
+ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
+ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
+int sys_fcntl_ptr(int fd, int cmd, void *arg);
+int sys_fcntl_long(int fd, int cmd, long arg);
int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
@@ -990,8 +1039,9 @@ void *sys_dlopen(const char *name, int flags);
void *sys_dlsym(void *handle, char *symbol);
int sys_dlclose (void *handle);
const char *sys_dlerror(void);
+void sys_adminlog(int priority, const char *format_str, ...);
-/*The following definitions come from lib/talloc.c */
+/* The following definitions come from lib/talloc.c */
TALLOC_CTX *talloc_init(void);
void *talloc(TALLOC_CTX *t, size_t size);
@@ -999,11 +1049,16 @@ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size);
void talloc_destroy_pool(TALLOC_CTX *t);
void talloc_destroy(TALLOC_CTX *t);
size_t talloc_pool_size(TALLOC_CTX *t);
+const char * talloc_pool_name(TALLOC_CTX const *t);
void *talloc_zero(TALLOC_CTX *t, size_t size);
-void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size);
-char *talloc_strdup(TALLOC_CTX *t, char *p);
+void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size);
+char *talloc_strdup(TALLOC_CTX *t, const char *p);
+char *talloc_describe_all(TALLOC_CTX *rt);
+void talloc_get_allocation(TALLOC_CTX *t,
+ size_t *total_bytes,
+ int *n_chunks);
-/*The following definitions come from lib/time.c */
+/* The following definitions come from lib/time.c */
time_t get_time_t_min(void);
time_t get_time_t_max(void);
@@ -1030,11 +1085,11 @@ char *timestring(BOOL hires);
time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs);
void init_nt_time(NTTIME *nt);
-/*The following definitions come from lib/ufc.c */
+/* The following definitions come from lib/ufc.c */
char *ufc_crypt(const char *key,const char *salt);
-/*The following definitions come from lib/username.c */
+/* The following definitions come from lib/username.c */
BOOL name_is_local(const char *name);
char *get_user_home_dir(char *user);
@@ -1045,7 +1100,7 @@ BOOL user_in_group_list(char *user,char *gname);
BOOL user_in_list(char *user,char *list);
struct passwd *smb_getpwnam(char *user, BOOL allow_change);
-/*The following definitions come from lib/util.c */
+/* The following definitions come from lib/util.c */
char *tmpdir(void);
BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups);
@@ -1069,7 +1124,7 @@ int set_blocking(int fd, BOOL set);
ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t),
ssize_t (*write_fn)(int, const void *, size_t));
SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n);
-void msleep(int t);
+void msleep(unsigned int t);
void become_daemon(void);
BOOL yesno(char *p);
void *Realloc(void *p,size_t size);
@@ -1079,7 +1134,8 @@ int interpret_protocol(char *str,int def);
BOOL is_ipaddress(const char *str);
uint32 interpret_addr(const char *str);
struct in_addr *interpret_addr2(const char *str);
-BOOL zero_ip(struct in_addr ip);
+BOOL is_zero_ip(struct in_addr ip);
+void zero_ip(struct in_addr *ip);
char *automount_lookup(char *user_name);
char *automount_lookup(char *user_name);
BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
@@ -1095,6 +1151,7 @@ void set_namearray(name_compare_entry **ppname_array, char *namelist);
void free_namearray(name_compare_entry *name_array);
BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
BOOL is_myname(char *s);
+const char* get_my_primary_ip (void);
BOOL is_myname_or_ipaddr(char *s);
void set_remote_arch(enum remote_arch_types type);
enum remote_arch_types get_remote_arch(void);
@@ -1109,18 +1166,24 @@ int set_maxfiles(int requested_max);
BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name);
int smb_mkstemp(char *template);
void *smb_xmalloc(size_t size);
-void *xmemdup(const void *p, size_t size);
-char *xstrdup(const char *s);
+void *smb_xmemdup(const void *p, size_t size);
+char *smb_xstrdup(const char *s);
+int smb_xvasprintf(char **ptr, const char *format, va_list ap);
void *memdup(void *p, size_t size);
char *myhostname(void);
char *lock_path(char *name);
+char *pid_path(char *name);
char *parent_dirname(const char *path);
BOOL ms_has_wild(char *s);
BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive);
BOOL unix_wild_match(char *pattern, char *string);
+DATA_BLOB data_blob(const void *p, size_t length);
+DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length);
+void data_blob_free(DATA_BLOB *d);
+void data_blob_clear(DATA_BLOB *d);
int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
-/*The following definitions come from lib/util_file.c */
+/* The following definitions come from lib/util_file.c */
BOOL do_file_lock(int fd, int waitsecs, int type);
BOOL file_lock(int fd, int type, int secs, int *plock_depth);
@@ -1141,7 +1204,7 @@ char **file_lines_pload(char *syscmd, int *numlines, BOOL convert);
void file_lines_free(char **lines);
void file_lines_slashcont(char **lines);
-/*The following definitions come from lib/util_getent.c */
+/* The following definitions come from lib/util_getent.c */
struct sys_grent * getgrent_list(void);
void grent_free (struct sys_grent *glist);
@@ -1150,16 +1213,17 @@ void pwent_free (struct sys_pwent *plist);
struct sys_userlist *get_users_in_group(const char *gname);
void free_userlist(struct sys_userlist *list_head);
-/*The following definitions come from lib/util_seaccess.c */
+/* The following definitions come from lib/util_seaccess.c */
void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping);
+void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping);
BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token,
uint32 acc_desired, uint32 *acc_granted,
NTSTATUS *status);
SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr,
BOOL child_container);
-/*The following definitions come from lib/util_sec.c */
+/* The following definitions come from lib/util_sec.c */
void sec_init(void);
uid_t sec_initial_uid(void);
@@ -1175,7 +1239,7 @@ int set_re_uid(void);
void become_user_permanently(uid_t uid, gid_t gid);
BOOL is_setuid_root(void) ;
-/*The following definitions come from lib/util_sid.c */
+/* The following definitions come from lib/util_sid.c */
void generate_wellknown_sids(void);
BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain);
@@ -1183,6 +1247,7 @@ BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *p
BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain);
void split_domain_name(const char *fullname, char *domain, char *name);
char *sid_to_string(fstring sidstr_out, DOM_SID *sid);
+const char *sid_string_static(DOM_SID *sid);
BOOL string_to_sid(DOM_SID *sidout, const char *sidstr);
BOOL sid_append_rid(DOM_SID *sid, uint32 rid);
BOOL sid_split_rid(DOM_SID *sid, uint32 *rid);
@@ -1190,12 +1255,20 @@ BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid);
void sid_copy(DOM_SID *dst, const DOM_SID *src);
DOM_SID *sid_dup(DOM_SID *src);
BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid);
+BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid);
+int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2);
int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
+int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2);
BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
+BOOL sid_check_is_domain(const DOM_SID *sid);
+BOOL sid_check_is_builtin(const DOM_SID *sid);
+BOOL sid_check_is_in_our_domain(const DOM_SID *sid);
+BOOL sid_check_is_in_builtin(const DOM_SID *sid);
size_t sid_size(DOM_SID *sid);
BOOL non_mappable_sid(DOM_SID *sid);
+char *sid_binstring(DOM_SID *sid);
-/*The following definitions come from lib/util_sock.c */
+/* The following definitions come from lib/util_sock.c */
BOOL is_a_socket(int fd);
void set_socket_options(int fd, char *options);
@@ -1218,10 +1291,12 @@ char *client_name(void);
char *client_addr(void);
char *get_socket_name(int fd);
char *get_socket_addr(int fd);
-int open_pipe_sock(char *path);
+int create_pipe_sock(const char *socket_dir,
+ const char *socket_name,
+ mode_t dir_perms);
int sock_exec(const char *prog);
-/*The following definitions come from lib/util_str.c */
+/* The following definitions come from lib/util_str.c */
void set_first_token(char *ptr);
BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize);
@@ -1260,8 +1335,9 @@ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len);
void split_at_last_component(char *path, char *front, char sep, char *back);
char *octal_string(int i);
char *string_truncate(char *s, int length);
+char *binary_string(char *buf, int len);
-/*The following definitions come from lib/util_unistr.c */
+/* The following definitions come from lib/util_unistr.c */
size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate);
size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate);
@@ -1273,12 +1349,14 @@ char *dos_unistr2_to_str(UNISTR2 *str);
void ascii_to_unistr(uint16 *dest, const char *src, int maxlen);
void unistr_to_ascii(char *dest, const uint16 *src, int len);
void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
+char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str);
uint32 buffer2_to_uint32(BUFFER2 *str);
char *dos_buffer2_to_str(BUFFER2 *str);
char *dos_buffer2_to_multistr(BUFFER2 *str);
size_t dos_struni2(char *dst, const char *src, size_t max_len);
char *dos_unistr(char *buf);
-int unistrcpy(char *dst, char *src);
+int unistrlen(uint16 *s);
+int unistrcpy(uint16 *dst, uint16 *src);
void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp);
BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp);
BOOL load_dos_unicode_map(int codepage);
@@ -1347,14 +1425,14 @@ smb_ucs2_t doscp2ucs2(int w);
int ucs2doscp(smb_ucs2_t w);
int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags);
-/*The following definitions come from lib/wins_srv.c */
+/* The following definitions come from lib/wins_srv.c */
BOOL wins_srv_load_list( char *src );
struct in_addr wins_srv_ip( void );
void wins_srv_died( struct in_addr boothill_ip );
unsigned long wins_srv_count( void );
-/*The following definitions come from locking/brlock.c */
+/* The following definitions come from locking/brlock.c */
void brl_init(int read_only);
void brl_shutdown(int read_only);
@@ -1372,12 +1450,12 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
void brl_close(SMB_DEV_T dev, SMB_INO_T ino, pid_t pid, int tid, int fnum);
int brl_forall(BRLOCK_FN(fn));
-/*The following definitions come from locking/locking.c */
+/* The following definitions come from locking/locking.c */
BOOL is_locked(files_struct *fsp,connection_struct *conn,
SMB_BIG_UINT count,SMB_BIG_UINT offset,
enum brl_type lock_type, BOOL check_self);
-NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
+NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type);
NTSTATUS do_unlock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
SMB_BIG_UINT count,SMB_BIG_UINT offset);
@@ -1403,7 +1481,7 @@ BOOL downgrade_share_oplock(files_struct *fsp);
BOOL modify_delete_flag( SMB_DEV_T dev, SMB_INO_T inode, BOOL delete_on_close);
int share_mode_forall(SHAREMODE_FN(fn));
-/*The following definitions come from locking/posix.c */
+/* The following definitions come from locking/posix.c */
int fd_close_posix(struct connection_struct *conn, files_struct *fsp);
BOOL is_posix_locked(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count, enum brl_type lock_type);
@@ -1413,10 +1491,11 @@ void posix_locking_close_file(files_struct *fsp);
BOOL posix_locking_init(int read_only);
BOOL posix_locking_end(void);
-/*The following definitions come from msdfs/msdfs.c */
+/* The following definitions come from msdfs/msdfs.c */
BOOL is_msdfs_link(connection_struct* conn, char* path,
- struct referral** reflistp, int* refcnt);
+ struct referral** reflistp, int* refcnt,
+ SMB_STRUCT_STAT *sbufp);
BOOL dfs_redirect(char* pathname, connection_struct* conn,
BOOL findfirst_flag);
BOOL get_referred_path(char *pathname, struct junction_map* jn,
@@ -1428,7 +1507,7 @@ BOOL create_msdfs_link(struct junction_map* jn, BOOL exists);
BOOL remove_msdfs_link(struct junction_map* jn);
int enum_msdfs_links(struct junction_map* jn);
-/*The following definitions come from nmbd/asyncdns.c */
+/* The following definitions come from nmbd/asyncdns.c */
int asyncdns_fd(void);
void kill_async_dns_child(void);
@@ -1440,11 +1519,11 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
struct name_record **n);
void kill_async_dns_child(void);
-/*The following definitions come from nmbd/nmbd_become_dmb.c */
+/* The following definitions come from nmbd/nmbd_become_dmb.c */
void add_domain_names(time_t t);
-/*The following definitions come from nmbd/nmbd_become_lmb.c */
+/* The following definitions come from nmbd/nmbd_become_lmb.c */
void insert_permanent_name_into_unicast( struct subnet_record *subrec,
struct nmb_name *nmbname, uint16 nb_type );
@@ -1453,7 +1532,7 @@ void unbecome_local_master_browser(struct subnet_record *subrec, struct work_rec
void become_local_master_browser(struct subnet_record *subrec, struct work_record *work);
void set_workgroup_local_master_browser_name( struct work_record *work, char *newname);
-/*The following definitions come from nmbd/nmbd_browserdb.c */
+/* The following definitions come from nmbd/nmbd_browserdb.c */
void update_browser_death_time( struct browse_cache_record *browc );
struct browse_cache_record *create_browser_in_lmb_cache( char *work_name,
@@ -1462,7 +1541,7 @@ struct browse_cache_record *create_browser_in_lmb_cache( char *work_name,
struct browse_cache_record *find_browser_in_lmb_cache( char *browser_name );
void expire_lmb_browsers( time_t t );
-/*The following definitions come from nmbd/nmbd_browsesync.c */
+/* The following definitions come from nmbd/nmbd_browsesync.c */
void dmb_expire_and_sync_browser_lists(time_t t);
void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec,
@@ -1470,10 +1549,10 @@ void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec,
void collect_all_workgroup_names_from_wins_server(time_t t);
void sync_all_dmbs(time_t t);
-/*The following definitions come from nmbd/nmbd.c */
+/* The following definitions come from nmbd/nmbd.c */
-/*The following definitions come from nmbd/nmbd_elections.c */
+/* The following definitions come from nmbd/nmbd_elections.c */
void check_master_browser_exists(time_t t);
void run_elections(time_t t);
@@ -1481,7 +1560,7 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, cha
BOOL check_elections(void);
void nmbd_message_election(int msg_type, pid_t src, void *buf, size_t len);
-/*The following definitions come from nmbd/nmbd_incomingdgrams.c */
+/* The following definitions come from nmbd/nmbd_incomingdgrams.c */
void tell_become_backup(void);
void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf);
@@ -1497,7 +1576,7 @@ void process_reset_browser(struct subnet_record *subrec,
void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf);
void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf);
-/*The following definitions come from nmbd/nmbd_incomingrequests.c */
+/* The following definitions come from nmbd/nmbd_incomingrequests.c */
void process_name_release_request(struct subnet_record *subrec,
struct packet_struct *p);
@@ -1508,23 +1587,23 @@ void process_name_registration_request(struct subnet_record *subrec,
void process_node_status_request(struct subnet_record *subrec, struct packet_struct *p);
void process_name_query_request(struct subnet_record *subrec, struct packet_struct *p);
-/*The following definitions come from nmbd/nmbd_lmhosts.c */
+/* The following definitions come from nmbd/nmbd_lmhosts.c */
void load_lmhosts_file(char *fname);
BOOL find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp);
-/*The following definitions come from nmbd/nmbd_logonnames.c */
+/* The following definitions come from nmbd/nmbd_logonnames.c */
void add_logon_names(void);
-/*The following definitions come from nmbd/nmbd_mynames.c */
+/* The following definitions come from nmbd/nmbd_mynames.c */
void register_my_workgroup_one_subnet(struct subnet_record *subrec);
BOOL register_my_workgroup_and_names(void);
void release_my_names(void);
void refresh_my_names(time_t t);
-/*The following definitions come from nmbd/nmbd_namelistdb.c */
+/* The following definitions come from nmbd/nmbd_namelistdb.c */
void set_samba_nb_type(void);
void remove_name_from_namelist( struct subnet_record *subrec,
@@ -1564,7 +1643,7 @@ void expire_names(time_t t);
void add_samba_names_to_subnet( struct subnet_record *subrec );
void dump_all_namelists(void);
-/*The following definitions come from nmbd/nmbd_namequery.c */
+/* The following definitions come from nmbd/nmbd_namequery.c */
BOOL query_name(struct subnet_record *subrec, char *name, int type,
query_name_success_function success_fn,
@@ -1576,7 +1655,7 @@ BOOL query_name_from_wins_server(struct in_addr ip_to,
query_name_fail_function fail_fn,
struct userdata_struct *userdata);
-/*The following definitions come from nmbd/nmbd_nameregister.c */
+/* The following definitions come from nmbd/nmbd_nameregister.c */
BOOL register_name(struct subnet_record *subrec,
char *name, int type, uint16 nb_flags,
@@ -1588,20 +1667,20 @@ BOOL refresh_name(struct subnet_record *subrec, struct name_record *namerec,
refresh_name_fail_function fail_fn,
struct userdata_struct *userdata);
-/*The following definitions come from nmbd/nmbd_namerelease.c */
+/* The following definitions come from nmbd/nmbd_namerelease.c */
BOOL release_name(struct subnet_record *subrec, struct name_record *namerec,
release_name_success_function success_fn,
release_name_fail_function fail_fn,
struct userdata_struct *userdata);
-/*The following definitions come from nmbd/nmbd_nodestatus.c */
+/* The following definitions come from nmbd/nmbd_nodestatus.c */
BOOL node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
struct in_addr send_ip, node_status_success_function success_fn,
node_status_fail_function fail_fn, struct userdata_struct *userdata);
-/*The following definitions come from nmbd/nmbd_packets.c */
+/* The following definitions come from nmbd/nmbd_packets.c */
uint16 get_nb_flags(char *buf);
void set_nb_flags(char *buf, uint16 nb_flags);
@@ -1673,12 +1752,12 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
struct in_addr dest_ip,struct in_addr src_ip,
int dest_port);
-/*The following definitions come from nmbd/nmbd_processlogon.c */
+/* The following definitions come from nmbd/nmbd_processlogon.c */
void process_logon_packet(struct packet_struct *p,char *buf,int len,
char *mailslot);
-/*The following definitions come from nmbd/nmbd_responserecordsdb.c */
+/* The following definitions come from nmbd/nmbd_responserecordsdb.c */
void remove_response_record(struct subnet_record *subrec,
struct response_record *rrec);
@@ -1693,7 +1772,7 @@ struct response_record *find_response_record(struct subnet_record **ppsubrec,
uint16 id);
BOOL is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec);
-/*The following definitions come from nmbd/nmbd_sendannounce.c */
+/* The following definitions come from nmbd/nmbd_sendannounce.c */
void send_browser_reset(int reset_type, char *to_name, int to_type, struct in_addr to_ip);
void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work);
@@ -1705,7 +1784,7 @@ void announce_my_servers_removed(void);
void announce_remote(time_t t);
void browse_sync_remote(time_t t);
-/*The following definitions come from nmbd/nmbd_serverlistdb.c */
+/* The following definitions come from nmbd/nmbd_serverlistdb.c */
void remove_all_servers(struct work_record *work);
struct server_record *find_server_in_workgroup(struct work_record *work, char *name);
@@ -1719,7 +1798,7 @@ void write_browse_list_entry(FILE *fp, fstring name, uint32 rec_type,
fstring local_master_browser_name, fstring description);
void write_browse_list(time_t t, BOOL force_write);
-/*The following definitions come from nmbd/nmbd_subnetdb.c */
+/* The following definitions come from nmbd/nmbd_subnetdb.c */
void close_subnet(struct subnet_record *subrec);
struct subnet_record *make_normal_subnet(struct interface *iface);
@@ -1728,20 +1807,20 @@ BOOL we_are_a_wins_client(void);
struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec);
struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec);
-/*The following definitions come from nmbd/nmbd_synclists.c */
+/* The following definitions come from nmbd/nmbd_synclists.c */
void sync_browse_lists(struct work_record *work,
char *name, int nm_type,
struct in_addr ip, BOOL local, BOOL servers);
void sync_check_completion(void);
-/*The following definitions come from nmbd/nmbd_winsproxy.c */
+/* The following definitions come from nmbd/nmbd_winsproxy.c */
void make_wins_proxy_name_query_request( struct subnet_record *subrec,
struct packet_struct *incoming_packet,
struct nmb_name *question_name);
-/*The following definitions come from nmbd/nmbd_winsserver.c */
+/* The following definitions come from nmbd/nmbd_winsserver.c */
BOOL packet_is_for_wins_server(struct packet_struct *packet);
BOOL initialise_wins(void);
@@ -1760,7 +1839,7 @@ void wins_process_name_release_request(struct subnet_record *subrec,
void initiate_wins_processing(time_t t);
void wins_write_database(BOOL background);
-/*The following definitions come from nmbd/nmbd_workgroupdb.c */
+/* The following definitions come from nmbd/nmbd_workgroupdb.c */
struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec,
const char *name);
@@ -1771,11 +1850,12 @@ void initiate_myworkgroup_startup(struct subnet_record *subrec, struct work_reco
void dump_workgroups(BOOL force_write);
void expire_workgroups_and_servers(time_t t);
-/*The following definitions come from nsswitch/wb_client.c */
+/* The following definitions come from nsswitch/wb_client.c */
-BOOL winbind_lookup_name(const char *name, DOM_SID *sid,
+BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
enum SID_NAME_USE *name_type);
-BOOL winbind_lookup_sid(DOM_SID *sid, fstring dom_name, fstring name,
+BOOL winbind_lookup_sid(DOM_SID *sid,
+ fstring dom_name, fstring name,
enum SID_NAME_USE *name_type);
BOOL winbind_sid_to_uid(uid_t *puid, DOM_SID *sid);
BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid);
@@ -1788,7 +1868,7 @@ BOOL winbind_gidtoname(fstring name, gid_t gid);
BOOL winbind_nametouid(uid_t *puid, const char *name);
BOOL winbind_nametogid(gid_t *pgid, const char *gname);
-/*The following definitions come from nsswitch/wb_common.c */
+/* The following definitions come from nsswitch/wb_common.c */
void free_response(struct winbindd_response *response);
void winbind_exclude_domain(const char *domain);
@@ -1799,7 +1879,7 @@ int winbind_open_pipe_sock(void);
int write_sock(void *buffer, int count);
int read_reply(struct winbindd_response *response);
-/*The following definitions come from param/loadparm.c */
+/* The following definitions come from param/loadparm.c */
void lp_talloc_free(void);
char *lp_logfile(void);
@@ -1813,6 +1893,7 @@ char *lp_addprinter_cmd(void);
char *lp_deleteprinter_cmd(void);
char *lp_os2_driver_map(void);
char *lp_lockdir(void);
+char *lp_piddir(void);
char *lp_utmpdir(void);
char *lp_wtmpdir(void);
BOOL lp_utmp(void);
@@ -1852,6 +1933,7 @@ char *lp_template_shell(void);
char *lp_winbind_separator(void);
BOOL lp_winbind_enum_users(void);
BOOL lp_winbind_enum_groups(void);
+BOOL lp_winbind_use_default_domain(void);
char *lp_codepagedir(void);
char *lp_ldap_server(void);
char *lp_ldap_suffix(void);
@@ -1899,6 +1981,7 @@ BOOL lp_strip_dot(void);
BOOL lp_encrypted_passwords(void);
BOOL lp_update_encrypted(void);
BOOL lp_syslog_only(void);
+BOOL lp_admin_log(void);
BOOL lp_timestamp_logs(void);
BOOL lp_debug_hires_timestamp(void);
BOOL lp_debug_pid(void);
@@ -1911,6 +1994,7 @@ BOOL lp_unix_password_sync(void);
BOOL lp_passwd_chat_debug(void);
BOOL lp_nt_smb_support(void);
BOOL lp_nt_pipe_support(void);
+BOOL lp_nt_status_support(void);
BOOL lp_stat_cache(void);
BOOL lp_allow_trusted_domains(void);
BOOL lp_restrict_anonymous(void);
@@ -1950,6 +2034,8 @@ int lp_stat_cache_size(void);
int lp_map_to_guest(void);
int lp_min_passwd_length(void);
int lp_oplock_break_wait_time(void);
+int lp_lock_spin_count(void);
+int lp_lock_sleep_time(void);
char *lp_preexec(int );
char *lp_postexec(int );
char *lp_rootpreexec(int );
@@ -1983,6 +2069,7 @@ char *lp_writelist(int );
char *lp_printer_admin(int );
char *lp_fstype(int );
char *lp_vfsobj(int );
+char *lp_vfs_options(int );
char *lp_mangled_map(int );
char *lp_veto_files(int );
char *lp_hide_files(int );
@@ -2031,6 +2118,7 @@ BOOL lp_dos_filetime_resolution(int );
BOOL lp_fake_dir_create_times(int );
BOOL lp_blocking_locks(int );
BOOL lp_inherit_perms(int );
+BOOL lp_inherit_acls(int );
BOOL lp_use_client_driver(int );
BOOL lp_default_devmode(int );
BOOL lp_nt_acl_support(int );
@@ -2048,6 +2136,7 @@ int lp_minprintspace(int );
int lp_maxprintjobs(int );
int lp_printing(int );
int lp_oplock_contention_limit(int );
+int lp_csc_policy(int );
int lp_write_cache_size(int );
char lp_magicchar(int );
int lp_winbind_cache_time(void);
@@ -2072,8 +2161,8 @@ BOOL lp_load(char *pszFname, BOOL global_only, BOOL save_defaults,
BOOL add_ipc);
void lp_resetnumservices(void);
int lp_numservices(void);
-void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(char *, BOOL));
-void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(char *, BOOL));
+void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(const char *));
+void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(const char *));
int lp_servicenumber(char *pszServiceName);
char *volume_label(int snum);
int lp_server_role(void);
@@ -2090,17 +2179,17 @@ void get_private_directory(pstring priv_dir);
void lp_set_logfile(const char *name);
const char *get_called_name(void);
-/*The following definitions come from param/params.c */
+/* The following definitions come from param/params.c */
BOOL pm_process( char *FileName,
BOOL (*sfunc)(char *),
BOOL (*pfunc)(char *, char *) );
-/*The following definitions come from passdb/machine_sid.c */
+/* The following definitions come from passdb/machine_sid.c */
BOOL pdb_generate_sam_sid(void);
-/*The following definitions come from passdb/pampass.c */
+/* The following definitions come from passdb/pampass.c */
BOOL smb_pam_claim_session(char *user, char *tty, char *rhost);
BOOL smb_pam_close_session(char *user, char *tty, char *rhost);
@@ -2111,13 +2200,13 @@ NTSTATUS smb_pam_accountcheck(const char * user);
BOOL smb_pam_claim_session(char *user, char *tty, char *rhost);
BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost);
-/*The following definitions come from passdb/pass_check.c */
+/* The following definitions come from passdb/pass_check.c */
void dfs_unlogin(void);
BOOL pass_check(char *user, char *password, int pwlen, struct passwd *pwd,
BOOL (*fn) (char *, char *));
-/*The following definitions come from passdb/passdb.c */
+/* The following definitions come from passdb/passdb.c */
BOOL initialize_password_db(BOOL reload);
BOOL pdb_init_sam(SAM_ACCOUNT **user);
@@ -2212,7 +2301,7 @@ BOOL pdb_set_unknown_6 (SAM_ACCOUNT *sampass, uint32 unkn);
BOOL pdb_set_hours (SAM_ACCOUNT *sampass, uint8 *hours);
BOOL pdb_getsampwuid (SAM_ACCOUNT* user, uid_t uid);
-/*The following definitions come from passdb/pdb_ldap.c */
+/* The following definitions come from passdb/pdb_ldap.c */
BOOL pdb_setsampwent(BOOL update);
void pdb_endsampwent(void);
@@ -2223,7 +2312,7 @@ BOOL pdb_delete_sam_account(char *sname);
BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override);
BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd);
-/*The following definitions come from passdb/pdb_nisplus.c */
+/* The following definitions come from passdb/pdb_nisplus.c */
BOOL pdb_setsampwent(BOOL update);
void pdb_endsampwent(void);
@@ -2234,7 +2323,7 @@ BOOL pdb_delete_sam_account(char *sname);
BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd);
BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override);
-/*The following definitions come from passdb/pdb_smbpasswd.c */
+/* The following definitions come from passdb/pdb_smbpasswd.c */
BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
@@ -2245,7 +2334,7 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account(SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);
-/*The following definitions come from passdb/pdb_tdb.c */
+/* The following definitions come from passdb/pdb_tdb.c */
BOOL pdb_setsampwent(BOOL update);
void pdb_endsampwent(void);
@@ -2256,7 +2345,7 @@ BOOL pdb_delete_sam_account(char *sname);
BOOL pdb_update_sam_account (SAM_ACCOUNT *newpwd, BOOL override);
BOOL pdb_add_sam_account (SAM_ACCOUNT *newpwd);
-/*The following definitions come from passdb/secrets.c */
+/* The following definitions come from passdb/secrets.c */
BOOL secrets_init(void);
void *secrets_fetch(char *key, size_t *size);
@@ -2273,22 +2362,22 @@ void reset_globals_after_fork(void);
BOOL secrets_store_ldap_pw(char* dn, char* pw);
BOOL fetch_ldap_pw(char *dn, char* pw, int len);
-/*The following definitions come from passdb/smbpassfile.c */
+/* The following definitions come from passdb/smbpassfile.c */
BOOL migrate_from_old_password_file(char *domain);
-/*The following definitions come from printing/load.c */
+/* The following definitions come from printing/load.c */
void add_all_printers(void);
void load_printers(void);
-/*The following definitions come from printing/lpq_parse.c */
+/* The following definitions come from printing/lpq_parse.c */
BOOL parse_lpq_entry(int snum,char *line,
print_queue_struct *buf,
print_status_struct *status,BOOL first);
-/*The following definitions come from printing/nt_printing.c */
+/* The following definitions come from printing/nt_printing.c */
BOOL nt_printing_init(void);
uint32 update_c_setprinter(BOOL initialize);
@@ -2316,7 +2405,7 @@ NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode);
void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr);
void get_printer_subst_params(int snum, fstring *printername, fstring *sharename, fstring *portname);
WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level);
-uint32 set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
+BOOL set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level);
WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, NT_PRINTER_PARAM *param);
WERROR get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, fstring sharename);
@@ -2338,23 +2427,23 @@ BOOL print_access_check(struct current_user *user, int snum, int access_type);
BOOL print_time_access_check(int snum);
WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_default);
-/*The following definitions come from printing/pcap.c */
+/* The following definitions come from printing/pcap.c */
BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
void pcap_printer_fn(void (*fn)(char *, char *));
-/*The following definitions come from printing/print_cups.c */
+/* The following definitions come from printing/print_cups.c */
-/*The following definitions come from printing/printfsp.c */
+/* The following definitions come from printing/printfsp.c */
files_struct *print_fsp_open(connection_struct *conn, char *fname);
void print_fsp_end(files_struct *fsp, BOOL normal_close);
-/*The following definitions come from printing/print_generic.c */
+/* The following definitions come from printing/print_generic.c */
-/*The following definitions come from printing/printing.c */
+/* The following definitions come from printing/printing.c */
BOOL print_backend_init(void);
BOOL print_job_exists(int jobid);
@@ -2369,6 +2458,7 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode);
int print_job_write(int jobid, const char *buf, int size);
int print_queue_length(int snum, print_status_struct *pstatus);
int print_job_start(struct current_user *user, int snum, char *jobname);
+void print_job_endpage(int jobid);
BOOL print_job_end(int jobid, BOOL normal_close);
int print_queue_status(int snum,
print_queue_struct **queue,
@@ -2378,18 +2468,18 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode);
BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode);
BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode);
-/*The following definitions come from printing/print_svid.c */
+/* The following definitions come from printing/print_svid.c */
void sysv_printer_fn(void (*fn)(char *, char *));
int sysv_printername_ok(char *name);
-/*The following definitions come from profile/profile.c */
+/* The following definitions come from profile/profile.c */
void profile_message(int msg_type, pid_t src, void *buf, size_t len);
void reqprofile_message(int msg_type, pid_t src, void *buf, size_t len);
BOOL profile_setup(BOOL rdonly);
-/*The following definitions come from rpc_client/cli_login.c */
+/* The following definitions come from rpc_client/cli_login.c */
NTSTATUS cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16]);
BOOL cli_nt_srv_pwset(struct cli_state *cli, unsigned char *new_hashof_mach_pwd);
@@ -2402,7 +2492,7 @@ NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *usernam
NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
BOOL cli_nt_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr);
-/*The following definitions come from rpc_client/cli_netlogon.c */
+/* The following definitions come from rpc_client/cli_netlogon.c */
BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level);
NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
@@ -2413,7 +2503,7 @@ NTSTATUS cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr,
NET_USER_INFO_3 *user_info3);
BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr);
-/*The following definitions come from rpc_client/cli_pipe.c */
+/* The following definitions come from rpc_client/cli_pipe.c */
BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num,
prs_struct *data, prs_struct *rdata);
@@ -2422,54 +2512,62 @@ void cli_nt_set_ntlmssp_flgs(struct cli_state *cli, uint32 ntlmssp_flgs);
BOOL cli_nt_session_open(struct cli_state *cli, const char *pipe_name);
void cli_nt_session_close(struct cli_state *cli);
-/*The following definitions come from rpc_client/cli_spoolss_notify.c */
+/* The following definitions come from rpc_client/cli_spoolss_notify.c */
BOOL spoolss_disconnect_from_client( struct cli_state *cli);
BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine);
-BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, WERROR *status, POLICY_HND *handle);
-BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle,
- uint32 change_low, uint32 change_high, WERROR *status);
-BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle,
- WERROR *status);
-
-/*The following definitions come from rpc_client/cli_trust.c */
+WERROR cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ char *printer, uint32 localprinter, uint32 type,
+ POLICY_HND *handle);
+WERROR cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle);
+WERROR cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 condition, uint32 changd_id);
+WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, PRINTER_MESSAGE_INFO *info,
+ NT_PRINTER_INFO_LEVEL *printer);
+
+/* The following definitions come from rpc_client/cli_trust.c */
BOOL change_trust_account_password( char *domain, char *remote_machine_list);
-/*The following definitions come from rpcclient/cmd_dfs.c */
+/* The following definitions come from rpcclient/cmd_dfs.c */
-/*The following definitions come from rpcclient/cmd_lsarpc.c */
+/* The following definitions come from rpcclient/cmd_lsarpc.c */
-/*The following definitions come from rpcclient/cmd_netlogon.c */
+/* The following definitions come from rpcclient/cmd_netlogon.c */
-/*The following definitions come from rpcclient/cmd_reg.c */
+/* The following definitions come from rpcclient/cmd_reg.c */
-/*The following definitions come from rpcclient/cmd_samr.c */
+/* The following definitions come from rpcclient/cmd_samr.c */
-void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1);
-void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4);
-/*The following definitions come from rpcclient/cmd_spoolss.c */
+/* The following definitions come from rpcclient/cmd_spoolss.c */
BOOL get_short_archi(char *short_archi, char *long_archi);
void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch);
-/*The following definitions come from rpcclient/cmd_srvsvc.c */
+/* The following definitions come from rpcclient/cmd_srvsvc.c */
+
+
+/* The following definitions come from rpcclient/display_sec.c */
+char *get_sec_mask_str(uint32 type);
+void display_sec_access(SEC_ACCESS *info);
+void display_sec_ace(SEC_ACE *ace);
+void display_sec_acl(SEC_ACL *sec_acl);
+void display_sec_desc(SEC_DESC *sec);
-/*The following definitions come from rpcclient/rpcclient.c */
+/* The following definitions come from rpcclient/rpcclient.c */
void fetch_machine_sid(struct cli_state *cli);
-void init_rpcclient_creds(struct ntuser_creds *creds, char* username,
- char* domain, char* password);
-struct cli_state *setup_connection(struct cli_state *cli, char *system_name,
- struct ntuser_creds *creds);
+int main(int argc, char *argv[]);
-/*The following definitions come from rpc_parse/parse_dfs.c */
+/* The following definitions come from rpc_parse/parse_dfs.c */
void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d);
BOOL dfs_io_q_dfs_exist(char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth);
@@ -2493,12 +2591,11 @@ BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint
BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth);
BOOL dfs_io_dfs_storage_info(char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_lsa.c */
+/* The following definitions come from rpc_parse/parse_lsa.c */
void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name,
uint16 sid_name_use, char *name, uint32 idx);
-void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff,
- uint32 unknown);
+void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff);
void init_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, LSA_SEC_QOS *qos);
void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name,
uint32 attributes, uint32 desired_access,
@@ -2545,7 +2642,7 @@ BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps,
BOOL lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s,
prs_struct *ps, int depth);
void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l,
- POLICY_HND *hnd, int num_names, char **names);
+ POLICY_HND *hnd, int num_names, const char **names);
BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r,
prs_struct *ps, int depth);
BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r,
@@ -2569,8 +2666,10 @@ void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS *r_u, uint32 enum_context);
BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth);
BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth);
BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth);
+void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *sid, uint32 desired_access);
BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth);
BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth);
+void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd);
BOOL lsa_io_q_enum_privsaccount(char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth);
BOOL lsa_io_luid(char *desc, LUID *r_c, prs_struct *ps, int depth);
BOOL lsa_io_luid_attr(char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth);
@@ -2579,8 +2678,18 @@ void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, u
BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth);
BOOL lsa_io_q_getsystemaccount(char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth);
BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth);
-
-/*The following definitions come from rpc_parse/parse_misc.c */
+BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth);
+BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth);
+void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, char *name);
+BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth);
+BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth);
+BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth);
+BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth);
+BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth);
+BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth);
+BOOL policy_handle_is_valid(const POLICY_HND *hnd);
+
+/* The following definitions come from rpc_parse/parse_misc.c */
TALLOC_CTX *get_current_rpc_talloc(void);
void set_current_rpc_talloc( TALLOC_CTX *ctx);
@@ -2657,7 +2766,7 @@ BOOL smb_io_buffer4(char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, in
BOOL make_uni_hdr(UNIHDR *hdr, int len);
BOOL make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer);
-/*The following definitions come from rpc_parse/parse_net.c */
+/* The following definitions come from rpc_parse/parse_net.c */
BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth);
void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, char *srv_name,
@@ -2723,7 +2832,7 @@ BOOL net_io_q_sam_logoff(char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int
BOOL net_io_r_sam_logoff(char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth);
BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name,
const char *cli_name, DOM_CRED * cli_creds,
- uint32 database_id);
+ DOM_CRED *ret_creds, uint32 database_id);
BOOL net_io_q_sam_sync(char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps,
int depth);
BOOL make_sam_account_info(SAM_ACCOUNT_INFO * info,
@@ -2748,7 +2857,7 @@ BOOL net_io_q_sam_deltas(char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps,
BOOL net_io_r_sam_deltas(char *desc, uint8 sess_key[16],
NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_prs.c */
+/* The following definitions come from rpc_parse/parse_prs.c */
void prs_dump(char *name, int v, prs_struct *ps);
void prs_debug(prs_struct *ps, int depth, char *desc, char *fn_name);
@@ -2802,7 +2911,7 @@ int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps);
int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps, TALLOC_CTX *mem_ctx);
BOOL prs_hash1(prs_struct *ps, uint32 offset, uint8 sess_key[16]);
-/*The following definitions come from rpc_parse/parse_reg.c */
+/* The following definitions come from rpc_parse/parse_reg.c */
void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR *q_o,
uint16 unknown_0, uint32 level);
@@ -2887,7 +2996,7 @@ BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s,
BOOL reg_io_r_abort_shutdown(char *desc, REG_R_ABORT_SHUTDOWN * r_s,
prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_rpc.c */
+/* The following definitions come from rpc_parse/parse_rpc.c */
void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
uint32 call_id, int data_len, int auth_len);
@@ -2941,7 +3050,7 @@ void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk,
uint32 ver, uint32 crc32, uint32 seq_num);
BOOL smb_io_rpc_auth_ntlmssp_chk(char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_samr.c */
+/* The following definitions come from rpc_parse/parse_samr.c */
void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND * q_c, POLICY_HND *hnd);
BOOL samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND * q_u,
@@ -3415,7 +3524,7 @@ void init_samr_r_set_domain_info(SAMR_R_SET_DOMAIN_INFO * r_u, NTSTATUS status);
BOOL samr_io_r_set_domain_info(char *desc, SAMR_R_SET_DOMAIN_INFO * r_u,
prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_sec.c */
+/* The following definitions come from rpc_parse/parse_sec.c */
void init_sec_access(SEC_ACCESS *t, uint32 mask);
BOOL sec_io_access(char *desc, SEC_ACCESS *t, prs_struct *ps, int depth);
@@ -3440,7 +3549,7 @@ SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc)
SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src);
BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_spoolss.c */
+/* The following definitions come from rpc_parse/parse_spoolss.c */
BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data,
@@ -3462,7 +3571,10 @@ BOOL make_spoolss_q_addprinterex(
PRINTER_INFO_CTR *ctr);
BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2,
PRINTER_INFO_2 *info);
+BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth);
BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
BOOL make_spoolss_q_deleteprinterdriver(
TALLOC_CTX *mem_ctx,
SPOOL_Q_DELETEPRINTERDRIVER *q_u,
@@ -3470,7 +3582,6 @@ BOOL make_spoolss_q_deleteprinterdriver(
const char* arch,
const char* driver
);
-BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
const POLICY_HND *handle,
UNISTR2 *valuename, uint32 size);
@@ -3625,17 +3736,12 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_
prs_struct *ps, int depth);
BOOL smb_io_unibuffer(char *desc, UNISTR2 *buffer, prs_struct *ps, int depth);
BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth);
-BOOL make_spoolss_q_addprinterdriver(
- TALLOC_CTX *mem_ctx,
- SPOOL_Q_ADDPRINTERDRIVER *q_u,
- const char* srv_name,
- uint32 level,
- PRINTER_DRIVER_CTR *info);
-BOOL make_spoolss_driver_info_3(
- TALLOC_CTX *mem_ctx,
- SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
- DRIVER_INFO_3 *info3
-);
+BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
+ SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name,
+ uint32 level, PRINTER_DRIVER_CTR *info);
+BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
+ SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
+ DRIVER_INFO_3 *info3);
BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
BOOL spoolss_io_q_addprinterdriver(char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth);
@@ -3667,6 +3773,8 @@ BOOL make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, TALLOC_CTX *ctx,
char* value, char* data);
BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
+BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth);
BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value,
uint32 type, const uint8 *data, uint32 len);
BOOL spoolss_io_q_deleteform(char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth);
@@ -3688,11 +3796,16 @@ BOOL make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u,
const fstring string, uint32 printer, uint32 type);
BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth);
+BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd,
+ uint32 condition, uint32 change_id);
+BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth);
BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd);
BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth);
BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
- uint32 change_low, uint32 change_high);
+ uint32 change_low, uint32 change_high,
+ SPOOL_NOTIFY_INFO *info);
BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
BOOL spoolss_io_q_getprinterdataex(char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth);
@@ -3707,8 +3820,19 @@ BOOL make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTOR
BOOL spoolss_io_q_getprintprocessordirectory(char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_getprintprocessordirectory(char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth);
BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth);
-
-/*The following definitions come from rpc_parse/parse_srv.c */
+BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
+ int level, FORM *form);
+BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
+ int level, char *form_name, FORM *form);
+BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form);
+BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
+ char *formname, uint32 level, NEW_BUFFER *buffer,
+ uint32 offered);
+BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
+ uint32 level, NEW_BUFFER *buffer,
+ uint32 offered);
+
+/* The following definitions come from rpc_parse/parse_srv.c */
void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark);
void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark);
@@ -3719,6 +3843,8 @@ void init_srv_share_info2(SH_INFO_2 *sh2,
char *net_name, uint32 type, char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
char *path, char *passwd);
+void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, char *remark, uint32 csc_policy);
+void init_srv_share_info501_str(SH_INFO_501_STR *sh501, char *net_name, char *remark);
void init_srv_share_info502(SH_INFO_502 *sh502,
char *net_name, uint32 type, char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
@@ -3791,9 +3917,9 @@ void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv,
char *server_name, uint32 switch_value);
BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth);
void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
- uint32 switch_value, SRV_INFO_CTR *ctr, NTSTATUS status);
+ uint32 switch_value, SRV_INFO_CTR *ctr, WERROR status);
void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv,
- uint32 switch_value, NTSTATUS status);
+ uint32 switch_value, WERROR status);
BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n,
prs_struct *ps, int depth);
BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth);
@@ -3814,7 +3940,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r
BOOL srv_io_q_net_file_set_secdesc(char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth);
BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth);
-/*The following definitions come from rpc_parse/parse_wks.c */
+/* The following definitions come from rpc_parse/parse_wks.c */
void init_wks_q_query_info(WKS_Q_QUERY_INFO *q_u,
char *server, uint16 switch_value) ;
@@ -3827,11 +3953,11 @@ void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u,
NTSTATUS status) ;
BOOL wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth);
-/*The following definitions come from rpc_server/srv_dfs.c */
+/* The following definitions come from rpc_server/srv_dfs.c */
BOOL api_netdfs_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_dfs_nt.c */
+/* The following definitions come from rpc_server/srv_dfs_nt.c */
uint32 _dfs_exist(pipes_struct *p, DFS_Q_DFS_EXIST *q_u, DFS_R_DFS_EXIST *r_u);
WERROR _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u);
@@ -3841,11 +3967,11 @@ WERROR _dfs_enum(pipes_struct *p, DFS_Q_DFS_ENUM *q_u, DFS_R_DFS_ENUM *r_u);
WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u,
DFS_R_DFS_GET_INFO *r_u);
-/*The following definitions come from rpc_server/srv_lsa.c */
+/* The following definitions come from rpc_server/srv_lsa.c */
BOOL api_ntlsa_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_lsa_hnd.c */
+/* The following definitions come from rpc_server/srv_lsa_hnd.c */
BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name);
BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr);
@@ -3853,7 +3979,7 @@ BOOL find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p);
BOOL close_policy_hnd(pipes_struct *p, POLICY_HND *hnd);
void close_policy_by_pipe(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_lsa_nt.c */
+/* The following definitions come from rpc_server/srv_lsa_nt.c */
NTSTATUS _lsa_open_policy2(pipes_struct *p, LSA_Q_OPEN_POL2 *q_u, LSA_R_OPEN_POL2 *r_u);
NTSTATUS _lsa_open_policy(pipes_struct *p, LSA_Q_OPEN_POL *q_u, LSA_R_OPEN_POL *r_u);
@@ -3869,11 +3995,11 @@ NTSTATUS _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA
NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u);
NTSTATUS _lsa_getsystemaccount(pipes_struct *p, LSA_Q_GETSYSTEMACCOUNT *q_u, LSA_R_GETSYSTEMACCOUNT *r_u);
-/*The following definitions come from rpc_server/srv_netlog.c */
+/* The following definitions come from rpc_server/srv_netlog.c */
BOOL api_netlog_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_netlog_nt.c */
+/* The following definitions come from rpc_server/srv_netlog_nt.c */
NTSTATUS _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u,
NET_R_LOGON_CTRL *r_u);
@@ -3886,7 +4012,7 @@ NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *
NTSTATUS _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF *r_u);
NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_u);
-/*The following definitions come from rpc_server/srv_pipe.c */
+/* The following definitions come from rpc_server/srv_pipe.c */
BOOL create_next_pdu(pipes_struct *p);
BOOL api_pipe_bind_auth_resp(pipes_struct *p, prs_struct *rpc_in_p);
@@ -3900,7 +4026,7 @@ BOOL api_pipe_request(pipes_struct *p);
BOOL api_rpcTNP(pipes_struct *p, char *rpc_name,
struct api_struct *api_rpc_cmds);
-/*The following definitions come from rpc_server/srv_pipe_hnd.c */
+/* The following definitions come from rpc_server/srv_pipe_hnd.c */
pipes_struct *get_first_pipe(void);
pipes_struct *get_next_pipe(pipes_struct *p);
@@ -3918,22 +4044,22 @@ BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn);
pipes_struct *get_rpc_pipe_p(char *buf, int where);
pipes_struct *get_rpc_pipe(int pnum);
-/*The following definitions come from rpc_server/srv_reg.c */
+/* The following definitions come from rpc_server/srv_reg.c */
BOOL api_reg_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_reg_nt.c */
+/* The following definitions come from rpc_server/srv_reg_nt.c */
NTSTATUS _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u);
NTSTATUS _reg_open(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM *r_u);
NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY *r_u);
NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u);
-/*The following definitions come from rpc_server/srv_samr.c */
+/* The following definitions come from rpc_server/srv_samr.c */
BOOL api_samr_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_samr_nt.c */
+/* The following definitions come from rpc_server/srv_samr_nt.c */
NTSTATUS _samr_close_hnd(pipes_struct *p, SAMR_Q_CLOSE_HND *q_u, SAMR_R_CLOSE_HND *r_u);
NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_DOMAIN *r_u);
@@ -3977,12 +4103,14 @@ NTSTATUS _samr_get_dom_pwinfo(pipes_struct *p, SAMR_Q_GET_DOM_PWINFO *q_u, SAMR_
NTSTATUS _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_GROUP *r_u);
NTSTATUS _samr_unknown_2d(pipes_struct *p, SAMR_Q_UNKNOWN_2D *q_u, SAMR_R_UNKNOWN_2D *r_u);
-/*The following definitions come from rpc_server/srv_spoolss.c */
+/* The following definitions come from rpc_server/srv_spoolss.c */
BOOL api_spoolss_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_spoolss_nt.c */
+/* The following definitions come from rpc_server/srv_spoolss_nt.c */
+void do_drv_upgrade_printer(int msg_type, pid_t src, void *buf, size_t len);
+WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u);
WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u);
BOOL convert_devicemode(char *printername, const DEVICEMODE *devmode,
NT_DEVICEMODE **pp_nt_devmode);
@@ -3992,6 +4120,72 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
SPOOL_R_DELETEPRINTERDRIVER *r_u);
WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u);
+void spoolss_notify_server_name(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx) ;
+void spoolss_notify_printer_name(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_share_name(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_port_name(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_driver_name(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_comment(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_location(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_sepfile(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_print_processor(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_parameters(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_datatype(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_attributes(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void spoolss_notify_cjobs(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx);
+void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id);
WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u);
WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
@@ -4017,6 +4211,7 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u,
WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, SPOOL_R_GETPRINTERDRIVERDIR *r_u);
WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u);
WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u);
+WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u);
WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u);
WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u);
WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u);
@@ -4031,35 +4226,35 @@ WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPO
WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u);
-/*The following definitions come from rpc_server/srv_srvsvc.c */
+/* The following definitions come from rpc_server/srv_srvsvc.c */
BOOL api_srvsvc_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_srvsvc_nt.c */
+/* The following definitions come from rpc_server/srv_srvsvc_nt.c */
BOOL share_info_db_init(void);
void map_generic_share_sd_bits(SEC_DESC *psd);
BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 desired_access);
-NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u);
-NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u);
-NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u);
-NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u);
-NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u);
-NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u);
-NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u);
-NTSTATUS _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u);
-NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u);
-NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u);
-NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u);
-NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u);
-NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u,
+WERROR _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u);
+WERROR _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u);
+WERROR _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u);
+WERROR _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u);
+WERROR _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u);
+WERROR _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u);
+WERROR _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u);
+WERROR _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u);
+WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u);
+WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u);
+WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u);
+WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u);
+WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u,
SRV_R_NET_FILE_QUERY_SECDESC *r_u);
-NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
+WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
SRV_R_NET_FILE_SET_SECDESC *r_u);
-NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u);
-NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u);
+WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u);
+WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u);
-/*The following definitions come from rpc_server/srv_util.c */
+/* The following definitions come from rpc_server/srv_util.c */
int make_dom_gids(TALLOC_CTX *ctx, char *gids_str, DOM_GID **ppgids);
void get_domain_user_groups(char *domain_groups, char *user);
@@ -4070,15 +4265,15 @@ NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid);
NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid);
NTSTATUS local_lookup_user_rid(char *user_name, uint32 *rid);
-/*The following definitions come from rpc_server/srv_wkssvc.c */
+/* The following definitions come from rpc_server/srv_wkssvc.c */
BOOL api_wkssvc_rpc(pipes_struct *p);
-/*The following definitions come from rpc_server/srv_wkssvc_nt.c */
+/* The following definitions come from rpc_server/srv_wkssvc_nt.c */
NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u);
-/*The following definitions come from smbd/blocking.c */
+/* The following definitions come from smbd/blocking.c */
BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, int lock_num);
void remove_pending_lock_requests_by_fid(files_struct *fsp);
@@ -4086,7 +4281,7 @@ void remove_pending_lock_requests_by_mid(int mid);
BOOL blocking_locks_pending(void);
void process_blocking_lock_queue(time_t t);
-/*The following definitions come from smbd/chgpasswd.c */
+/* The following definitions come from smbd/chgpasswd.c */
BOOL chgpasswd(char *name, char *oldpass, char *newpass, BOOL as_root);
BOOL chgpasswd(char *name, char *oldpass, char *newpass, BOOL as_root);
@@ -4107,11 +4302,11 @@ BOOL change_oem_password(SAM_ACCOUNT *hnd, char *new_passwd,
BOOL check_plaintext_password(char *user, char *old_passwd,
int old_passwd_size, SAM_ACCOUNT **hnd);
-/*The following definitions come from smbd/close.c */
+/* The following definitions come from smbd/close.c */
int close_file(files_struct *fsp, BOOL normal_close);
-/*The following definitions come from smbd/conn.c */
+/* The following definitions come from smbd/conn.c */
void conn_init(void);
int conn_num_open(void);
@@ -4123,18 +4318,18 @@ BOOL conn_idle_all(time_t t, int deadtime);
void conn_free(connection_struct *conn);
void msg_force_tdis(int msg_type, pid_t pid, void *buf, size_t len);
-/*The following definitions come from smbd/connection.c */
+/* The following definitions come from smbd/connection.c */
TDB_CONTEXT *conn_tdb_ctx(void);
BOOL yield_connection(connection_struct *conn,char *name);
BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOOL Clear);
-/*The following definitions come from smbd/dfree.c */
+/* The following definitions come from smbd/dfree.c */
-SMB_BIG_UINT sys_disk_free(char *path, BOOL small_query,
+SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query,
SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
-/*The following definitions come from smbd/dir.c */
+/* The following definitions come from smbd/dir.c */
void init_dptrs(void);
char *dptr_path(int key);
@@ -4162,7 +4357,7 @@ void DirCacheAdd( char *path, char *name, char *dname, int snum );
char *DirCacheCheck( char *path, char *name, int snum );
void DirCacheFlush(int snum);
-/*The following definitions come from smbd/dosmode.c */
+/* The following definitions come from smbd/dosmode.c */
mode_t unix_mode(connection_struct *conn,int dosmode,const char *fname);
int dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf);
@@ -4170,7 +4365,7 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT *
int file_utime(connection_struct *conn, char *fname, struct utimbuf *times);
BOOL set_filetime(connection_struct *conn, char *fname, time_t mtime);
-/*The following definitions come from smbd/error.c */
+/* The following definitions come from smbd/error.c */
int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file);
int unix_error_packet(char *outbuf,int def_class,uint32 def_code,
@@ -4178,7 +4373,7 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code,
int error_packet(char *outbuf,NTSTATUS ntstatus,
uint8 eclass,uint32 ecode,int line, const char *file);
-/*The following definitions come from smbd/fileio.c */
+/* The following definitions come from smbd/fileio.c */
SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos);
BOOL read_from_write_cache(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n);
@@ -4188,14 +4383,15 @@ void delete_write_cache(files_struct *fsp);
void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size);
ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason);
void sync_file(connection_struct *conn, files_struct *fsp);
+int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst);
-/*The following definitions come from smbd/filename.c */
+/* The following definitions come from smbd/filename.c */
BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
BOOL *bad_path, SMB_STRUCT_STAT *pst);
BOOL check_name(char *name,connection_struct *conn);
-/*The following definitions come from smbd/files.c */
+/* The following definitions come from smbd/files.c */
files_struct *file_new(connection_struct *conn);
void file_close_conn(connection_struct *conn);
@@ -4214,7 +4410,7 @@ void file_chain_reset(void);
void file_chain_save(void);
void file_chain_restore(void);
-/*The following definitions come from smbd/ipc.c */
+/* The following definitions come from smbd/ipc.c */
void send_trans_reply(char *outbuf,
char *rparam, int rparam_len,
@@ -4222,12 +4418,12 @@ void send_trans_reply(char *outbuf,
BOOL buffer_too_large);
int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int bufsize);
-/*The following definitions come from smbd/lanman.c */
+/* The following definitions come from smbd/lanman.c */
int api_reply(connection_struct *conn,uint16 vuid,char *outbuf,char *data,char *params,
int tdscnt,int tpscnt,int mdrcnt,int mprcnt);
-/*The following definitions come from smbd/mangle.c */
+/* The following definitions come from smbd/mangle.c */
BOOL is_mangled( char *s );
BOOL is_8_3( char *fname, BOOL check_case );
@@ -4236,7 +4432,7 @@ BOOL check_mangled_cache( char *s );
void mangle_name_83( char *s);
BOOL name_map_mangle(char *OutName, BOOL need83, BOOL cache83, int snum);
-/*The following definitions come from smbd/message.c */
+/* The following definitions come from smbd/message.c */
int reply_sends(connection_struct *conn,
char *inbuf,char *outbuf, int dum_size, int dum_buffsize);
@@ -4247,17 +4443,17 @@ int reply_sendtxt(connection_struct *conn,
int reply_sendend(connection_struct *conn,
char *inbuf,char *outbuf, int dum_size, int dum_buffsize);
-/*The following definitions come from smbd/negprot.c */
+/* The following definitions come from smbd/negprot.c */
int reply_negprot(connection_struct *conn,
char *inbuf,char *outbuf, int dum_size,
int dum_buffsize);
-/*The following definitions come from smbd/noquotas.c */
+/* The following definitions come from smbd/noquotas.c */
BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
-/*The following definitions come from smbd/notify.c */
+/* The following definitions come from smbd/notify.c */
void remove_pending_change_notify_requests_by_fid(files_struct *fsp);
void remove_pending_change_notify_requests_by_mid(int mid);
@@ -4267,15 +4463,15 @@ BOOL process_pending_change_notify_queue(time_t t);
BOOL change_notify_set(char *inbuf, files_struct *fsp, connection_struct *conn, uint32 flags);
BOOL init_change_notify(void);
-/*The following definitions come from smbd/notify_hash.c */
+/* The following definitions come from smbd/notify_hash.c */
struct cnotify_fns *hash_notify_init(void) ;
-/*The following definitions come from smbd/notify_kernel.c */
+/* The following definitions come from smbd/notify_kernel.c */
struct cnotify_fns *kernel_notify_init(void) ;
-/*The following definitions come from smbd/nttrans.c */
+/* The following definitions come from smbd/nttrans.c */
int reply_ntcreate_and_X(connection_struct *conn,
char *inbuf,char *outbuf,int length,int bufsize);
@@ -4286,20 +4482,22 @@ int reply_nttranss(connection_struct *conn,
int reply_nttrans(connection_struct *conn,
char *inbuf,char *outbuf,int length,int bufsize);
-/*The following definitions come from smbd/open.c */
+/* The following definitions come from smbd/open.c */
int fd_close(struct connection_struct *conn, files_struct *fsp);
files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf,
- int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action);
-files_struct *open_file_stat(connection_struct *conn, char *fname,
- SMB_STRUCT_STAT *psbuf, int smb_ofun, int *action);
-files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf);
+ int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action);
+files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf,
+ uint32 desired_access,
+ int share_mode,int ofun, mode_t mode,int oplock_request,
+ int *Access,int *action);
+files_struct *open_file_fchmod(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf);
int close_file_fchmod(files_struct *fsp);
-files_struct *open_directory(connection_struct *conn, char *fname,
- SMB_STRUCT_STAT *psbuf, int share_mode, int smb_ofun, mode_t unixmode, int *action);
+files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf,
+ uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action);
BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op);
-/*The following definitions come from smbd/oplock.c */
+/* The following definitions come from smbd/oplock.c */
int32 get_number_of_exclusive_open_oplocks(void);
BOOL oplock_message_waiting(fd_set *fds);
@@ -4315,15 +4513,15 @@ BOOL attempt_close_oplocked_file(files_struct *fsp);
void release_level_2_oplocks_on_change(files_struct *fsp);
BOOL init_oplocks(void);
-/*The following definitions come from smbd/oplock_irix.c */
+/* The following definitions come from smbd/oplock_irix.c */
struct kernel_oplocks *irix_init_kernel_oplocks(void) ;
-/*The following definitions come from smbd/oplock_linux.c */
+/* The following definitions come from smbd/oplock_linux.c */
struct kernel_oplocks *linux_init_kernel_oplocks(void) ;
-/*The following definitions come from smbd/password.c */
+/* The following definitions come from smbd/password.c */
void generate_next_challenge(char *challenge);
BOOL set_challenge(unsigned char *challenge);
@@ -4356,7 +4554,7 @@ BOOL domain_client_validate( char *user, char *domain,
char *smb_ntpasswd, int smb_ntpasslen,
BOOL *user_exists, NT_USER_TOKEN **pptoken);
-/*The following definitions come from smbd/pipes.c */
+/* The following definitions come from smbd/pipes.c */
int reply_open_pipe_and_X(connection_struct *conn,
char *inbuf,char *outbuf,int length,int bufsize);
@@ -4365,14 +4563,15 @@ int reply_pipe_write_and_X(char *inbuf,char *outbuf,int length,int bufsize);
int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize);
int reply_pipe_close(connection_struct *conn, char *inbuf,char *outbuf);
-/*The following definitions come from smbd/posix_acls.c */
+/* The following definitions come from smbd/posix_acls.c */
size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc);
BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd);
-int chmod_acl(const char *name, mode_t mode);
-int fchmod_acl(int fd, mode_t mode);
+int chmod_acl(connection_struct *conn, const char *name, mode_t mode);
+int fchmod_acl(files_struct *fsp, int fd, mode_t mode);
+BOOL directory_has_default_acl(connection_struct *conn, const char *fname);
-/*The following definitions come from smbd/process.c */
+/* The following definitions come from smbd/process.c */
BOOL push_oplock_pending_smb_message(char *buf, int msg_len);
BOOL receive_next_smb(char *inbuf, int bufsize, int timeout);
@@ -4384,7 +4583,7 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize);
void check_reload(int t);
void smbd_process(void);
-/*The following definitions come from smbd/reply.c */
+/* The following definitions come from smbd/reply.c */
int reply_special(char *inbuf,char *outbuf);
int reply_tcon(connection_struct *conn,
@@ -4457,7 +4656,7 @@ int reply_writebmpx(connection_struct *conn, char *inbuf,char *outbuf, int size,
int reply_writebs(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize);
int reply_getattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize);
-/*The following definitions come from smbd/sec_ctx.c */
+/* The following definitions come from smbd/sec_ctx.c */
int get_current_groups(int *p_ngroups, gid_t **p_groups);
void delete_nt_token(NT_USER_TOKEN **pptoken);
@@ -4469,14 +4668,14 @@ void set_root_sec_ctx(void);
BOOL pop_sec_ctx(void);
void init_sec_ctx(void);
-/*The following definitions come from smbd/server.c */
+/* The following definitions come from smbd/server.c */
int smbd_server_fd(void);
void smbd_set_server_fd(int fd);
BOOL reload_services(BOOL test);
void exit_server(char *reason);
-/*The following definitions come from smbd/service.c */
+/* The following definitions come from smbd/service.c */
BOOL set_current_service(connection_struct *conn,BOOL do_chdir);
int add_home_service(char *service, char *homedir);
@@ -4484,12 +4683,12 @@ int find_service(char *service);
connection_struct *make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid, int *ecode);
void close_cnum(connection_struct *conn, uint16 vuid);
-/*The following definitions come from smbd/session.c */
+/* The following definitions come from smbd/session.c */
BOOL session_claim(uint16 vuid);
void session_yield(uint16 vuid);
-/*The following definitions come from smbd/ssl.c */
+/* The following definitions come from smbd/ssl.c */
int sslutil_init(int isServer);
int sslutil_accept(int fd);
@@ -4498,23 +4697,23 @@ int sslutil_connect(int fd);
int sslutil_disconnect(int fd);
int sslutil_negotiate_ssl(int fd, int msg_type);
-/*The following definitions come from smbd/statcache.c */
+/* The following definitions come from smbd/statcache.c */
void stat_cache_add( char *full_orig_name, char *orig_translated_path);
BOOL stat_cache_lookup(connection_struct *conn, char *name, char *dirpath,
char **start, SMB_STRUCT_STAT *pst);
BOOL reset_stat_cache( void );
-/*The following definitions come from smbd/trans2.c */
+/* The following definitions come from smbd/trans2.c */
-void set_bad_path_error(int err, BOOL bad_path);
+NTSTATUS set_bad_path_error(int err, BOOL bad_path);
NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close);
int reply_findclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize);
int reply_findnclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize);
int reply_transs2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize);
int reply_trans2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize);
-/*The following definitions come from smbd/uid.c */
+/* The following definitions come from smbd/uid.c */
BOOL change_to_guest(void);
BOOL change_to_user(connection_struct *conn, uint16 vuid);
@@ -4534,60 +4733,60 @@ DOM_SID *gid_to_sid(DOM_SID *psid, gid_t gid);
BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype);
BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype);
-/*The following definitions come from smbd/utmp.c */
+/* The following definitions come from smbd/utmp.c */
void sys_utmp_yield(const char *username, const char *hostname,
const char *id_str, int id_num);
void sys_utmp_claim(const char *username, const char *hostname,
const char *id_str, int id_num);
-/*The following definitions come from smbd/vfs.c */
+/* The following definitions come from smbd/vfs.c */
-BOOL vfs_init(connection_struct *conn);
-BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st);
-int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode);
+BOOL smbd_vfs_init(connection_struct *conn);
+BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st);
+int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode);
char *vfs_getwd(connection_struct *conn, char *unix_path);
-BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf);
-BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf);
+BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
+BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);
-ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N);
+ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N);
int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len);
int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len);
SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n);
char *vfs_readdirname(connection_struct *conn, void *p);
-int vfs_ChDir(connection_struct *conn, char *path);
+int vfs_ChDir(connection_struct *conn, const char *path);
char *vfs_GetWd(connection_struct *conn, char *path);
BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks);
-/*The following definitions come from smbd/vfs-wrap.c */
+/* The following definitions come from smbd/vfs-wrap.c */
-int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user);
+int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user);
void vfswrap_dummy_disconnect(connection_struct *conn);
-SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-DIR *vfswrap_opendir(connection_struct *conn, char *fname);
+DIR *vfswrap_opendir(connection_struct *conn, const char *fname);
struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp);
-int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode);
-int vfswrap_rmdir(connection_struct *conn, char *path);
+int vfswrap_mkdir(connection_struct *conn, const char *path, mode_t mode);
+int vfswrap_rmdir(connection_struct *conn, const char *path);
int vfswrap_closedir(connection_struct *conn, DIR *dirp);
-int vfswrap_open(connection_struct *conn, char *fname, int flags, mode_t mode);
+int vfswrap_open(connection_struct *conn, const char *fname, int flags, mode_t mode);
int vfswrap_close(files_struct *fsp, int fd);
ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n);
ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n);
SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
-int vfswrap_rename(connection_struct *conn, char *oldname, char *newname);
+int vfswrap_rename(connection_struct *conn, const char *oldname, const char *newname);
int vfswrap_fsync(files_struct *fsp, int fd);
-int vfswrap_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf);
+int vfswrap_stat(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf);
int vfswrap_fstat(files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
-int vfswrap_lstat(connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf);
-int vfswrap_unlink(connection_struct *conn, char *path);
-int vfswrap_chmod(connection_struct *conn, char *path, mode_t mode);
+int vfswrap_lstat(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf);
+int vfswrap_unlink(connection_struct *conn, const char *path);
+int vfswrap_chmod(connection_struct *conn, const char *path, mode_t mode);
int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode);
-int vfswrap_chown(connection_struct *conn, char *path, uid_t uid, gid_t gid);
+int vfswrap_chown(connection_struct *conn, const char *path, uid_t uid, gid_t gid);
int vfswrap_fchown(files_struct *fsp, int fd, uid_t uid, gid_t gid);
-int vfswrap_chdir(connection_struct *conn, char *path);
+int vfswrap_chdir(connection_struct *conn, const char *path);
char *vfswrap_getwd(connection_struct *conn, char *path);
-int vfswrap_utime(connection_struct *conn, char *path, struct utimbuf *times);
+int vfswrap_utime(connection_struct *conn, const char *path, struct utimbuf *times);
int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len);
BOOL vfswrap_lock(files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int vfswrap_symlink(connection_struct *conn, const char *oldpath, const char *newpath);
@@ -4596,18 +4795,40 @@ int vfswrap_link(connection_struct *conn, const char *oldpath, const char *newpa
int vfswrap_mknod(connection_struct *conn, const char *pathname, mode_t mode, SMB_DEV_T dev);
char *vfswrap_realpath(connection_struct *conn, const char *path, char *resolved_path);
size_t vfswrap_fget_nt_acl(files_struct *fsp, int fd, SEC_DESC **ppdesc);
-size_t vfswrap_get_nt_acl(files_struct *fsp, char *name, SEC_DESC **ppdesc);
+size_t vfswrap_get_nt_acl(files_struct *fsp, const char *name, SEC_DESC **ppdesc);
BOOL vfswrap_fset_nt_acl(files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd);
-BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent, SEC_DESC *psd);
-int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode);
+BOOL vfswrap_set_nt_acl(files_struct *fsp, const char *name, uint32 security_info_sent, SEC_DESC *psd);
+int vfswrap_chmod_acl(connection_struct *conn, const char *name, mode_t mode);
int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode);
-
-/*The following definitions come from smbwrapper/realcalls.c */
+int vfswrap_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
+int vfswrap_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
+int vfswrap_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
+void * vfswrap_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d);
+SMB_ACL_T vfswrap_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type);
+SMB_ACL_T vfswrap_sys_acl_get_fd(struct files_struct *fsp, int fd);
+int vfswrap_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset);
+int vfswrap_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
+char * vfswrap_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen);
+SMB_ACL_T vfswrap_sys_acl_init(struct connection_struct *conn, int count);
+int vfswrap_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
+int vfswrap_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
+int vfswrap_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual);
+int vfswrap_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
+int vfswrap_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl );
+int vfswrap_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
+int vfswrap_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl);
+int vfswrap_sys_acl_delete_def_file(struct connection_struct *conn, const char *path);
+int vfswrap_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
+int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text);
+int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl);
+int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype);
+
+/* The following definitions come from smbwrapper/realcalls.c */
int real_utime(const char *name, struct utimbuf *buf);
int real_utimes(const char *name, struct timeval tv[2]);
-/*The following definitions come from smbwrapper/shared.c */
+/* The following definitions come from smbwrapper/shared.c */
void smbw_setup_shared(void);
char *smbw_getshared(const char *name);
@@ -4615,7 +4836,7 @@ void smbw_setshared(const char *name, const char *val);
int smbw_setenv(const char *name, const char *value);
int smbw_shared_fd(int fd);
-/*The following definitions come from smbwrapper/smbw.c */
+/* The following definitions come from smbwrapper/smbw.c */
void smbw_init(void);
int smbw_fd(int fd);
@@ -4650,7 +4871,7 @@ int smbw_dup(int fd);
int smbw_dup2(int fd, int fd2);
int smbw_fork(void);
-/*The following definitions come from smbwrapper/smbw_dir.c */
+/* The following definitions come from smbwrapper/smbw_dir.c */
struct smbw_dir *smbw_dir(int fd);
int smbw_dirp(DIR *dirp);
@@ -4670,7 +4891,7 @@ int smbw_closedir(DIR *dirp);
void smbw_seekdir(DIR *dirp, off_t offset);
off_t smbw_telldir(DIR *dirp);
-/*The following definitions come from smbwrapper/smbw_stat.c */
+/* The following definitions come from smbwrapper/smbw_stat.c */
void smbw_setup_stat(struct stat *st, char *fname, size_t size, int mode);
BOOL smbw_getatr(struct smbw_server *srv, char *path,
@@ -4682,7 +4903,7 @@ int smbw_stat_printjob(struct smbw_server *srv,char *path,
int smbw_fstat(int fd, struct stat *st);
int smbw_stat(const char *fname, struct stat *st);
-/*The following definitions come from tdb/spinlock.c */
+/* The following definitions come from tdb/spinlock.c */
int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type);
int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
@@ -4690,10 +4911,10 @@ int tdb_create_rwlocks(int fd, unsigned int hash_size);
int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
-/*The following definitions come from tdb/tdb.c */
+/* The following definitions come from tdb/tdb.c */
void tdb_dump_all(TDB_CONTEXT *tdb);
-void tdb_printfreelist(TDB_CONTEXT *tdb);
+int tdb_printfreelist(TDB_CONTEXT *tdb);
enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb);
const char *tdb_errorstr(TDB_CONTEXT *tdb);
TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key);
@@ -4714,35 +4935,35 @@ void tdb_unlockall(TDB_CONTEXT *tdb);
int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]);
void tdb_unlockkeys(TDB_CONTEXT *tdb);
int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
-void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
+int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
void tdb_logging_function(TDB_CONTEXT *tdb, void (*fn)(TDB_CONTEXT *, int , const char *, ...));
int tdb_reopen(TDB_CONTEXT *tdb);
int tdb_reopen_all(void);
-/*The following definitions come from tdb/tdbutil.c */
+/* The following definitions come from tdb/tdbutil.c */
int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval);
void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval);
-int tdb_fetch_int_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len);
-int tdb_fetch_int(TDB_CONTEXT *tdb, char *keystr);
-int tdb_store_int_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int v);
-int tdb_store_int(TDB_CONTEXT *tdb, char *keystr, int v);
int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len);
int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr);
int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v);
int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v);
+BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 *value);
+BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value);
+BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 value);
+BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value);
int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, void *buffer, int len);
TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr);
-int tdb_change_int_atomic(TDB_CONTEXT *tdb, char *keystr, int *oldval, int change_val);
int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val);
+BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val);
size_t tdb_pack(char *buf, int bufsize, char *fmt, ...);
int tdb_unpack(char *buf, int bufsize, char *fmt, ...);
-TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags,
+TDB_CONTEXT *tdb_open_log(const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode);
int tdb_traverse_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf,
void *state);
-/*The following definitions come from utils/nbio.c */
+/* The following definitions come from utils/nbio.c */
void nb_setup(struct cli_state *cli);
void nb_unlink(char *fname);
@@ -4756,11 +4977,11 @@ void nb_rename(char *old, char *new);
void nb_stat(char *fname, int size);
void nb_create(char *fname, int size);
-/*The following definitions come from utils/torture.c */
+/* The following definitions come from utils/torture.c */
int cli_setfileinfo_test(struct cli_state *cli, int fnum, int level, char *data, int data_len);
-/*The following definitions come from web/cgi.c */
+/* The following definitions come from web/cgi.c */
void cgi_load_variables(FILE *f1);
char *cgi_variable(char *name);
@@ -4773,12 +4994,12 @@ char *cgi_remote_host(void);
char *cgi_remote_addr(void);
BOOL cgi_waspost(void);
-/*The following definitions come from web/diagnose.c */
+/* The following definitions come from web/diagnose.c */
BOOL nmbd_running(void);
BOOL smbd_running(void);
-/*The following definitions come from web/startstop.c */
+/* The following definitions come from web/startstop.c */
void start_smbd(void);
void start_nmbd(void);
@@ -4786,10 +5007,10 @@ void stop_smbd(void);
void stop_nmbd(void);
void kill_pid(pid_t pid);
-/*The following definitions come from web/statuspage.c */
+/* The following definitions come from web/statuspage.c */
void status_page(void);
-/*The following definitions come from web/swat.c */
+/* The following definitions come from web/swat.c */
#endif /* _PROTO_H_ */
diff --git a/source/include/rpc_lsa.h b/source/include/rpc_lsa.h
index a9a28a63ac3..ccdce6f2636 100644
--- a/source/include/rpc_lsa.h
+++ b/source/include/rpc_lsa.h
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
SMB parameters and setup
Copyright (C) Andrew Tridgell 1992-1997
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
@@ -39,7 +38,7 @@ enum SID_NAME_USE
SID_NAME_UNKNOWN = 8 /* oops. */
};
-/* Opcodes available on this pipe */
+/* Opcodes available on PIPE_LSARPC */
#define LSA_CLOSE 0x00
#define LSA_DELETE 0x01
@@ -91,9 +90,6 @@ enum SID_NAME_USE
/* XXXX these are here to get a compile! */
#define LSA_LOOKUPRIDS 0xFD
-#define LSA_MAX_GROUPS 96
-#define LSA_MAX_SIDS 128
-
/* DOM_QUERY - info class 3 and 5 LSA Query response */
typedef struct dom_query_info
{
@@ -106,7 +102,7 @@ typedef struct dom_query_info
} DOM_QUERY;
-/* level 5 is same as level 3. we hope. */
+/* level 5 is same as level 3. */
typedef DOM_QUERY DOM_QUERY_3;
typedef DOM_QUERY DOM_QUERY_5;
@@ -131,7 +127,6 @@ typedef struct seq_qos_info
uint16 sec_imp_level; /* 0x02 - impersonation level */
uint8 sec_ctxt_mode; /* 0x01 - context tracking mode */
uint8 effective_only; /* 0x00 - effective only */
- uint32 unknown; /* 0x2000 0000 - not known */
} LSA_SEC_QOS;
@@ -185,6 +180,53 @@ typedef struct lsa_r_open_pol2_info
} LSA_R_OPEN_POL2;
+
+#define POLICY_VIEW_LOCAL_INFORMATION 0x00000001
+#define POLICY_VIEW_AUDIT_INFORMATION 0x00000002
+#define POLICY_GET_PRIVATE_INFORMATION 0x00000004
+#define POLICY_TRUST_ADMIN 0x00000008
+#define POLICY_CREATE_ACCOUNT 0x00000010
+#define POLICY_CREATE_SECRET 0x00000020
+#define POLICY_CREATE_PRIVILEGE 0x00000040
+#define POLICY_SET_DEFAULT_QUOTA_LIMITS 0x00000080
+#define POLICY_SET_AUDIT_REQUIREMENTS 0x00000100
+#define POLICY_AUDIT_LOG_ADMIN 0x00000200
+#define POLICY_SERVER_ADMIN 0x00000400
+#define POLICY_LOOKUP_NAMES 0x00000800
+
+#define POLICY_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS |\
+ POLICY_VIEW_LOCAL_INFORMATION |\
+ POLICY_VIEW_AUDIT_INFORMATION |\
+ POLICY_GET_PRIVATE_INFORMATION |\
+ POLICY_TRUST_ADMIN |\
+ POLICY_CREATE_ACCOUNT |\
+ POLICY_CREATE_SECRET |\
+ POLICY_CREATE_PRIVILEGE |\
+ POLICY_SET_DEFAULT_QUOTA_LIMITS |\
+ POLICY_SET_AUDIT_REQUIREMENTS |\
+ POLICY_AUDIT_LOG_ADMIN |\
+ POLICY_SERVER_ADMIN |\
+ POLICY_LOOKUP_NAMES )
+
+
+#define POLICY_READ ( STANDARD_RIGHTS_READ_ACCESS |\
+ POLICY_VIEW_AUDIT_INFORMATION |\
+ POLICY_GET_PRIVATE_INFORMATION)
+
+#define POLICY_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS |\
+ POLICY_TRUST_ADMIN |\
+ POLICY_CREATE_ACCOUNT |\
+ POLICY_CREATE_SECRET |\
+ POLICY_CREATE_PRIVILEGE |\
+ POLICY_SET_DEFAULT_QUOTA_LIMITS |\
+ POLICY_SET_AUDIT_REQUIREMENTS |\
+ POLICY_AUDIT_LOG_ADMIN |\
+ POLICY_SERVER_ADMIN)
+
+#define POLICY_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS |\
+ POLICY_VIEW_LOCAL_INFORMATION |\
+ POLICY_LOOKUP_NAMES )
+
/* LSA_Q_QUERY_SEC_OBJ - LSA query security */
typedef struct lsa_query_sec_obj_info
{
@@ -317,7 +359,8 @@ typedef struct lsa_trans_name_info
} LSA_TRANS_NAME;
-#define MAX_LOOKUP_SIDS 30
+/* This number purly arbitary - just to prevent a client from requesting large amounts of memory */
+#define MAX_LOOKUP_SIDS 256
/* LSA_TRANS_NAME_ENUM - LSA Translated Name Enumeration container */
typedef struct lsa_trans_name_enum_info
@@ -570,21 +613,60 @@ typedef struct lsa_r_getsystemaccount
} LSA_R_GETSYSTEMACCOUNT;
-#endif /* _RPC_LSA_H */
-/*
+typedef struct lsa_q_setsystemaccount
+{
+ POLICY_HND pol; /* policy handle */
+ uint32 access;
+} LSA_Q_SETSYSTEMACCOUNT;
-opnum 11: opensid: query: handle du domaine, sid du user
-reply: handle, status
+typedef struct lsa_r_setsystemaccount
+{
+ NTSTATUS status;
+} LSA_R_SETSYSTEMACCOUNT;
-opnum 12: getlistofprivs: query: handle du user
-reply: ptr, nombre, nombre, tableau de 3 uint32: flag+priv.low+priv.high
-uint32 0, status
-opnum 17: ?? query: handle
-reply: uint32 + status
+typedef struct lsa_q_lookupprivvalue
+{
+ POLICY_HND pol; /* policy handle */
+ UNIHDR hdr_right;
+ UNISTR2 uni2_right;
+} LSA_Q_LOOKUPPRIVVALUE;
+typedef struct lsa_r_lookupprivvalue
+{
+ LUID luid;
+ NTSTATUS status;
+} LSA_R_LOOKUPPRIVVALUE;
-*/
+typedef struct lsa_q_addprivs
+{
+ POLICY_HND pol; /* policy handle */
+ uint32 count;
+ PRIVILEGE_SET set;
+} LSA_Q_ADDPRIVS;
+
+typedef struct lsa_r_addprivs
+{
+ NTSTATUS status;
+} LSA_R_ADDPRIVS;
+
+
+typedef struct lsa_q_removeprivs
+{
+ POLICY_HND pol; /* policy handle */
+ uint32 allrights;
+ uint32 ptr;
+ uint32 count;
+ PRIVILEGE_SET set;
+} LSA_Q_REMOVEPRIVS;
+
+typedef struct lsa_r_removeprivs
+{
+ NTSTATUS status;
+} LSA_R_REMOVEPRIVS;
+
+
+#endif /* _RPC_LSA_H */
diff --git a/source/include/rpc_secdes.h b/source/include/rpc_secdes.h
index 259c1567675..25daf1ceba5 100644
--- a/source/include/rpc_secdes.h
+++ b/source/include/rpc_secdes.h
@@ -172,4 +172,11 @@ typedef struct generic_mapping {
uint32 generic_all;
} GENERIC_MAPPING;
+typedef struct standard_mapping {
+ uint32 std_read;
+ uint32 std_write;
+ uint32 std_execute;
+ uint32 std_all;
+} STANDARD_MAPPING;
+
#endif /* _RPC_SECDES_H */
diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h
index 9ed83b18d8a..ce137858df0 100755
--- a/source/include/rpc_spoolss.h
+++ b/source/include/rpc_spoolss.h
@@ -28,7 +28,6 @@
#define STRING 2
/* spoolss pipe: this are the calls which are not implemented ...
-#define SPOOLSS_OPENPRINTER 0x01
#define SPOOLSS_GETPRINTERDRIVER 0x0b
#define SPOOLSS_READPRINTER 0x16
#define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
@@ -46,16 +45,13 @@
#define SPOOLSS_DELETEPRINTPROCESSOR 0x30
#define SPOOLSS_ADDPRINTPROVIDOR 0x31
#define SPOOLSS_DELETEPRINTPROVIDOR 0x32
-#define SPOOLSS_RESETPRINTER 0x34
#define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
#define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
#define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
-#define SPOOLSS_ROUTERREPLYPRINTER 0x3b
#define SPOOLSS_ADDPORTEX 0x3d
#define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
#define SPOOLSS_SPOOLERINIT 0x3f
#define SPOOLSS_RESETPRINTEREX 0x40
-#define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42
#define SPOOLSS_DELETEPRINTERDATAEX 0x51
#define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
#define SPOOLSS_ADDPRINTERDRIVEREX 0x59
@@ -63,6 +59,7 @@
/* those are implemented */
#define SPOOLSS_ENUMPRINTERS 0x00
+#define SPOOLSS_OPENPRINTER 0x01
#define SPOOLSS_SETJOB 0x02
#define SPOOLSS_GETJOB 0x03
#define SPOOLSS_ENUMJOBS 0x04
@@ -96,17 +93,15 @@
#define SPOOLSS_ENUMPORTS 0x23
#define SPOOLSS_ENUMMONITORS 0x24
#define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
+#define SPOOLSS_RESETPRINTER 0x34
#define SPOOLSS_GETPRINTERDRIVER2 0x35
-/* find close printer notification */
-#define SPOOLSS_FCPN 0x38
+#define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */
#define SPOOLSS_REPLYOPENPRINTER 0x3a
+#define SPOOLSS_ROUTERREPLYPRINTER 0x3b
#define SPOOLSS_REPLYCLOSEPRINTER 0x3c
-/* remote find first printer change notifyEx */
-#define SPOOLSS_RFFPCNEX 0x41
-/*SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION */
-#define SPOOLSS_RRPCN 0x42
-/* remote find next printer change notifyEx */
-#define SPOOLSS_RFNPCNEX 0x43
+#define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */
+#define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */
+#define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */
#define SPOOLSS_OPENPRINTEREX 0x45
#define SPOOLSS_ADDPRINTEREX 0x46
#define SPOOLSS_ENUMPRINTERDATA 0x48
@@ -264,6 +259,8 @@
#define JOB_NOTIFY_TOTAL_BYTES 0x16
#define JOB_NOTIFY_BYTES_PRINTED 0x17
+#define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
+
#define PRINTER_CHANGE_ADD_PRINTER 0x00000001
#define PRINTER_CHANGE_SET_PRINTER 0x00000002
#define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
@@ -318,6 +315,34 @@
#define PRINTER_NOTIFY_INFO_DISCARDED 0x1
/*
+ * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
+ * when sending messages to other smbd's
+ */
+#define PRINTER_MESSAGE_NULL 0x00000000
+#define PRINTER_MESSAGE_DRIVER 0x00000001
+#define PRINTER_MESSAGE_COMMENT 0x00000002
+#define PRINTER_MESSAGE_PRINTERNAME 0x00000004
+#define PRINTER_MESSAGE_LOCATION 0x00000008
+#define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */
+#define PRINTER_MESSAGE_SEPFILE 0x00000020
+#define PRINTER_MESSAGE_PRINTPROC 0x00000040
+#define PRINTER_MESSAGE_PARAMS 0x00000080
+#define PRINTER_MESSAGE_DATATYPE 0x00000100
+#define PRINTER_MESSAGE_SECDESC 0x00000200
+#define PRINTER_MESSAGE_CJOBS 0x00000400
+#define PRINTER_MESSAGE_PORT 0x00000800
+#define PRINTER_MESSAGE_SHARENAME 0x00001000
+#define PRINTER_MESSAGE_ATTRIBUTES 0x00002000
+
+typedef struct printer_message_info {
+ uint32 low; /* PRINTER_CHANGE_XXX */
+ uint32 high; /* PRINTER_CHANGE_XXX */
+ fstring printer_name;
+ uint32 flags; /* PRINTER_MESSAGE_XXX */
+}
+PRINTER_MESSAGE_INFO;
+
+/*
* The printer attributes.
* I #defined all of them (grabbed form MSDN)
* I'm only using:
@@ -395,6 +420,44 @@ typedef struct spool_user_ctr_info
}
SPOOL_USER_CTR;
+/*
+ * various bits in the DEVICEMODE.fields member
+ */
+
+#define DEVMODE_ORIENTATION 0x00000001
+#define DEVMODE_PAPERSIZE 0x00000002
+#define DEVMODE_PAPERLENGTH 0x00000004
+#define DEVMODE_PAPERWIDTH 0x00000008
+#define DEVMODE_SCALE 0x00000010
+#define DEVMODE_POSITION 0x00000020
+#define DEVMODE_NUP 0x00000040
+#define DEVMODE_COPIES 0x00000100
+#define DEVMODE_DEFAULTSOURCE 0x00000200
+#define DEVMODE_PRINTQUALITY 0x00000400
+#define DEVMODE_COLOR 0x00000800
+#define DEVMODE_DUPLEX 0x00001000
+#define DEVMODE_YRESOLUTION 0x00002000
+#define DEVMODE_TTOPTION 0x00004000
+#define DEVMODE_COLLATE 0x00008000
+#define DEVMODE_FORMNAME 0x00010000
+#define DEVMODE_LOGPIXELS 0x00020000
+#define DEVMODE_BITSPERPEL 0x00040000
+#define DEVMODE_PELSWIDTH 0x00080000
+#define DEVMODE_PELSHEIGHT 0x00100000
+#define DEVMODE_DISPLAYFLAGS 0x00200000
+#define DEVMODE_DISPLAYFREQUENCY 0x00400000
+#define DEVMODE_ICMMETHOD 0x00800000
+#define DEVMODE_ICMINTENT 0x01000000
+#define DEVMODE_MEDIATYPE 0x02000000
+#define DEVMODE_DITHERTYPE 0x04000000
+#define DEVMODE_PANNINGWIDTH 0x08000000
+#define DEVMODE_PANNINGHEIGHT 0x10000000
+
+
+/*
+ * Devicemode structure
+ */
+
typedef struct devicemode
{
UNISTR devicename;
@@ -452,6 +515,23 @@ typedef struct _printer_default
}
PRINTER_DEFAULT;
+/* SPOOL_Q_OPEN_PRINTER request to open a printer */
+typedef struct spool_q_open_printer
+{
+ uint32 printername_ptr;
+ UNISTR2 printername;
+ PRINTER_DEFAULT printer_default;
+}
+SPOOL_Q_OPEN_PRINTER;
+
+/* SPOOL_R_OPEN_PRINTER reply to an open printer */
+typedef struct spool_r_open_printer
+{
+ POLICY_HND handle; /* handle used along all transactions (20*uint8) */
+ WERROR status;
+}
+SPOOL_R_OPEN_PRINTER;
+
/* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
typedef struct spool_q_open_printer_ex
{
@@ -1253,6 +1333,10 @@ typedef struct spool_r_enumprinterdrivers
}
SPOOL_R_ENUMPRINTERDRIVERS;
+#define FORM_USER 0
+#define FORM_BUILTIN 1
+#define FORM_PRINTER 2
+
typedef struct spool_form_1
{
uint32 flag;
@@ -1741,6 +1825,23 @@ typedef struct spool_r_setprinterdata
}
SPOOL_R_SETPRINTERDATA;
+typedef struct spool_q_resetprinter
+{
+ POLICY_HND handle;
+ uint32 datatype_ptr;
+ UNISTR2 datatype;
+ DEVMODE_CTR devmode_ctr;
+
+} SPOOL_Q_RESETPRINTER;
+
+typedef struct spool_r_resetprinter
+{
+ WERROR status;
+}
+SPOOL_R_RESETPRINTER;
+
+
+
typedef struct _form
{
uint32 flags;
@@ -1759,7 +1860,7 @@ typedef struct spool_q_addform
{
POLICY_HND handle;
uint32 level;
- uint32 level2;
+ uint32 level2; /* This should really be part of the FORM structure */
FORM form;
}
SPOOL_Q_ADDFORM;
@@ -1847,6 +1948,22 @@ typedef struct spool_r_replyopenprinter
}
SPOOL_R_REPLYOPENPRINTER;
+typedef struct spool_q_routerreplyprinter
+{
+ POLICY_HND handle;
+ uint32 condition;
+ uint32 unknown1; /* 0x00000001 */
+ uint32 change_id;
+ uint8 unknown2[5]; /* 0x0000000001 */
+}
+SPOOL_Q_ROUTERREPLYPRINTER;
+
+typedef struct spool_r_routerreplyprinter
+{
+ WERROR status;
+}
+SPOOL_R_ROUTERREPLYPRINTER;
+
typedef struct spool_q_replycloseprinter
{
POLICY_HND handle;
diff --git a/source/include/rpc_srvsvc.h b/source/include/rpc_srvsvc.h
index 651c0b97673..8458074619f 100644
--- a/source/include/rpc_srvsvc.h
+++ b/source/include/rpc_srvsvc.h
@@ -67,7 +67,7 @@ typedef struct net_srv_disk_enum {
uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
typedef struct net_name_validate {
@@ -76,7 +76,7 @@ typedef struct net_name_validate {
UNISTR2 uni_name; /*name to validate*/
uint32 type;
uint32 flags;
- NTSTATUS status;
+ WERROR status;
} SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE;
/* SESS_INFO_0 (pointers to level 0 session info strings) */
@@ -185,7 +185,7 @@ typedef struct r_net_sess_enum_info
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SESS_ENUM;
@@ -288,7 +288,7 @@ typedef struct r_net_conn_enum_info
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_CONN_ENUM;
@@ -349,6 +349,27 @@ typedef struct share_info_2_info
} SRV_SHARE_INFO_2;
+typedef struct ptr_share_info501
+{
+ uint32 ptr_netname; /* pointer to net name */
+ uint32 type; /* ipc, print, disk */
+ uint32 ptr_remark; /* pointer to comment */
+ uint32 csc_policy; /* client-side offline caching policy << 4 */
+} SH_INFO_501;
+
+typedef struct str_share_info501
+{
+ UNISTR2 uni_netname; /* unicode string of net name */
+ UNISTR2 uni_remark; /* unicode string of comment */
+} SH_INFO_501_STR;
+
+/* SRV_SHARE_INFO_501 */
+typedef struct share_info_501_info
+{
+ SH_INFO_501 info_501;
+ SH_INFO_501_STR info_501_str;
+} SRV_SHARE_INFO_501;
+
/* SH_INFO_502 (pointers to level 502 share info strings) */
typedef struct ptr_share_info502
{
@@ -391,7 +412,7 @@ typedef struct share_info_502_info
/* SRV_SHARE_INFO_1005 */
typedef struct share_info_1005_info
{
- uint32 dfs_root_flag;
+ uint32 misc_flags;
} SRV_SHARE_INFO_1005;
/* SRV_SHARE_INFO_1501 */
@@ -414,6 +435,7 @@ typedef struct srv_share_info_ctr_info
union {
SRV_SHARE_INFO_1 *info1; /* share info level 1 */
SRV_SHARE_INFO_2 *info2; /* share info level 2 */
+ SRV_SHARE_INFO_501 *info501; /* share info level 501 */
SRV_SHARE_INFO_502 *info502; /* share info level 502 */
void *info;
@@ -444,7 +466,7 @@ typedef struct r_net_share_enum_info
uint32 total_entries; /* total number of entries */
ENUM_HND enum_hnd;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SHARE_ENUM;
@@ -470,9 +492,10 @@ typedef struct srv_share_info {
union {
SRV_SHARE_INFO_1 info1;
SRV_SHARE_INFO_2 info2;
+ SRV_SHARE_INFO_501 info501;
SRV_SHARE_INFO_502 info502;
- SRV_SHARE_INFO_1005 info1005;
- SRV_SHARE_INFO_1501 info1501;
+ SRV_SHARE_INFO_1005 info1005;
+ SRV_SHARE_INFO_1501 info1501;
} share;
} SRV_SHARE_INFO;
@@ -480,7 +503,7 @@ typedef struct srv_share_info {
typedef struct r_net_share_get_info_info
{
SRV_SHARE_INFO info;
- NTSTATUS status;
+ WERROR status;
} SRV_R_NET_SHARE_GET_INFO;
@@ -502,7 +525,7 @@ typedef struct r_net_share_set_info
{
uint32 switch_value; /* switch value */
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SHARE_SET_INFO;
@@ -523,7 +546,7 @@ typedef struct r_net_share_add
{
uint32 switch_value; /* switch value */
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SHARE_ADD;
@@ -539,7 +562,7 @@ typedef struct q_net_share_del
/* SRV_R_NET_SHARE_DEL */
typedef struct r_net_share_del
{
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SHARE_DEL;
@@ -622,7 +645,7 @@ typedef struct r_net_file_enum_info
uint32 total_entries; /* total number of files */
ENUM_HND enum_hnd;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_FILE_ENUM;
@@ -704,7 +727,7 @@ typedef struct r_net_srv_get_info
{
SRV_INFO_CTR *ctr;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SRV_GET_INFO;
@@ -725,7 +748,7 @@ typedef struct r_net_srv_set_info
{
uint32 switch_value; /* switch value */
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_SRV_SET_INFO;
@@ -761,7 +784,7 @@ typedef struct r_net_remote_tod
uint32 ptr_srv_tod; /* pointer to TOD */
TIME_OF_DAY_INFO *tod;
- NTSTATUS status; /* return status */
+ WERROR status; /* return status */
} SRV_R_NET_REMOTE_TOD;
@@ -786,7 +809,7 @@ typedef struct r_net_file_query_secdesc
uint32 ptr_secdesc;
uint32 size_secdesc;
SEC_DESC *sec_desc;
- NTSTATUS status;
+ WERROR status;
} SRV_R_NET_FILE_QUERY_SECDESC;
/* SRV_Q_NET_FILE_SET_SECDESC */
@@ -807,6 +830,6 @@ typedef struct q_net_file_set_secdesc
/* SRV_R_NET_FILE_SET_SECDESC */
typedef struct r_net_file_set_secdesc
{
- NTSTATUS status;
+ WERROR status;
} SRV_R_NET_FILE_SET_SECDESC;
#endif /* _RPC_SRVSVC_H */
diff --git a/source/include/safe_string.h b/source/include/safe_string.h
index 2c3d2eda01f..4517d824a58 100644
--- a/source/include/safe_string.h
+++ b/source/include/safe_string.h
@@ -22,6 +22,11 @@
#ifndef _SAFE_STRING_H
#define _SAFE_STRING_H
+#ifdef bcopy
+#undef bcopy
+#endif /* bcopy */
+#define bcopy(src,dest,size) __ERROR__XX__NEVER_USE_BCOPY___;
+
#ifdef strcpy
#undef strcpy
#endif /* strcpy */
@@ -42,6 +47,9 @@
#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
+#define fstrterminate(d) (((d)[sizeof(fstring)-1]) = '\0')
+#define pstrterminate(d) (((d)[sizeof(pstring)-1]) = '\0')
+
#define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring))
#define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring))
#define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring))
diff --git a/source/include/secrets.h b/source/include/secrets.h
index c16d5c7b30e..55158885feb 100644
--- a/source/include/secrets.h
+++ b/source/include/secrets.h
@@ -1,12 +1,39 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * secrets.tdb file format info
+ * Copyright (C) Andrew Tridgell 2000
+ *
+ * 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., 675
+ * Mass Ave, Cambridge, MA 02139, USA.
+ */
-
+#ifndef _SECRETS_H
+#define _SECRETS_H
#define SECRETS_MACHINE_ACCT_PASS "SECRETS/$MACHINE.ACC"
#define SECRETS_DOMAIN_SID "SECRETS/SID"
#define SECRETS_SAM_SID "SAM/SID"
+/* Authenticated user info is stored in secrets.tdb under these keys */
+
+#define SECRETS_AUTH_USER "SECRETS/AUTH_USER"
+#define SECRETS_AUTH_DOMAIN "SECRETS/AUTH_DOMAIN"
+#define SECRETS_AUTH_PASSWORD "SECRETS/AUTH_PASSWORD"
+
struct machine_acct_pass {
uint8 hash[16];
time_t mod_time;
};
+#endif /* _SECRETS_H */
diff --git a/source/include/smb.h b/source/include/smb.h
index c701d460df1..2b4d4fa690e 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -25,7 +25,12 @@
#ifndef _SMB_H
#define _SMB_H
+#if defined(LARGE_SMB_OFF_T)
+#define BUFFER_SIZE (128*1024)
+#else /* no large readwrite possible */
#define BUFFER_SIZE (0xFFFF)
+#endif
+
#define SAFETY_MARGIN 1024
#define LARGE_WRITEX_HDR_SIZE 65
@@ -80,12 +85,12 @@ implemented */
#define pSETDIR '\377'
/* these define the attribute byte as seen by DOS */
-#define aRONLY (1L<<0)
-#define aHIDDEN (1L<<1)
-#define aSYSTEM (1L<<2)
-#define aVOLID (1L<<3)
-#define aDIR (1L<<4)
-#define aARCH (1L<<5)
+#define aRONLY (1L<<0) /* 0x01 */
+#define aHIDDEN (1L<<1) /* 0x02 */
+#define aSYSTEM (1L<<2) /* 0x04 */
+#define aVOLID (1L<<3) /* 0x08 */
+#define aDIR (1L<<4) /* 0x10 */
+#define aARCH (1L<<5) /* 0x20 */
/* deny modes */
#define DENY_DOS 0
@@ -124,11 +129,6 @@ implemented */
#define GET_DELETE_ON_CLOSE_FLAG(x) (((x) & DELETE_ON_CLOSE_FLAG) ? True : False)
#define SET_DELETE_ON_CLOSE_FLAG(x) ((x) ? DELETE_ON_CLOSE_FLAG : 0)
-/* was delete access requested in NT open ? */
-#define DELETE_ACCESS_REQUESTED (1<<17)
-#define GET_DELETE_ACCESS_REQUESTED(x) (((x) & DELETE_ACCESS_REQUESTED) ? True : False)
-#define SET_DELETE_ACCESS_REQUESTED(x) ((x) ? DELETE_ACCESS_REQUESTED : 0)
-
/* open disposition values */
#define FILE_EXISTS_FAIL 0
#define FILE_EXISTS_OPEN 1
@@ -399,6 +399,7 @@ typedef struct files_struct
write_cache *wcp;
struct timeval open_time;
int share_mode;
+ uint32 desired_access;
time_t pending_modtime;
int oplock_type;
int sent_oplock_break;
@@ -410,10 +411,16 @@ typedef struct files_struct
BOOL modified;
BOOL is_directory;
BOOL directory_delete_on_close;
- BOOL stat_open;
char *fsp_name;
} files_struct;
+/* used to hold an arbitrary blob of data */
+typedef struct data_blob {
+ uint8 *data;
+ size_t length;
+ void (*free)(struct data_blob *data_blob);
+} DATA_BLOB;
+
/*
* Structure used to keep directory state information around.
* Used in NT change-notify code.
@@ -438,6 +445,7 @@ typedef struct
/* Include VFS stuff */
+#include "smb_acls.h"
#include "vfs.h"
typedef struct connection_struct
@@ -459,6 +467,7 @@ typedef struct connection_struct
struct vfs_ops vfs_ops; /* Filesystem operations */
/* Handle on dlopen() call */
void *dl_handle;
+ void *vfs_private;
char *user; /* name of user who *opened* this connection */
uid_t uid; /* uid of user who *opened* this connection */
@@ -515,11 +524,12 @@ typedef struct _print_queue_struct
{
int job;
int size;
+ int page_count;
int status;
int priority;
time_t time;
- fstring user;
- fstring file;
+ fstring fs_user;
+ fstring fs_file;
} print_queue_struct;
enum {LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR};
@@ -557,6 +567,7 @@ typedef struct {
uint16 op_port;
uint16 op_type;
int share_mode;
+ uint32 desired_access;
struct timeval time;
SMB_DEV_T dev;
SMB_INO_T inode;
@@ -1031,11 +1042,11 @@ struct bitmap {
#define SYNCHRONIZE_ACCESS (1L<<20) /* 0x00100000 */
/* Combinations of standard masks. */
-#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS)
-#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS)
-#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS)
-#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS)
-#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS)
+#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) /* 0x001f0000 */
+#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */
+#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) /* 0x00200000 */
+#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) /* 0x000f0000 */
+#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */
#define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */
#define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */
@@ -1274,6 +1285,7 @@ char *strdup(char *s);
#define FLAGS2_LONG_PATH_COMPONENTS 0x0001
#define FLAGS2_EXTENDED_ATTRIBUTES 0x0002
+#define FLAGS2_IS_LONG_NAME 0x0040
#define FLAGS2_DFS_PATHNAMES 0x1000
#define FLAGS2_READ_PERMIT_NO_EXECUTE 0x2000
#define FLAGS2_32_BIT_ERROR_CODES 0x4000
@@ -1380,7 +1392,7 @@ extern int global_is_multibyte_codepage;
#define COPYBUF_SIZE (8*1024)
/*
- * Integers used to override error codes.
+ * Values used to override error codes.
*/
extern int unix_ERR_class;
extern int unix_ERR_code;
@@ -1648,6 +1660,5 @@ struct unix_error_map {
#define SAFE_NETBIOS_CHARS ". -_"
#include "nsswitch/winbindd_nss.h"
-#include "smb_acls.h"
#endif /* _SMB_H */
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h
index 5155d241d84..79bca5d7029 100644
--- a/source/include/smb_macros.h
+++ b/source/include/smb_macros.h
@@ -162,10 +162,10 @@
#define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__)
#define SMB_ROUNDUP(x,g) (((x)+((g)-1))&~((g)-1))
-#define SMB_ROUNDUP_ALLOCATION(s) (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE)))
+#define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 )
/* Extra macros added by Ying Chen at IBM - speed increase by inlining. */
-#define smb_buf(buf) (buf + smb_size + CVAL(buf,smb_wct)*2)
+#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2)
#define smb_buflen(buf) (SVAL(buf,smb_vwv0 + (int)CVAL(buf, smb_wct)*2))
/* Note that chain_size must be available as an extern int to this macro. */
@@ -238,13 +238,13 @@ copy an IP address from one buffer to another
vfs stat wrapper that calls dos_to_unix.
********************************************************************/
-#define vfs_stat(conn, fname, st) ((conn)->vfs_ops.stat((conn), dos_to_unix((fname),False),(st)))
+#define vfs_stat(conn, fname, st) ((conn)->vfs_ops.stat((conn), dos_to_unix_static((fname)),(st)))
/*******************************************************************
vfs lstat wrapper that calls dos_to_unix.
********************************************************************/
-#define vfs_lstat(conn, fname, st) ((conn)->vfs_ops.lstat((conn), dos_to_unix((fname),False),(st)))
+#define vfs_lstat(conn, fname, st) ((conn)->vfs_ops.lstat((conn), dos_to_unix_static((fname)),(st)))
/*******************************************************************
vfs fstat wrapper that calls dos_to_unix.
@@ -256,30 +256,30 @@ copy an IP address from one buffer to another
vfs rmdir wrapper that calls dos_to_unix.
********************************************************************/
-#define vfs_rmdir(conn,fname) ((conn)->vfs_ops.rmdir((conn),dos_to_unix((fname),False)))
+#define vfs_rmdir(conn,fname) ((conn)->vfs_ops.rmdir((conn),dos_to_unix_static((fname))))
/*******************************************************************
vfs Unlink wrapper that calls dos_to_unix.
********************************************************************/
-#define vfs_unlink(conn, fname) ((conn)->vfs_ops.unlink((conn),dos_to_unix((fname),False)))
+#define vfs_unlink(conn, fname) ((conn)->vfs_ops.unlink((conn),dos_to_unix_static((fname))))
/*******************************************************************
vfs chmod wrapper that calls dos_to_unix.
********************************************************************/
-#define vfs_chmod(conn,fname,mode) ((conn)->vfs_ops.chmod((conn),dos_to_unix((fname),False),(mode)))
+#define vfs_chmod(conn,fname,mode) ((conn)->vfs_ops.chmod((conn),dos_to_unix_static((fname)),(mode)))
/*******************************************************************
vfs chown wrapper that calls dos_to_unix.
********************************************************************/
-#define vfs_chown(conn,fname,uid,gid) ((conn)->vfs_ops.chown((conn),dos_to_unix((fname),False),(uid),(gid)))
+#define vfs_chown(conn,fname,uid,gid) ((conn)->vfs_ops.chown((conn),dos_to_unix_static((fname)),(uid),(gid)))
/*******************************************************************
A wrapper for vfs_chdir().
********************************************************************/
-#define vfs_chdir(conn,fname) ((conn)->vfs_ops.chdir((conn),dos_to_unix((fname),False)))
+#define vfs_chdir(conn,fname) ((conn)->vfs_ops.chdir((conn),dos_to_unix_static((fname))))
#endif /* _SMB_MACROS_H */
diff --git a/source/include/talloc.h b/source/include/talloc.h
index 06efbf6952a..64a58830413 100644
--- a/source/include/talloc.h
+++ b/source/include/talloc.h
@@ -1,10 +1,10 @@
#ifndef _TALLOC_H_
#define _TALLOC_H_
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Samba temporary memory allocation functions
Copyright (C) Andrew Tridgell 2000
+ Copyright (C) 2001 by Martin Pool <mbp@samba.org>
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
@@ -21,20 +21,31 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-struct talloc_chunk {
- struct talloc_chunk *next;
- size_t size;
- void *ptr;
-};
+/**
+ * @ingroup talloc
+ * @{
+ * @sa talloc.c
+ */
-typedef struct {
- struct talloc_chunk *list;
- size_t total_alloc_size;
-} TALLOC_CTX;
+/**
+ * talloc allocation pool. All allocated blocks can be freed in one go.
+ **/
+typedef struct talloc_ctx TALLOC_CTX;
-/* free memory if the pointer is valid and zero the pointer */
-#ifndef SAFE_FREE
-#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0)
-#endif
+TALLOC_CTX *talloc_init_named(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
-#endif
+char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap)
+ PRINTF_ATTRIBUTE(2, 0);
+
+char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+
+char *talloc_vasprintf_append(TALLOC_CTX *t, char *, const char *, va_list ap)
+ PRINTF_ATTRIBUTE(3, 0);
+
+char *talloc_asprintf_append(TALLOC_CTX *t, char *, const char *, ...)
+ PRINTF_ATTRIBUTE(3, 4);
+
+/** @} */
+
+#endif /* ndef _TALLOC_H_ */
diff --git a/source/include/version.h b/source/include/version.h
index b1f13fbbd2b..e4eea05944e 100644
--- a/source/include/version.h
+++ b/source/include/version.h
@@ -1 +1 @@
-#define VERSION "2.2.3a"
+#define VERSION "2.2.4-pre"
diff --git a/source/include/vfs.h b/source/include/vfs.h
index ee4bdea6022..bbbe2cb8b2d 100644
--- a/source/include/vfs.h
+++ b/source/include/vfs.h
@@ -40,7 +40,8 @@
*/
/* Changed to version 2 for CIFS UNIX extensions (mknod and link added). JRA. */
-#define SMB_VFS_INTERFACE_VERSION 2
+/* Changed to version 3 for POSIX acl extensions. JRA. */
+#define SMB_VFS_INTERFACE_VERSION 3
/* VFS operations structure */
@@ -52,39 +53,39 @@ struct vfs_ops {
/* Disk operations */
- int (*connect)(struct connection_struct *conn, char *service, char *user);
+ int (*connect)(struct connection_struct *conn, const char *service, const char *user);
void (*disconnect)(struct connection_struct *conn);
- SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+ SMB_BIG_UINT (*disk_free)(struct connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
/* Directory operations */
- DIR *(*opendir)(struct connection_struct *conn, char *fname);
+ DIR *(*opendir)(struct connection_struct *conn, const char *fname);
struct dirent *(*readdir)(struct connection_struct *conn, DIR *dirp);
- int (*mkdir)(struct connection_struct *conn, char *path, mode_t mode);
- int (*rmdir)(struct connection_struct *conn, char *path);
+ int (*mkdir)(struct connection_struct *conn, const char *path, mode_t mode);
+ int (*rmdir)(struct connection_struct *conn, const char *path);
int (*closedir)(struct connection_struct *conn, DIR *dir);
/* File operations */
- int (*open)(struct connection_struct *conn, char *fname, int flags, mode_t mode);
+ int (*open)(struct connection_struct *conn, const char *fname, int flags, mode_t mode);
int (*close)(struct files_struct *fsp, int fd);
ssize_t (*read)(struct files_struct *fsp, int fd, void *data, size_t n);
ssize_t (*write)(struct files_struct *fsp, int fd, const void *data, size_t n);
SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence);
- int (*rename)(struct connection_struct *conn, char *old, char *new);
+ int (*rename)(struct connection_struct *conn, const char *old, const char *new);
int (*fsync)(struct files_struct *fsp, int fd);
- int (*stat)(struct connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf);
+ int (*stat)(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf);
int (*fstat)(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
- int (*lstat)(struct connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf);
- int (*unlink)(struct connection_struct *conn, char *path);
- int (*chmod)(struct connection_struct *conn, char *path, mode_t mode);
+ int (*lstat)(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf);
+ int (*unlink)(struct connection_struct *conn, const char *path);
+ int (*chmod)(struct connection_struct *conn, const char *path, mode_t mode);
int (*fchmod)(struct files_struct *fsp, int fd, mode_t mode);
- int (*chown)(struct connection_struct *conn, char *path, uid_t uid, gid_t gid);
+ int (*chown)(struct connection_struct *conn, const char *path, uid_t uid, gid_t gid);
int (*fchown)(struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
- int (*chdir)(struct connection_struct *conn, char *path);
+ int (*chdir)(struct connection_struct *conn, const char *path);
char *(*getwd)(struct connection_struct *conn, char *buf);
- int (*utime)(struct connection_struct *conn, char *path, struct utimbuf *times);
+ int (*utime)(struct connection_struct *conn, const char *path, struct utimbuf *times);
int (*ftruncate)(struct files_struct *fsp, int fd, SMB_OFF_T offset);
BOOL (*lock)(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int (*symlink)(struct connection_struct *conn, const char *oldpath, const char *newpath);
@@ -96,15 +97,37 @@ struct vfs_ops {
/* NT ACL operations. */
size_t (*fget_nt_acl)(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc);
- size_t (*get_nt_acl)(struct files_struct *fsp, char *name, struct security_descriptor_info **ppdesc);
+ size_t (*get_nt_acl)(struct files_struct *fsp, const char *name, struct security_descriptor_info **ppdesc);
BOOL (*fset_nt_acl)(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd);
- BOOL (*set_nt_acl)(struct files_struct *fsp, char *name, uint32 security_info_sent, struct security_descriptor_info *psd);
+ BOOL (*set_nt_acl)(struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd);
/* POSIX ACL operations. */
- int (*chmod_acl)(struct connection_struct *conn, char *name, mode_t mode);
+ int (*chmod_acl)(struct connection_struct *conn, const char *name, mode_t mode);
int (*fchmod_acl)(struct files_struct *fsp, int fd, mode_t mode);
-
+
+ int (*sys_acl_get_entry)(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p);
+ int (*sys_acl_get_tag_type)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p);
+ int (*sys_acl_get_permset)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p);
+ void * (*sys_acl_get_qualifier)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d);
+ SMB_ACL_T (*sys_acl_get_file)(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type);
+ SMB_ACL_T (*sys_acl_get_fd)(struct files_struct *fsp, int fd);
+ int (*sys_acl_clear_perms)(struct connection_struct *conn, SMB_ACL_PERMSET_T permset);
+ int (*sys_acl_add_perm)(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
+ char * (*sys_acl_to_text)(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen);
+ SMB_ACL_T (*sys_acl_init)(struct connection_struct *conn, int count);
+ int (*sys_acl_create_entry)(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry);
+ int (*sys_acl_set_tag_type)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype);
+ int (*sys_acl_set_qualifier)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual);
+ int (*sys_acl_set_permset)(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
+ int (*sys_acl_valid)(struct connection_struct *conn, SMB_ACL_T theacl );
+ int (*sys_acl_set_file)(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
+ int (*sys_acl_set_fd)(struct files_struct *fsp, int fd, SMB_ACL_T theacl);
+ int (*sys_acl_delete_def_file)(struct connection_struct *conn, const char *path);
+ int (*sys_acl_get_perm)(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm);
+ int (*sys_acl_free_text)(struct connection_struct *conn, char *text);
+ int (*sys_acl_free_acl)(struct connection_struct *conn, SMB_ACL_T posix_acl);
+ int (*sys_acl_free_qualifier)(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype);
};
struct vfs_options {
diff --git a/source/lib/access.c b/source/lib/access.c
index d61915f0b24..73b4d57e706 100644
--- a/source/lib/access.c
+++ b/source/lib/access.c
@@ -15,6 +15,8 @@ static char *sep = ", \t";
#define FAIL (-1)
+#define ALLONES ((uint32)0xFFFFFFFF)
+
/* masked_match - match address against netnumber/netmask */
static int masked_match(char *tok, char *slash, char *s)
{
@@ -27,8 +29,14 @@ static int masked_match(char *tok, char *slash, char *s)
*slash = 0;
net = interpret_addr(tok);
*slash = '/';
- if (net == INADDR_NONE ||
- (mask = interpret_addr(slash + 1)) == INADDR_NONE) {
+
+ if (strlen(slash + 1) > 2) {
+ mask = interpret_addr(slash + 1);
+ } else {
+ mask = (uint32)((ALLONES >> atoi(slash + 1)) ^ ALLONES);
+ }
+
+ if (net == INADDR_NONE || mask == INADDR_NONE) {
DEBUG(0,("access: bad net/mask access control: %s\n", tok));
return (False);
}
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index 0462668ff84..2affa6a9e06 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -161,11 +161,21 @@ update_map("\370\375\371\205\372\243\373\373\374\201\375\354\376\356\377\372");
/* Init for russian language (iso8859-5) */
/* Added by Max Khon <max@iclub.nsu.ru> */
-
-static void init_iso8859_5(void)
+/* 1125 mapping added by Alexander Bokovoy <a.bokovoy@sam-solutions.net> */
+static void init_iso8859_5(int codepage)
{
setupmaps();
+ if (codepage == 1125) {
+/* MSDOS Code Page 1125 -> ISO8859-5 */
+update_map ("\360\374\361\361\340\340\341\341\320\240\342\342\321\241\300\220");
+update_map ("\364\365\343\343\322\242\301\221\260\200\344\344\323\243\302\222");
+update_map ("\261\201\366\367\241\360\345\345\324\244\303\223\262\202\367\371");
+update_map ("\346\346\325\245\304\224\263\203\347\347\326\246\305\225\264\204");
+update_map ("\244\364\350\350\327\247\306\226\265\205\351\351\330\250\307\227");
+update_map ("\266\206\246\366\331\251\310\230\267\207\247\370\311\231\270\210");
+update_map ("\271\211");
+ } else {
/* MSDOS Code Page 866 -> ISO8859-5 */
update_map("\260\200\261\201\262\202\263\203\264\204\265\205\266\206\267\207");
update_map("\270\210\271\211\272\212\273\213\274\214\275\215\276\216\277\217");
@@ -177,6 +187,7 @@ update_map("\340\340\341\341\342\342\343\343\344\344\345\345\346\346\347\347");
update_map("\350\350\351\351\352\352\353\353\354\354\355\355\356\356\357\357");
update_map("\241\360\361\361\244\362\364\363\247\364\367\365\256\366\376\367");
update_map("\360\374\240\377");
+ }
}
/* Added by Antonios Kavarnos (Antonios.Kavarnos@softlab.ece.ntua.gr */
@@ -201,6 +212,20 @@ update_map("\266\352");
update_map("\270\353\271\354\272\355\274\356\276\357\277\360");
}
+/* Added by Yedidyah Bar-David (didi@tau.ac.il) */
+
+static void init_iso8859_8(void)
+{
+ setupmaps();
+
+/* MSDOS Code Page 862 -> ISO-8859-8 (Hebrew) */
+
+update_map("\340\200\341\201\342\202\343\203\344\204\345\205\346\206\347\207");
+update_map("\350\210\351\211\352\212\353\213\354\214\355\215\356\216\357\217");
+update_map("\360\220\361\221\362\222\363\223\364\224\365\225\366\226\367\227");
+update_map("\370\230\371\231\372\232");
+}
+
/* Added by Deniz Akkus (akkus@alum.mit.edu) */
static void init_iso8859_9(void)
@@ -272,12 +297,12 @@ update_map("\370\234\371\233\372\207\373\230\374\235\375\231\376\227\377\232");
/* Init for Bulgarian, Belarussian, and variants of Russian and Ukrainian locales */
/* Patch from Alexander Bokovoy. */
-static void init_1251(void)
+static void init_1251(int codepage)
{
setupmaps();
+ if (codepage == 866) {
/* MSDOS Code Page 866 -> 1251 */
-
update_map ("\240\377\241\366\242\367\244\375");
update_map ("\250\360\252\362\257\364");
update_map ("\260\370\267\372");
@@ -290,9 +315,58 @@ update_map ("\340\240\341\241\342\242\343\243\344\244\345\245\346\246\347\247");
update_map ("\350\250\351\251\352\252\353\253\354\254\355\255\356\256\357\257");
update_map ("\360\340\361\341\362\342\363\343\364\344\365\345\366\346\367\347");
update_map ("\370\350\371\351\372\352\373\353\374\354\375\355\376\356\377\357");
+ } else {
+/* MSDOS Code Page 1125 (Ukranian) -> 1251 */
+update_map ("\271\374\270\361\360\340\361\341\340\240\362\342\341\241\320\220");
+update_map ("\272\365\363\343\342\242\321\221\300\200\364\344\343\243\322\222");
+update_map ("\301\201\263\367\250\360\365\345\344\244\323\223\302\202\277\371");
+update_map ("\366\346\345\245\324\224\303\203\367\347\346\246\325\225\304\204");
+update_map ("\252\364\370\350\347\247\326\226\305\205\371\351\350\250\327\227");
+update_map ("\306\206\262\366\351\251\330\230\307\207\257\370\331\231\310\210");
+update_map ("\311\211\245\362\264\363");
+ }
}
+/* Init for ukrainian language (koi8-u) */
+/* Added by Oleg Deribas <older@iname.com> */
+
+static void init_koi8_u(int codepage)
+{
+ setupmaps();
+
+ if (codepage == 866) {
+ /* MSDOS Code Page 866 -> KOI8-U */
+ update_map("\x80\xC4\x81\xB3\x82\xDA\x83\xBF\x84\xC0\x85\xD9\x86\xC3\x87\xB4\x88\xC2");
+ update_map("\x89\xC1\x8A\xC5\x8B\xDF\x8C\xDC\x8D\xDB\x8E\xDD\x8F\xDE\x90\xB0\x91\xB1");
+ update_map("\x92\xB2\x94\xFE\x95\xF9\x96\xFB\x9A\xFF\x9C\xF8\x9E\xFA\xA0\xCD\xA1\xBA");
+ update_map("\xA2\xD5\xA3\xF1\xA4\xF3\xA5\xC9\xA7\xF5\xA8\xBB\xA9\xD4\xAA\xD3\xAB\xC8");
+ update_map("\xAC\xBE\xAE\xBC\xAF\xC6\xB0\xC7\xB1\xCC\xB2\xB5\xB3\xF0\xB4\xF2\xB5\xB9");
+ update_map("\xB7\xF4\xB8\xCB\xB9\xCF\xBA\xD0\xBB\xCA\xBC\xD8\xBE\xCE\xC0\xEE\xC1\xA0");
+ update_map("\xC2\xA1\xC3\xE6\xC4\xA4\xC5\xA5\xC6\xE4\xC7\xA3\xC8\xE5\xC9\xA8\xCA\xA9");
+ update_map("\xCB\xAA\xCC\xAB\xCD\xAC\xCE\xAD\xCF\xAE\xD0\xAF\xD1\xEF\xD2\xE0\xD3\xE1");
+ update_map("\xD4\xE2\xD5\xE3\xD6\xA6\xD7\xA2\xD8\xEC\xD9\xEB\xDA\xA7\xDB\xE8\xDC\xED");
+ update_map("\xDD\xE9\xDE\xE7\xDF\xEA\xE0\x9E\xE1\x80\xE2\x81\xE3\x96\xE4\x84\xE5\x85");
+ update_map("\xE6\x94\xE7\x83\xE8\x95\xE9\x88\xEA\x89\xEB\x8A\xEC\x8B\xED\x8C\xEE\x8D");
+ update_map("\xEF\x8E\xF0\x8F\xF1\x9F\xF2\x90\xF3\x91\xF4\x92\xF5\x93\xF6\x86\xF7\x82");
+ update_map("\xF8\x9C\xF9\x9B\xFA\x87\xFB\x98\xFC\x9D\xFD\x99\xFE\x97\xFF\x9A");
+ } else {
+ /* MSDOS Code Page 1125 -> KOI8-U */
+ update_map("\x80\xC4\x81\xB3\x82\xDA\x83\xBF\x84\xC0\x85\xD9\x86\xC3\x87\xB4\x88\xC2\x89\xC1");
+ update_map("\x8A\xC5\x8B\xDF\x8C\xDC\x8D\xDB\x8E\xDD\x8F\xDE\x90\xB0\x91\xB1\x92\xB2\x94\xFE");
+ update_map("\x96\xFB\x9A\xFF\x9E\xFA\xA0\xCD\xA1\xBA\xA2\xD5\xA3\xF1\xA4\xF5\xA5\xC9\xA6\xF7");
+ update_map("\xA7\xF9\xA8\xBB\xA9\xD4\xAA\xD3\xAB\xC8\xAC\xBE\xAD\xF3\xAE\xBC\xAF\xC6\xB0\xC7");
+ update_map("\xB1\xCC\xB2\xB5\xB3\xF0\xB4\xF4\xB5\xB9\xB6\xF6\xB7\xF8\xB8\xCB\xB9\xCF\xBA\xD0");
+ update_map("\xBB\xCA\xBC\xD8\xBD\xF2\xBE\xCE\xC0\xEE\xC1\xA0\xC2\xA1\xC3\xE6\xC4\xA4\xC5\xA5");
+ update_map("\xC6\xE4\xC7\xA3\xC8\xE5\xC9\xA8\xCA\xA9\xCB\xAA\xCC\xAB\xCD\xAC\xCE\xAD\xCF\xAE");
+ update_map("\xD0\xAF\xD1\xEF\xD2\xE0\xD3\xE1\xD4\xE2\xD5\xE3\xD6\xA6\xD7\xA2\xD8\xEC\xD9\xEB");
+ update_map("\xDA\xA7\xDB\xE8\xDC\xED\xDD\xE9\xDE\xE7\xDF\xEA\xE0\x9E\xE1\x80\xE2\x81\xE3\x96");
+ update_map("\xE4\x84\xE5\x85\xE6\x94\xE7\x83\xE8\x95\xE9\x88\xEA\x89\xEB\x8A\xEC\x8B\xED\x8C");
+ update_map("\xEE\x8D\xEF\x8E\xF0\x8F\xF1\x9F\xF2\x90\xF3\x91\xF4\x92\xF5\x93\xF6\x86\xF7\x82");
+ update_map("\xF8\x9C\xF9\x9B\xFA\x87\xFB\x98\xFC\x9D\xFD\x99\xFE\x97\xFF\x9A");
+ }
+}
+
/* Init for ROMAN-8 (HP-UX) */
static void init_roman8(void) {
@@ -317,47 +391,61 @@ update_map("\370\253\371\246\372\247\373\256\374\376\375\257\376\361");
/*
* Convert unix to dos
*/
-char *unix2dos_format(char *str,BOOL overwrite)
+
+char *unix2dos_format_static(const char *str)
+{
+ const char *p;
+ char *dp;
+
+ if (!mapsinited)
+ initmaps();
+
+ for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++)
+ *dp = unix2dos[(unsigned char)*p];
+ *dp = 0;
+ return cvtbuf;
+}
+
+char *unix2dos_format(char *str)
{
- char *p;
- char *dp;
-
- if (!mapsinited)
- initmaps();
-
- if (overwrite) {
- for (p = str; *p; p++)
- *p = unix2dos[(unsigned char)*p];
- return str;
- } else {
- for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++)
- *dp = unix2dos[(unsigned char)*p];
- *dp = 0;
- return cvtbuf;
- }
+ char *p;
+
+ if (!mapsinited)
+ initmaps();
+
+ for (p = str; *p; p++)
+ *p = unix2dos[(unsigned char)*p];
+ return str;
}
/*
* Convert dos to unix
*/
-char *dos2unix_format(char *str, BOOL overwrite)
+
+char *dos2unix_format_static(const char *str)
+{
+ const char *p;
+ char *dp;
+
+ if (!mapsinited)
+ initmaps();
+
+ for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++)
+ *dp = dos2unix[(unsigned char)*p];
+ *dp = 0;
+ return cvtbuf;
+}
+
+char *dos2unix_format(char *str)
{
- char *p;
- char *dp;
-
- if (!mapsinited)
- initmaps();
-
- if (overwrite) {
- for (p = str; *p; p++)
- *p = dos2unix[(unsigned char)*p];
- return str;
- } else {
- for (p = str, dp = cvtbuf;*p && (dp - cvtbuf < sizeof(cvtbuf) - 1); p++,dp++)
- *dp = dos2unix[(unsigned char)*p];
- *dp = 0;
- return cvtbuf;
- }
+ char *p;
+
+ if (!mapsinited)
+ initmaps();
+
+ for (p = str; *p; p++)
+ *p = dos2unix[(unsigned char)*p];
+ return str;
}
@@ -371,7 +459,9 @@ void interpret_character_set(char *str, int codepage)
} else if (strequal (str, "iso8859-2")) {
init_iso8859_2();
} else if (strequal (str, "iso8859-5")) {
- init_iso8859_5();
+ init_iso8859_5(codepage);
+ } else if (strequal (str, "iso8859-8")) {
+ init_iso8859_8();
} else if (strequal (str, "iso8859-7")) {
init_iso8859_7();
} else if (strequal (str, "iso8859-9")) {
@@ -382,8 +472,12 @@ void interpret_character_set(char *str, int codepage)
init_iso8859_15(codepage);
} else if (strequal (str, "koi8-r")) {
init_koi8_r();
+ } else if (strequal (str, "koi8-u")) {
+ init_koi8_u(codepage);
+ } else if (strequal (str, "1251u")) {
+ init_1251(1125);
} else if (strequal (str, "1251")) {
- init_1251();
+ init_1251(866);
} else if (strequal (str, "roman8")) {
init_roman8();
} else {
diff --git a/source/lib/debug.c b/source/lib/debug.c
index d3ba8f9c370..3731b3656fa 100644
--- a/source/lib/debug.c
+++ b/source/lib/debug.c
@@ -86,7 +86,7 @@ BOOL append_log = False;
int DEBUGLEVEL_CLASS[DBGC_LAST];
int DEBUGLEVEL = DEBUGLEVEL_CLASS;
BOOL AllowDebugChange = True;
-
+int parsed_debuglevel_class[DBGC_LAST];
/* -------------------------------------------------------------------------- **
* Internal variables.
@@ -214,8 +214,6 @@ BOOL debug_parse_levels(char *params_str)
char *params[DBGC_LAST];
int debuglevel_class[DBGC_LAST];
- if (AllowDebugChange == False)
- return True;
ZERO_ARRAY(params);
ZERO_ARRAY(debuglevel_class);
@@ -228,8 +226,19 @@ BOOL debug_parse_levels(char *params_str)
else
return False;
+ if (AllowDebugChange == False) {
+ int old_debuglevel_class[DBGC_LAST];
+
+ /* save current debug level */
+ memcpy(old_debuglevel_class, DEBUGLEVEL_CLASS, sizeof(DEBUGLEVEL_CLASS));
+ if (debug_parse_params(params, debuglevel_class))
+ debug_message(0, getpid(), (void*)debuglevel_class, sizeof(debuglevel_class));
+ memcpy(parsed_debuglevel_class, DEBUGLEVEL_CLASS, sizeof(DEBUGLEVEL_CLASS));
+ memcpy(DEBUGLEVEL_CLASS, old_debuglevel_class, sizeof(old_debuglevel_class));
+ return True;
+ }
if (debug_parse_params(params, debuglevel_class)) {
- debug_message(0, getpid(), (void*)debuglevel_class, sizeof(debuglevel_class));
+ debug_message(DEBUGLEVEL, getpid(), (void*)debuglevel_class, sizeof(debuglevel_class));
return True;
} else
return False;
@@ -238,14 +247,14 @@ BOOL debug_parse_levels(char *params_str)
/****************************************************************************
receive a "set debug level" message
****************************************************************************/
-void debug_message(int msg_type, pid_t src, void *buf, size_t len)
+void debug_message(int msg_level, pid_t src, void *buf, size_t len)
{
int i;
/* Set the new DEBUGLEVEL_CLASS array from the pased array */
memcpy(DEBUGLEVEL_CLASS, buf, sizeof(DEBUGLEVEL_CLASS));
- DEBUG(1,("INFO: Debug class %s level = %d (pid %u from pid %u)\n",
+ DEBUG(msg_level,("INFO: Debug class %s level = %d (pid %u from pid %u)\n",
classname_table[DBGC_ALL],
DEBUGLEVEL_CLASS[DBGC_ALL], (unsigned int)getpid(), (unsigned int)src));
diff --git a/source/lib/interface.c b/source/lib/interface.c
index 3a269294ed9..2e67b4a4a67 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -24,7 +24,6 @@
static struct iface_struct *probed_ifaces;
static int total_probed;
-struct in_addr ipzero;
struct in_addr allones_ip;
struct in_addr loopback_ip;
@@ -40,7 +39,8 @@ Try and find an interface that matches an ip. If we cannot, return NULL
static struct interface *iface_find(struct in_addr ip, BOOL CheckMask)
{
struct interface *i;
- if (zero_ip(ip)) return local_interfaces;
+ if (is_zero_ip(ip))
+ return local_interfaces;
for (i=local_interfaces;i;i=i->next)
if (CheckMask) {
@@ -102,8 +102,8 @@ static void interpret_interface(char *token)
char *p;
int i, added=0;
- ip = ipzero;
- nmask = ipzero;
+ zero_ip(&ip);
+ zero_ip(&nmask);
/* first check if it is an interface name */
for (i=0;i<total_probed;i++) {
@@ -171,7 +171,6 @@ void load_interfaces(void)
ptr = lp_interfaces();
- ipzero = *interpret_addr2("0.0.0.0");
allones_ip = *interpret_addr2("255.255.255.255");
loopback_ip = *interpret_addr2("127.0.0.1");
diff --git a/source/lib/kanji.c b/source/lib/kanji.c
index 39e9933842a..8a7494e6d77 100644
--- a/source/lib/kanji.c
+++ b/source/lib/kanji.c
@@ -59,8 +59,10 @@ char *(*multibyte_strtok)(char *, const char *) = (char *(*)(char *, const char
static size_t skip_non_multibyte_char(char);
static BOOL not_multibyte_char_1(char);
-char *(*_dos_to_unix)(char *, BOOL) = dos2unix_format;
-char *(*_unix_to_dos)(char *, BOOL) = unix2dos_format;
+char *(*_dos_to_unix)(char *) = dos2unix_format;
+char *(*_dos_to_unix_static)(const char *) = dos2unix_format_static;
+char *(*_unix_to_dos)(char *) = unix2dos_format;
+char *(*_unix_to_dos_static)(const char *) = unix2dos_format_static;
size_t (*_skip_multibyte_char)(char) = skip_non_multibyte_char;
BOOL (*is_multibyte_char_1)(char) = not_multibyte_char_1;
@@ -71,12 +73,15 @@ BOOL (*is_multibyte_char_1)(char) = not_multibyte_char_1;
* sj_to_sj in this file.
*/
-static char *sj_to_sj(char *from, BOOL overwrite);
+static char *sj_to_sj(char *from);
+static char *sj_to_sj_static(const char *from);
static size_t skip_kanji_multibyte_char(char);
static BOOL is_kanji_multibyte_char_1(char);
-char *(*_dos_to_unix)(char *, BOOL) = sj_to_sj;
-char *(*_unix_to_dos)(char *, BOOL) = sj_to_sj;
+char *(*_dos_to_unix)(char *) = sj_to_sj;
+char *(*_dos_to_unix_static)(const char *) = sj_to_sj_static;
+char *(*_unix_to_dos)(char *) = sj_to_sj;
+char *(*_unix_to_dos_static)(const char *) = sj_to_sj_static;
size_t (*_skip_multibyte_char)(char) = skip_kanji_multibyte_char;
int (*is_multibyte_char_1)(char) = is_kanji_multibyte_char_1;
@@ -458,12 +463,10 @@ static int sjis2euc (int hi, int lo)
return converted buffer
********************************************************************/
-static char *sj_to_euc(char *from, BOOL overwrite)
+static char *sj_to_euc_static(const char *from)
{
char *out;
- char *save;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) {
if (is_shift_jis (*from)) {
int code = sjis2euc ((int) from[0] & 0xff, (int) from[1] & 0xff);
@@ -478,12 +481,13 @@ static char *sj_to_euc(char *from, BOOL overwrite)
}
}
*out = 0;
- if (overwrite) {
- pstrcpy((char *) save, (char *) cvtbuf);
- return (char *) save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_euc(char *from)
+{
+ pstrcpy(from, sj_to_euc_static(from));
+ return from;
}
/*******************************************************************
@@ -491,12 +495,10 @@ static char *sj_to_euc(char *from, BOOL overwrite)
return converted buffer
********************************************************************/
-static char *euc_to_sj(char *from, BOOL overwrite)
+static char *euc_to_sj_static(const char *from)
{
char *out;
- char *save;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3); ) {
if (is_euc (*from)) {
int code = euc2sjis ((int) from[0] & 0xff, (int) from[1] & 0xff);
@@ -511,13 +513,13 @@ static char *euc_to_sj(char *from, BOOL overwrite)
}
}
*out = 0;
+ return cvtbuf;
+}
- if (overwrite) {
- pstrcpy(save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+static char *euc_to_sj(char *from)
+{
+ pstrcpy(from, euc_to_sj_static(from));
+ return from;
}
/*******************************************************************
@@ -700,13 +702,11 @@ static int euc3sjis (int hi, int lo, BOOL is_3byte)
return converted buffer
********************************************************************/
-static char *sj_to_euc3(char *from, BOOL overwrite)
+static char *sj_to_euc3_static(const char *from)
{
char *out;
- char *save;
int len;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4);) {
if (is_shift_jis (*from)) {
int code = sjis3euc ((int) from[0] & 0xff, (int) from[1] & 0xff, &len);
@@ -724,24 +724,24 @@ static char *sj_to_euc3(char *from, BOOL overwrite)
}
}
*out = 0;
- if (overwrite) {
- pstrcpy((char *) save, (char *) cvtbuf);
- return (char *) save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_euc3(char *from)
+{
+ pstrcpy(from, sj_to_euc3_static(from));
+ return from;
}
/*******************************************************************
Convert FROM contain EUC codes (with Sup-Kanji) to SHIFT JIS codes
return converted buffer
********************************************************************/
-static char *euc3_to_sj(char *from, BOOL overwrite)
+
+static char *euc3_to_sj_static(const char *from)
{
char *out;
- char *save;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3); ) {
if (is_euc_sup (*from)) {
int code = euc3sjis((int) from[1] & 0xff, (int) from[2] & 0xff, True);
@@ -761,13 +761,13 @@ static char *euc3_to_sj(char *from, BOOL overwrite)
}
}
*out = 0;
+ return cvtbuf;
+}
- if (overwrite) {
- pstrcpy(save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+static char *euc3_to_sj(char *from)
+{
+ pstrcpy(from, euc3_to_sj_static(from));
+ return from;
}
/*******************************************************************
@@ -846,14 +846,12 @@ static int jis2sjis(int hi, int lo)
return converted buffer
********************************************************************/
-static char *jis8_to_sj(char *from, BOOL overwrite)
+static char *jis8_to_sj_static(const char *from)
{
char *out;
int shifted;
- char *save;
shifted = _KJ_ROMAN;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) {
if (is_esc (*from)) {
if (is_so1 (from[1]) && is_so2 (from[2])) {
@@ -887,12 +885,13 @@ normal:
}
*out = 0;
- if (overwrite) {
- pstrcpy (save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *jis8_to_sj(char *from)
+{
+ pstrcpy(from, jis8_to_sj_static(from));
+ return from;
}
/*******************************************************************
@@ -900,14 +899,12 @@ normal:
return converted buffer
********************************************************************/
-static char *sj_to_jis8(char *from, BOOL overwrite)
+static char *sj_to_jis8_static(const char *from)
{
char *out;
int shifted;
- char *save;
shifted = _KJ_ROMAN;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4); ) {
if (is_shift_jis (*from)) {
int code;
@@ -945,26 +942,26 @@ static char *sj_to_jis8(char *from, BOOL overwrite)
break;
}
*out = 0;
- if (overwrite) {
- pstrcpy (save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_jis8(char *from)
+{
+ pstrcpy(from, sj_to_jis8_static(from));
+ return from;
}
/*******************************************************************
Convert FROM contain 7 bits JIS codes to SHIFT JIS codes
return converted buffer
********************************************************************/
-static char *jis7_to_sj(char *from, BOOL overwrite)
+
+static char *jis7_to_sj_static(const char *from)
{
char *out;
int shifted;
- char *save;
shifted = _KJ_ROMAN;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) {
if (is_esc (*from)) {
if (is_so1 (from[1]) && is_so2 (from[2])) {
@@ -1004,26 +1001,26 @@ static char *jis7_to_sj(char *from, BOOL overwrite)
}
}
*out = 0;
- if (overwrite) {
- pstrcpy (save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
}
+static char *jis7_to_sj(char *from)
+{
+ pstrcpy(from, jis7_to_sj_static(from));
+ return from;
+}
+
/*******************************************************************
Convert FROM contain SHIFT JIS codes to 7 bits JIS codes
return converted buffer
********************************************************************/
-static char *sj_to_jis7(char *from, BOOL overwrite)
+
+static char *sj_to_jis7_static(const char *from)
{
char *out;
int shifted;
- char *save;
shifted = _KJ_ROMAN;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4); ) {
if (is_shift_jis (*from)) {
int code;
@@ -1080,12 +1077,13 @@ static char *sj_to_jis7(char *from, BOOL overwrite)
break;
}
*out = 0;
- if (overwrite) {
- pstrcpy (save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_jis7(char *from)
+{
+ pstrcpy(from, sj_to_jis7_static(from));
+ return from;
}
/*******************************************************************
@@ -1093,14 +1091,12 @@ static char *sj_to_jis7(char *from, BOOL overwrite)
return converted buffer
********************************************************************/
-static char *junet_to_sj(char *from, BOOL overwrite)
+static char *junet_to_sj_static(const char *from)
{
char *out;
int shifted;
- char *save;
shifted = _KJ_ROMAN;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-3);) {
if (is_esc (*from)) {
if (is_so1 (from[1]) && is_so2 (from[2])) {
@@ -1137,26 +1133,26 @@ static char *junet_to_sj(char *from, BOOL overwrite)
}
}
*out = 0;
- if (overwrite) {
- pstrcpy (save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *junet_to_sj(char *from)
+{
+ pstrcpy(from, junet_to_sj_static(from));
+ return from;
}
/*******************************************************************
Convert FROM contain SHIFT JIS codes to 7 bits JIS(junet) codes
return converted buffer
********************************************************************/
-static char *sj_to_junet(char *from, BOOL overwrite)
+
+static char *sj_to_junet_static(const char *from)
{
char *out;
int shifted;
- char *save;
shifted = _KJ_ROMAN;
- save = (char *) from;
for (out = cvtbuf; *from && (out - cvtbuf < sizeof(cvtbuf)-4); ) {
if (is_shift_jis (*from)) {
int code;
@@ -1206,23 +1202,26 @@ static char *sj_to_junet(char *from, BOOL overwrite)
break;
}
*out = 0;
- if (overwrite) {
- pstrcpy (save, (char *) cvtbuf);
- return save;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_junet(char *from)
+{
+ pstrcpy(from, sj_to_junet_static(from));
+ return from;
}
/*******************************************************************
HEX <-> SJIS
********************************************************************/
/* ":xx" -> a byte */
-static char *hex_to_sj(char *from, BOOL overwrite)
+
+static char *hex_to_sj_static(const char *from)
{
- char *sp, *dp;
+ const char *sp;
+ char *dp;
- sp = (char *) from;
+ sp = from;
dp = cvtbuf;
while (*sp && (dp - cvtbuf < sizeof(cvtbuf)-3)) {
if (*sp == hex_tag && isxdigit((int)sp[1]) && isxdigit((int)sp[2])) {
@@ -1232,22 +1231,25 @@ static char *hex_to_sj(char *from, BOOL overwrite)
*dp++ = *sp++;
}
*dp = '\0';
- if (overwrite) {
- pstrcpy ((char *) from, (char *) cvtbuf);
- return (char *) from;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
}
+static char *hex_to_sj(char *from)
+{
+ pstrcpy(from, hex_to_sj_static(from));
+ return from;
+}
+
/*******************************************************************
kanji/kana -> ":xx"
********************************************************************/
-static char *sj_to_hex(char *from, BOOL overwrite)
+
+static char *sj_to_hex_static(const char *from)
{
- unsigned char *sp, *dp;
+ const unsigned char *sp;
+ unsigned char *dp;
- sp = (unsigned char*) from;
+ sp = from;
dp = (unsigned char*) cvtbuf;
while (*sp && (((char *)dp)- cvtbuf < sizeof(cvtbuf)-7)) {
if (is_kana(*sp)) {
@@ -1268,23 +1270,25 @@ static char *sj_to_hex(char *from, BOOL overwrite)
*dp++ = *sp++;
}
*dp = '\0';
- if (overwrite) {
- pstrcpy ((char *) from, (char *) cvtbuf);
- return (char *) from;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_hex(char *from)
+{
+ pstrcpy(from, sj_to_hex_static(from));
+ return from;
}
/*******************************************************************
CAP <-> SJIS
********************************************************************/
/* ":xx" CAP -> a byte */
-static char *cap_to_sj(char *from, BOOL overwrite)
+static char *cap_to_sj_static(const char *from)
{
- char *sp, *dp;
+ const char *sp;
+ char *dp;
- sp = (char *) from;
+ sp = (const char *) from;
dp = cvtbuf;
while (*sp && (dp- cvtbuf < sizeof(cvtbuf)-2)) {
/*
@@ -1300,22 +1304,24 @@ static char *cap_to_sj(char *from, BOOL overwrite)
*dp++ = *sp++;
}
*dp = '\0';
- if (overwrite) {
- pstrcpy ((char *) from, (char *) cvtbuf);
- return (char *) from;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *cap_to_sj(char *from)
+{
+ pstrcpy(from, cap_to_sj_static(from));
+ return from;
}
/*******************************************************************
kanji/kana -> ":xx" - CAP format.
********************************************************************/
-static char *sj_to_cap(char *from, BOOL overwrite)
+static char *sj_to_cap_static(const char *from)
{
- unsigned char *sp, *dp;
+ const unsigned char *sp;
+ unsigned char *dp;
- sp = (unsigned char*) from;
+ sp = from;
dp = (unsigned char*) cvtbuf;
while (*sp && (((char *)dp) - cvtbuf < sizeof(cvtbuf)-4)) {
if (*sp >= 0x80) {
@@ -1328,39 +1334,42 @@ static char *sj_to_cap(char *from, BOOL overwrite)
}
}
*dp = '\0';
- if (overwrite) {
- pstrcpy ((char *) from, (char *) cvtbuf);
- return (char *) from;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *sj_to_cap(char *from)
+{
+ pstrcpy(from, sj_to_cap_static(from));
+ return from;
}
/*******************************************************************
sj to sj
********************************************************************/
-static char *sj_to_sj(char *from, BOOL overwrite)
+
+static char *sj_to_sj_static(const char *from)
{
- if (!overwrite) {
- pstrcpy (cvtbuf, (char *) from);
+ pstrcpy (cvtbuf, from);
return cvtbuf;
- } else {
- return (char *) from;
- }
+}
+
+static char *sj_to_sj(char *from)
+{
+ return from;
}
/*******************************************************************
cp to utf8
********************************************************************/
-static char *cp_to_utf8(char *from, BOOL overwrite)
+static char *cp_to_utf8_static(const char *from)
{
unsigned char *dst;
- unsigned char *src;
+ const unsigned char *src;
smb_ucs2_t val;
int w;
size_t len;
- src = (unsigned char *)from;
+ src = (const unsigned char *)from;
dst = (unsigned char *)cvtbuf;
while (*src && (((char *)dst - cvtbuf) < sizeof(cvtbuf)-4)) {
len = _skip_multibyte_char(*src);
@@ -1385,25 +1394,26 @@ static char *cp_to_utf8(char *from, BOOL overwrite)
}
*dst++='\0';
- if (overwrite) {
- pstrcpy ((char *) from, (char *) cvtbuf);
- return (char *) from;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *cp_to_utf8(char *from)
+{
+ pstrcpy(from, cp_to_utf8_static(from));
+ return from;
}
/*******************************************************************
utf8 to cp
********************************************************************/
-static char *utf8_to_cp(char *from, BOOL overwrite)
+static char *utf8_to_cp_static(const char *from)
{
- unsigned char *src;
+ const unsigned char *src;
unsigned char *dst;
smb_ucs2_t val;
int w;
- src = (unsigned char *)from;
+ src = (const unsigned char *)from;
dst = (unsigned char *)cvtbuf;
while (*src && ((char *)dst - cvtbuf < sizeof(cvtbuf)-4)) {
@@ -1425,12 +1435,13 @@ static char *utf8_to_cp(char *from, BOOL overwrite)
}
}
*dst++='\0';
- if (overwrite) {
- pstrcpy ((char *) from, (char *) cvtbuf);
- return (char *) from;
- } else {
- return cvtbuf;
- }
+ return cvtbuf;
+}
+
+static char *utf8_to_cp(char *from)
+{
+ pstrcpy(from, utf8_to_cp_static(from));
+ return from;
}
/************************************************************************
@@ -1443,50 +1454,72 @@ static void setup_string_function(int codes)
switch (codes) {
default:
_dos_to_unix = dos2unix_format;
+ _dos_to_unix_static = dos2unix_format_static;
_unix_to_dos = unix2dos_format;
+ _unix_to_dos_static = unix2dos_format_static;
break;
case SJIS_CODE:
_dos_to_unix = sj_to_sj;
+ _dos_to_unix_static = sj_to_sj_static;
_unix_to_dos = sj_to_sj;
+ _unix_to_dos_static = sj_to_sj_static;
break;
case EUC_CODE:
_dos_to_unix = sj_to_euc;
+ _dos_to_unix_static = sj_to_euc_static;
_unix_to_dos = euc_to_sj;
+ _unix_to_dos_static = euc_to_sj_static;
break;
case JIS7_CODE:
_dos_to_unix = sj_to_jis7;
+ _dos_to_unix_static = sj_to_jis7_static;
_unix_to_dos = jis7_to_sj;
+ _unix_to_dos_static = jis7_to_sj_static;
break;
case JIS8_CODE:
_dos_to_unix = sj_to_jis8;
+ _dos_to_unix_static = sj_to_jis8_static;
_unix_to_dos = jis8_to_sj;
+ _unix_to_dos_static = jis8_to_sj_static;
break;
case JUNET_CODE:
_dos_to_unix = sj_to_junet;
+ _dos_to_unix_static = sj_to_junet_static;
_unix_to_dos = junet_to_sj;
+ _unix_to_dos_static = junet_to_sj_static;
break;
case HEX_CODE:
_dos_to_unix = sj_to_hex;
+ _dos_to_unix_static = sj_to_hex_static;
_unix_to_dos = hex_to_sj;
+ _unix_to_dos_static = hex_to_sj_static;
break;
case CAP_CODE:
_dos_to_unix = sj_to_cap;
+ _dos_to_unix_static = sj_to_cap_static;
_unix_to_dos = cap_to_sj;
+ _unix_to_dos_static = cap_to_sj_static;
break;
+
case UTF8_CODE:
_dos_to_unix = cp_to_utf8;
+ _dos_to_unix_static = cp_to_utf8_static;
_unix_to_dos = utf8_to_cp;
+ _unix_to_dos_static = utf8_to_cp_static;
break;
+
case EUC3_CODE:
_dos_to_unix = sj_to_euc3;
+ _dos_to_unix_static = sj_to_euc3_static;
_unix_to_dos = euc3_to_sj;
+ _unix_to_dos_static = euc3_to_sj_static;
break;
}
}
@@ -1680,12 +1713,10 @@ void initialize_multibyte_vectors( int client_codepage)
(to catalog file encoding) is not needed because
they are using same character codes.
**************************************************** */
-static char *no_conversion(char *str, BOOL bOverwrite)
+static char *no_conversion_static(const char *str)
{
static pstring temp;
- if(bOverwrite)
- return str;
pstrcpy(temp, str);
return temp;
}
-char *(*_dos_to_dos)(char *, BOOL) = no_conversion;
+char *(*_dos_to_dos_static)(const char *) = no_conversion_static;
diff --git a/source/lib/messages.c b/source/lib/messages.c
index b4fd82139ea..518b7d51c1e 100644
--- a/source/lib/messages.c
+++ b/source/lib/messages.c
@@ -1,8 +1,8 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Samba internal messaging functions
Copyright (C) Andrew Tridgell 2000
+ Copyright (C) 2001 by Martin Pool
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
@@ -19,13 +19,22 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* this module is used for internal messaging between Samba daemons.
+/**
+ @defgroups messages Internal messaging framework
+ @{
+ @file messages.c
+
+ This module is used for internal messaging between Samba daemons.
The idea is that if a part of Samba wants to do communication with
another Samba process then it will do a message_register() of a
dispatch function, and use message_send_pid() to send messages to
that process.
+ The dispatch function is given the pid of the sender, and it can
+ use that to reply by message_send_pid(). See ping_message() for a
+ simple example.
+
This system doesn't have any inherent size limitations but is not
very efficient for large messages or when messages are sent in very
quick succession.
@@ -151,7 +160,8 @@ static BOOL message_notify(pid_t pid)
Send a message to a particular pid.
****************************************************************************/
-BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL duplicates_allowed)
+BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len,
+ BOOL duplicates_allowed)
{
TDB_DATA kbuf;
TDB_DATA dbuf;
@@ -198,7 +208,7 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL dupli
*/
if (!memcmp(ptr, &rec, sizeof(rec))) {
- if (!len || (len && !memcmp( ptr + sizeof(rec), (char *)buf, len))) {
+ if (!len || (len && !memcmp( ptr + sizeof(rec), buf, len))) {
DEBUG(10,("message_send_pid: discarding duplicate message.\n"));
SAFE_FREE(dbuf.dptr);
tdb_chainunlock(tdb, kbuf);
@@ -303,6 +313,7 @@ void message_dispatch(void)
void *buf;
size_t len;
struct dispatch_fns *dfn;
+ int n_handled;
if (!received_signal) return;
@@ -311,12 +322,21 @@ void message_dispatch(void)
received_signal = 0;
while (message_recv(&msg_type, &src, &buf, &len)) {
+ DEBUG(10,("message_dispatch: received msg_type=%d src_pid=%d\n",
+ msg_type, (int) src));
+ n_handled = 0;
for (dfn = dispatch_fns; dfn; dfn = dfn->next) {
if (dfn->msg_type == msg_type) {
DEBUG(10,("message_dispatch: processing message of type %d.\n", msg_type));
dfn->fn(msg_type, src, buf, len);
+ n_handled++;
}
}
+ if (!n_handled) {
+ DEBUG(5,("message_dispatch: warning: no handlers registed for "
+ "msg_type %d in pid%d\n",
+ msg_type, getpid()));
+ }
SAFE_FREE(buf);
}
}
@@ -366,9 +386,10 @@ void message_deregister(int msg_type)
struct msg_all {
int msg_type;
- void *buf;
+ const void *buf;
size_t len;
BOOL duplicates;
+ int n_sent;
};
/****************************************************************************
@@ -390,8 +411,9 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void
/* if the msg send fails because the pid was not found (i.e. smbd died),
* the msg has already been deleted from the messages.tdb.*/
- if (!message_send_pid(crec.pid, msg_all->msg_type, msg_all->buf, msg_all->len,
- msg_all->duplicates)) {
+ if (!message_send_pid(crec.pid, msg_all->msg_type,
+ msg_all->buf, msg_all->len,
+ msg_all->duplicates)) {
/* if the pid was not found delete the entry from connections.tdb */
if (errno == ESRCH) {
@@ -400,16 +422,26 @@ static int traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void
tdb_delete(the_tdb, kbuf);
}
}
+ msg_all->n_sent++;
return 0;
}
-/****************************************************************************
- This is a useful function for sending messages to all smbd processes.
- It isn't very efficient, but should be OK for the sorts of applications that
- use it. When we need efficient broadcast we can add it.
-****************************************************************************/
-
-BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len, BOOL duplicates_allowed)
+/**
+ * Send a message to all smbd processes.
+ *
+ * It isn't very efficient, but should be OK for the sorts of
+ * applications that use it. When we need efficient broadcast we can add
+ * it.
+ *
+ * @param n_sent Set to the number of messages sent. This should be
+ * equal to the number of processes, but be careful for races.
+ *
+ * @return True for success.
+ **/
+BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type,
+ const void *buf, size_t len,
+ BOOL duplicates_allowed,
+ int *n_sent)
{
struct msg_all msg_all;
@@ -417,7 +449,73 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, void *buf, size_t len
msg_all.buf = buf;
msg_all.len = len;
msg_all.duplicates = duplicates_allowed;
+ msg_all.n_sent = 0;
tdb_traverse(conn_tdb, traverse_fn, &msg_all);
+ if (n_sent)
+ *n_sent = msg_all.n_sent;
return True;
}
+
+/** @} **/
+
+static VOLATILE sig_atomic_t gotalarm;
+
+/***************************************************************
+ Signal function to tell us we timed out.
+****************************************************************/
+
+static void gotalarm_sig(void)
+{
+ gotalarm = 1;
+}
+
+/*
+ lock the messaging tdb based on a string - this is used as a primitive form of mutex
+ between smbd instances.
+*/
+BOOL message_named_mutex(char *name, unsigned int timeout)
+{
+ TDB_DATA key;
+ int ret;
+
+ if (!message_init())
+ return False;
+
+ key.dptr = name;
+ key.dsize = strlen(name)+1;
+
+ if (timeout) {
+ gotalarm = 0;
+ CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
+ alarm(timeout);
+ }
+
+ ret = tdb_chainlock(tdb, key);
+
+ if (timeout) {
+ alarm(0);
+ CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
+ if (gotalarm)
+ return False;
+ }
+
+ if (ret == 0)
+ DEBUG(10,("message_named_mutex: got mutex for %s\n", name ));
+
+ return (ret == 0);
+}
+
+/*
+ unlock a named mutex
+*/
+void message_named_mutex_release(char *name)
+{
+ TDB_DATA key;
+
+ key.dptr = name;
+ key.dsize = strlen(name)+1;
+
+ tdb_chainunlock(tdb, key);
+ DEBUG(10,("message_named_mutex: released mutex for %s\n", name ));
+}
diff --git a/source/lib/pidfile.c b/source/lib/pidfile.c
index 25ca1944111..a856541ca89 100644
--- a/source/lib/pidfile.c
+++ b/source/lib/pidfile.c
@@ -37,7 +37,7 @@ pid_t pidfile_pid(char *name)
unsigned ret;
pstring pidFile;
- slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name);
+ slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
if (fd == -1) {
@@ -70,7 +70,7 @@ pid_t pidfile_pid(char *name)
return 0;
}
-/* create a pid file in the lock directory. open it and leave it locked */
+/* create a pid file in the pid directory. open it and leave it locked */
void pidfile_create(char *name)
{
int fd;
@@ -78,7 +78,7 @@ void pidfile_create(char *name)
pstring pidFile;
pid_t pid;
- slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name);
+ slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
pid = pidfile_pid(name);
if (pid != 0) {
diff --git a/source/lib/replace.c b/source/lib/replace.c
index 16d7450d69e..dd50ff035e0 100644
--- a/source/lib/replace.c
+++ b/source/lib/replace.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
replacement routines for broken systems
Copyright (C) Andrew Tridgell 1992-1998
@@ -24,7 +23,6 @@
void replace_dummy(void);
void replace_dummy(void) {}
-
#ifndef HAVE_FTRUNCATE
/*******************************************************************
ftruncate for operating systems that don't have it
@@ -42,6 +40,42 @@ ftruncate for operating systems that don't have it
#endif /* HAVE_FTRUNCATE */
+#ifndef HAVE_STRLCPY
+/* like strncpy but does not 0 fill the buffer and always null
+ terminates. bufsize is the size of the destination buffer */
+ size_t strlcpy(char *d, const char *s, size_t bufsize)
+{
+ size_t len = strlen(s);
+ size_t ret = len;
+ if (bufsize <= 0) return 0;
+ if (len >= bufsize) len = bufsize-1;
+ memcpy(d, s, len);
+ d[len] = 0;
+ return ret;
+}
+#endif
+
+#ifndef HAVE_STRLCAT
+/* like strncat but does not 0 fill the buffer and always null
+ terminates. bufsize is the length of the buffer, which should
+ be one more than the maximum resulting string length */
+ size_t strlcat(char *d, const char *s, size_t bufsize)
+{
+ size_t len1 = strlen(d);
+ size_t len2 = strlen(s);
+ size_t ret = len1 + len2;
+
+ if (len1+len2 >= bufsize) {
+ len2 = bufsize - (len1+1);
+ }
+ if (len2 > 0) {
+ memcpy(d+len1, s, len2);
+ d[len1+len2] = 0;
+ }
+ return ret;
+}
+#endif
+
#ifndef HAVE_MKTIME
/*******************************************************************
a mktime() replacement for those who don't have it - contributed by
@@ -125,7 +159,7 @@ Corrections by richard.kettlewell@kewill.com
/*
* Search for a match in a netgroup. This replaces it on broken systems.
*/
- int innetgr(char *group,char *host,char *user,char *dom)
+ int innetgr(const char *group,const char *host,const char *user,const char *dom)
{
char *hst, *usr, *dm;
diff --git a/source/lib/snprintf.c b/source/lib/snprintf.c
index 0b0bdb0b335..27336261086 100644
--- a/source/lib/snprintf.c
+++ b/source/lib/snprintf.c
@@ -57,6 +57,12 @@
#ifndef NO_CONFIG_H /* for some tests */
#include "config.h"
+#else
+#define NULL 0
+#endif
+
+#ifdef TEST_SNPRINTF /* need math library headers for testing */
+#include <math.h>
#endif
#ifdef HAVE_STRING_H
@@ -661,9 +667,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
/* Convert integer part */
do {
- temp = intpart;
- my_modf(intpart*0.1, &intpart);
- temp = temp*0.1;
+ temp = intpart*0.1;
+ my_modf(temp, &intpart);
index = (int) ((temp -intpart +0.05)* 10.0);
/* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */
/* printf ("%llf, %f, %x\n", temp, intpart, index); */
@@ -677,9 +682,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
if (fracpart)
{
do {
- temp = fracpart;
- my_modf(fracpart*0.1, &fracpart);
- temp = temp*0.1;
+ temp = fracpart*0.1;
+ my_modf(temp, &fracpart);
index = (int) ((temp -fracpart +0.05)* 10.0);
/* index = (int) ((((temp/10) -fracpart) +0.05) *10); */
/* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */
@@ -731,14 +735,14 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
if (max > 0) {
dopr_outch (buffer, currlen, maxlen, '.');
+ while (zpadlen > 0) {
+ dopr_outch (buffer, currlen, maxlen, '0');
+ --zpadlen;
+ }
+
while (fplace > 0)
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
}
-
- while (zpadlen > 0) {
- dopr_outch (buffer, currlen, maxlen, '0');
- --zpadlen;
- }
while (padlen < 0) {
dopr_outch (buffer, currlen, maxlen, ' ');
@@ -858,7 +862,7 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
NULL
};
double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
- 0.9996, 1.996, 4.136, 0};
+ 0.9996, 1.996, 4.136, 5.030201, 0};
char *int_fmt[] = {
"%-1.5d",
"%1.5d",
@@ -953,8 +957,10 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
{
double v0 = 0.12345678901234567890123456789012345678901;
for (x=0; x<100; x++) {
- snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x));
- sprintf(buf2, "%1.1f", v0*pow(10, x));
+ double p = pow(10, x);
+ double r = v0*p;
+ snprintf(buf1, sizeof(buf1), "%1.1f", r);
+ sprintf(buf2, "%1.1f", r);
if (strcmp(buf1, buf2)) {
printf("we seem to support %d digits\n", x-1);
break;
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 387b07bc512..c1ac1f504a3 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -168,6 +168,7 @@ static char *automount_server(char *user_name)
void standard_sub_basic(char *str)
{
+ extern pstring global_myname;
char *p, *s;
fstring pidstr;
struct passwd *pass;
@@ -197,7 +198,21 @@ void standard_sub_basic(char *str)
string_sub(p,"%D", tmp_str,l);
break;
case 'I' : string_sub(p,"%I", client_addr(),l); break;
- case 'L' : string_sub(p,"%L", local_machine,l); break;
+ case 'L' :
+ if (*local_machine)
+ string_sub(p,"%L", local_machine,l);
+ else {
+ char *ns = p;
+
+ string_sub(p,"%L", global_myname,l);
+ while (*ns)
+ {
+ if (isupper(*ns))
+ *ns = tolower(*ns);
+ ns++;
+ }
+ }
+ break;
case 'M' : string_sub(p,"%M", client_name(),l); break;
case 'R' : string_sub(p,"%R", remote_proto,l); break;
case 'T' : string_sub(p,"%T", timestring(False),l); break;
diff --git a/source/lib/sysacls.c b/source/lib/sysacls.c
index 743c098bebd..9ce04e596b9 100644
--- a/source/lib/sysacls.c
+++ b/source/lib/sysacls.c
@@ -1204,7 +1204,7 @@ SMB_ACL_T sys_acl_get_fd(int fd)
* can use the relative path.
*/
- return sys_acl_get_file(dos_to_unix(fsp->fsp_name,False), SMB_ACL_TYPE_ACCESS);
+ return sys_acl_get_file(dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS);
}
int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d)
@@ -1892,7 +1892,7 @@ int sys_acl_set_fd(int fd, SMB_ACL_T acl_d)
* can use the relative path.
*/
- return sys_acl_set_file(dos_to_unix(fsp->fsp_name,False), SMB_ACL_TYPE_ACCESS, acl_d);
+ return sys_acl_set_file(dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS, acl_d);
}
int sys_acl_delete_def_file(const char *path)
diff --git a/source/lib/system.c b/source/lib/system.c
index a4420f5c6c2..a449600b21f 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -74,6 +74,104 @@ int sys_usleep(long usecs)
}
/*******************************************************************
+A read wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_read(int fd, void *buf, size_t count)
+{
+ ssize_t ret;
+
+ do {
+ ret = read(fd, buf, count);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
+A write wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_write(int fd, const void *buf, size_t count)
+{
+ ssize_t ret;
+
+ do {
+ ret = write(fd, buf, count);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
+A send wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_send(int s, const void *msg, size_t len, int flags)
+{
+ ssize_t ret;
+
+ do {
+ ret = send(s, msg, len, flags);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
+A sendto wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
+{
+ ssize_t ret;
+
+ do {
+ ret = sendto(s, msg, len, flags, to, tolen);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
+A recvfrom wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
+{
+ ssize_t ret;
+
+ do {
+ ret = recvfrom(s, buf, len, flags, from, fromlen);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
+A fcntl wrapper that will deal with EINTR.
+********************************************************************/
+
+int sys_fcntl_ptr(int fd, int cmd, void *arg)
+{
+ int ret;
+
+ do {
+ ret = fcntl(fd, cmd, arg);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
+A fcntl wrapper that will deal with EINTR.
+********************************************************************/
+
+int sys_fcntl_long(int fd, int cmd, long arg)
+{
+ int ret;
+
+ do {
+ ret = fcntl(fd, cmd, arg);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
A stat() wrapper that will deal with 64 bit filesizes.
********************************************************************/
@@ -1172,7 +1270,7 @@ int sys_pclose(int fd)
void *sys_dlopen(const char *name, int flags)
{
-#ifdef HAVE_LIBDL
+#if defined(HAVE_DLOPEN)
return dlopen(name, flags);
#else
return NULL;
@@ -1181,7 +1279,7 @@ void *sys_dlopen(const char *name, int flags)
void *sys_dlsym(void *handle, char *symbol)
{
-#ifdef HAVE_LIBDL
+#if defined(HAVE_DLSYM)
return dlsym(handle, symbol);
#else
return NULL;
@@ -1190,7 +1288,7 @@ void *sys_dlsym(void *handle, char *symbol)
int sys_dlclose (void *handle)
{
-#ifdef HAVE_LIBDL
+#if defined(HAVE_DLCLOSE)
return dlclose(handle);
#else
return 0;
@@ -1199,9 +1297,37 @@ int sys_dlclose (void *handle)
const char *sys_dlerror(void)
{
-#ifdef HAVE_LIBDL
+#if defined(HAVE_DLERROR)
return dlerror();
#else
return NULL;
#endif
}
+
+/**************************************************************************
+ Wrapper for Admin Logs.
+****************************************************************************/
+
+void sys_adminlog(int priority, const char *format_str, ...)
+{
+ va_list ap;
+ int ret;
+ char **msgbuf = NULL;
+
+ if (!lp_admin_log())
+ return;
+
+ va_start( ap, format_str );
+ ret = vasprintf( msgbuf, format_str, ap );
+ va_end( ap );
+
+ if (ret == -1)
+ return;
+
+#if defined(HAVE_SYSLOG)
+ syslog( priority, "%s", *msgbuf );
+#else
+ DEBUG(0,("%s", *msgbuf ));
+#endif
+ SAFE_FREE(*msgbuf);
+}
diff --git a/source/lib/talloc.c b/source/lib/talloc.c
index fb5c3495fe4..6ac784a9297 100644
--- a/source/lib/talloc.c
+++ b/source/lib/talloc.c
@@ -1,8 +1,8 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Samba Unix SMB/CIFS implementation.
Samba temporary memory allocation functions
Copyright (C) Andrew Tridgell 2000
+ Copyright (C) 2001, 2002 by Martin Pool <mbp@samba.org>
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
@@ -19,7 +19,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* this is a very simple temporary memory allocator. To use it do the following:
+/**
+ @defgroup talloc Simple memory allocator
+ @{
+
+ This is a very simple temporary memory allocator. To use it do the following:
1) when you first want to allocate a pool of meomry use
talloc_init() and save the resulting context pointer somewhere
@@ -31,58 +35,158 @@
talloc does not zero the memory. It guarantees memory of a
TALLOC_ALIGN alignment
+
+ @sa talloc.h
*/
+/**
+ * @todo We could allocate both the talloc_chunk structure, and the
+ * memory it contains all in one allocation, which might be a bit
+ * faster and perhaps use less memory overhead.
+ *
+ * That smells like a premature optimization, though. -- mbp
+ **/
+
+/**
+ * If you want testing for memory corruption, link with dmalloc or use
+ * Insure++. It doesn't seem useful to duplicate them here.
+ **/
+
#include "includes.h"
-/* initialise talloc context. */
+struct talloc_chunk {
+ struct talloc_chunk *next;
+ size_t size;
+ void *ptr;
+};
+
+
+struct talloc_ctx {
+ struct talloc_chunk *list;
+ size_t total_alloc_size;
+
+ /** The name recorded for this pool, if any. Should describe
+ * the purpose for which it was allocated. The string is
+ * allocated within the pool. **/
+ char *name;
+
+ /** Pointer to the next allocate talloc pool, so that we can
+ * summarize all talloc memory usage. **/
+ struct talloc_ctx *next_ctx;
+};
+
+
+/**
+ * Start of linked list of all talloc pools.
+ *
+ * @todo We should turn the global list off when using Insure++,
+ * otherwise all the memory will be seen as still reachable.
+ **/
+TALLOC_CTX *list_head = NULL;
+
+
+/**
+ * Add to the global list
+ **/
+static void talloc_enroll(TALLOC_CTX *t)
+{
+ t->next_ctx = list_head;
+ list_head = t;
+}
+
+
+static void talloc_disenroll(TALLOC_CTX *t)
+{
+ TALLOC_CTX **ttmp;
+
+ /* Use a double-* so that no special case is required for the
+ * list head. */
+ for (ttmp = &list_head; *ttmp; ttmp = &((*ttmp)->next_ctx))
+ if (*ttmp == t) {
+ /* ttmp is the link that points to t, either
+ * list_head or the next_ctx link in its
+ * predecessor */
+ *ttmp = t->next_ctx;
+ t->next_ctx = NULL; /* clobber */
+ return;
+ }
+ abort(); /* oops, this talloc was already
+ * clobbered or something else went
+ * wrong. */
+}
+
+
+/** Create a new talloc context. **/
TALLOC_CTX *talloc_init(void)
{
TALLOC_CTX *t;
- t = (TALLOC_CTX *)malloc(sizeof(*t));
- if (!t) return NULL;
+ t = (TALLOC_CTX *)malloc(sizeof(TALLOC_CTX));
+ if (t) {
+ t->list = NULL;
+ t->total_alloc_size = 0;
+ t->name = NULL;
+ talloc_enroll(t);
+ }
- t->list = NULL;
- t->total_alloc_size = 0;
+ return t;
+}
+
+
+
+/**
+ * Create a new talloc context, with a name specifying its purpose.
+ * Please call this in preference to talloc_init().
+ **/
+ TALLOC_CTX *talloc_init_named(char const *fmt, ...)
+{
+ TALLOC_CTX *t;
+ va_list ap;
+ t = talloc_init();
+ if (t && fmt) {
+ va_start(ap, fmt);
+ t->name = talloc_vasprintf(t, fmt, ap);
+ va_end(ap);
+ }
+
return t;
}
-/* allocate a bit of memory from the specified pool */
+
+/** Allocate a bit of memory from the specified pool **/
void *talloc(TALLOC_CTX *t, size_t size)
{
void *p;
struct talloc_chunk *tc;
- if (size == 0) return NULL;
+ if (!t || size == 0) return NULL;
p = malloc(size);
- if (!p) return p;
-
- tc = malloc(sizeof(*tc));
- if (!tc) {
- SAFE_FREE(p);
- return NULL;
+ if (p) {
+ tc = malloc(sizeof(*tc));
+ if (tc) {
+ tc->ptr = p;
+ tc->size = size;
+ tc->next = t->list;
+ t->list = tc;
+ t->total_alloc_size += size;
+ }
+ else {
+ SAFE_FREE(p);
+ }
}
-
- tc->ptr = p;
- tc->size = size;
- tc->next = t->list;
- t->list = tc;
- t->total_alloc_size += size;
-
return p;
}
-/* a talloc version of realloc */
+/** A talloc version of realloc */
void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size)
{
struct talloc_chunk *tc;
void *new_ptr;
/* size zero is equivalent to free() */
- if (size == 0)
+ if (!t || size == 0)
return NULL;
/* realloc(NULL) is equavalent to malloc() */
@@ -103,7 +207,8 @@ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size)
return NULL;
}
-/* destroy a whole pool */
+/** Destroy all the memory allocated inside @p t, but not @p t
+ * itself. */
void talloc_destroy_pool(TALLOC_CTX *t)
{
struct talloc_chunk *c;
@@ -118,27 +223,40 @@ void talloc_destroy_pool(TALLOC_CTX *t)
t->list = c;
}
- t->list = NULL;
t->total_alloc_size = 0;
}
-/* destroy a whole pool including the context */
+/** Destroy a whole pool including the context */
void talloc_destroy(TALLOC_CTX *t)
{
if (!t)
return;
+
talloc_destroy_pool(t);
- memset(t, 0, sizeof(*t));
+ talloc_disenroll(t);
+ memset(t, 0, sizeof(TALLOC_CTX));
SAFE_FREE(t);
}
-/* return the current total size of the pool. */
+/** Return the current total size of the pool. */
size_t talloc_pool_size(TALLOC_CTX *t)
{
- return t->total_alloc_size;
+ if (t)
+ return t->total_alloc_size;
+ else
+ return 0;
}
-/* talloc and zero memory. */
+const char * talloc_pool_name(TALLOC_CTX const *t)
+{
+ if (t)
+ return t->name;
+ else
+ return NULL;
+}
+
+
+/** talloc and zero memory. */
void *talloc_zero(TALLOC_CTX *t, size_t size)
{
void *p = talloc(t, size);
@@ -149,21 +267,175 @@ void *talloc_zero(TALLOC_CTX *t, size_t size)
return p;
}
-/* memdup with a talloc. */
-void *talloc_memdup(TALLOC_CTX *t, void *p, size_t size)
+/** memdup with a talloc. */
+void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size)
{
void *newp = talloc(t,size);
- if (!newp)
- return 0;
-
- memcpy(newp, p, size);
+ if (newp)
+ memcpy(newp, p, size);
return newp;
}
-/* strdup with a talloc */
-char *talloc_strdup(TALLOC_CTX *t, char *p)
+/** strdup with a talloc */
+char *talloc_strdup(TALLOC_CTX *t, const char *p)
+{
+ if (p)
+ return talloc_memdup(t, p, strlen(p) + 1);
+ else
+ return NULL;
+}
+
+/**
+ * Perform string formatting, and return a pointer to newly allocated
+ * memory holding the result, inside a memory pool.
+ **/
+ char *talloc_asprintf(TALLOC_CTX *t, const char *fmt, ...)
+{
+ va_list ap;
+ char *ret;
+
+ va_start(ap, fmt);
+ ret = talloc_vasprintf(t, fmt, ap);
+ va_end(ap);
+ return ret;
+}
+
+
+ char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap)
+{
+ int len;
+ char *ret;
+
+ len = vsnprintf(NULL, 0, fmt, ap);
+
+ ret = talloc(t, len+1);
+ if (ret)
+ vsnprintf(ret, len+1, fmt, ap);
+
+ return ret;
+}
+
+
+/**
+ * Realloc @p s to append the formatted result of @p fmt and return @p
+ * s, which may have moved. Good for gradually accumulating output
+ * into a string buffer.
+ **/
+ char *talloc_asprintf_append(TALLOC_CTX *t, char *s,
+ const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ s = talloc_vasprintf_append(t, s, fmt, ap);
+ va_end(ap);
+ return s;
+}
+
+
+
+/**
+ * Realloc @p s to append the formatted result of @p fmt and @p ap,
+ * and return @p s, which may have moved. Good for gradually
+ * accumulating output into a string buffer.
+ **/
+ char *talloc_vasprintf_append(TALLOC_CTX *t, char *s,
+ const char *fmt, va_list ap)
+{
+ int len, s_len;
+
+ s_len = strlen(s);
+ len = vsnprintf(NULL, 0, fmt, ap);
+
+ s = talloc_realloc(t, s, s_len + len+1);
+ if (!s) return NULL;
+
+ vsnprintf(s+s_len, len+1, fmt, ap);
+
+ return s;
+}
+
+
+/**
+ * Return a human-readable description of all talloc memory usage.
+ * The result is allocated from @p t.
+ **/
+char *talloc_describe_all(TALLOC_CTX *rt)
{
- return talloc_memdup(t, p, strlen(p) + 1);
+ int n_pools = 0, total_chunks = 0;
+ size_t total_bytes = 0;
+ TALLOC_CTX *it;
+ char *s;
+
+ if (!rt) return NULL;
+
+ s = talloc_asprintf(rt, "global talloc allocations in pid: %u\n",
+ (unsigned) sys_getpid());
+ s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n",
+ "name", "chunks", "bytes");
+ s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n",
+ "----------------------------------------",
+ "--------",
+ "--------");
+
+ for (it = list_head; it; it = it->next_ctx) {
+ size_t bytes;
+ int n_chunks;
+ fstring what;
+
+ n_pools++;
+
+ talloc_get_allocation(it, &bytes, &n_chunks);
+
+ if (it->name)
+ fstrcpy(what, it->name);
+ else
+ slprintf(what, sizeof what, "@%p", it);
+
+ s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n",
+ what,
+ (unsigned) n_chunks,
+ (unsigned) bytes);
+ total_bytes += bytes;
+ total_chunks += n_chunks;
+ }
+
+ s = talloc_asprintf_append(rt, s, "%-40s %8s %8s\n",
+ "----------------------------------------",
+ "--------",
+ "--------");
+
+ s = talloc_asprintf_append(rt, s, "%-40s %8u %8u\n",
+ "TOTAL",
+ (unsigned) total_chunks, (unsigned) total_bytes);
+
+ return s;
}
+
+
+
+/**
+ * Return an estimated memory usage for the specified pool. This does
+ * not include memory used by the underlying malloc implementation.
+ **/
+void talloc_get_allocation(TALLOC_CTX *t,
+ size_t *total_bytes,
+ int *n_chunks)
+{
+ struct talloc_chunk *chunk;
+
+ if (t) {
+ *total_bytes = 0;
+ *n_chunks = 0;
+
+ for (chunk = t->list; chunk; chunk = chunk->next) {
+ n_chunks[0]++;
+ *total_bytes += chunk->size;
+ }
+ }
+}
+
+
+/** @} */
diff --git a/source/lib/username.c b/source/lib/username.c
index 7ad2341d627..2bf289b6771 100644
--- a/source/lib/username.c
+++ b/source/lib/username.c
@@ -239,9 +239,9 @@ struct passwd *Get_Pwnam(char *user,BOOL allow_change)
/* try in all lower case first as this is the most
common case on UNIX systems */
- unix_to_dos(user, True);
+ unix_to_dos(user);
strlower(user);
- dos_to_unix(user, True);
+ dos_to_unix(user);
ret = _Get_Pwnam(user);
if (ret)
@@ -260,9 +260,9 @@ struct passwd *Get_Pwnam(char *user,BOOL allow_change)
}
/* finally, try in all caps if that is a new case */
- unix_to_dos(user, True);
+ unix_to_dos(user);
strupper(user);
- dos_to_unix(user, True);
+ dos_to_unix(user);
if (strcmp(user, orig_username) != 0) {
ret = _Get_Pwnam(user);
@@ -271,9 +271,9 @@ struct passwd *Get_Pwnam(char *user,BOOL allow_change)
}
/* Try all combinations up to usernamelevel. */
- unix_to_dos(user, True);
+ unix_to_dos(user);
strlower(user);
- dos_to_unix(user, True);
+ dos_to_unix(user);
ret = uname_string_combinations(user, _Get_Pwnam, usernamelevel);
@@ -451,7 +451,7 @@ BOOL user_in_list(char *user,char *list)
while (next_token(&p,tok,LIST_SEP, sizeof(tok))) {
- DEBUG(10,("user_in_list: checking user |%s| in group |%s|\n", user, tok));
+ DEBUG(10,("user_in_list: checking user |%s| against |%s|\n", user, tok));
/*
* Check raw username.
@@ -524,7 +524,7 @@ BOOL user_in_list(char *user,char *list)
BOOL ret;
/* Check to see if name is a Windows group */
- if (winbind_lookup_name(tok, &g_sid, &name_type) && name_type == SID_NAME_DOM_GRP) {
+ if (winbind_lookup_name(NULL, tok, &g_sid, &name_type) && name_type == SID_NAME_DOM_GRP) {
/* Check if user name is in the Windows group */
ret = user_in_winbind_group_list(user, tok, &winbind_answered);
diff --git a/source/lib/util.c b/source/lib/util.c
index 9aad4f976aa..5d5fe195c0a 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -495,13 +495,13 @@ int set_blocking(int fd, BOOL set)
#endif
#endif
- if((val = fcntl(fd, F_GETFL, 0)) == -1)
+ if((val = sys_fcntl_long(fd, F_GETFL, 0)) == -1)
return -1;
if(set) /* Turn blocking on - ie. clear nonblock flag */
val &= ~FLAG_TO_SET;
else
val |= FLAG_TO_SET;
- return fcntl( fd, F_SETFL, val);
+ return sys_fcntl_long( fd, F_SETFL, val);
#undef FLAG_TO_SET
}
@@ -563,16 +563,16 @@ ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)
SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n)
{
- return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n, read, write);
+ return (SMB_OFF_T)transfer_file_internal(infd, outfd, (size_t)n, sys_read, sys_write);
}
/*******************************************************************
Sleep for a specified number of milliseconds.
********************************************************************/
-void msleep(int t)
+void msleep(unsigned int t)
{
- int tdiff=0;
+ unsigned int tdiff=0;
struct timeval tval,t1,t2;
fd_set fds;
@@ -582,12 +582,23 @@ void msleep(int t)
while (tdiff < t) {
tval.tv_sec = (t-tdiff)/1000;
tval.tv_usec = 1000*((t-tdiff)%1000);
-
+
+ /* Never wait for more than 1 sec. */
+ if (tval.tv_sec > 1) {
+ tval.tv_sec = 1;
+ tval.tv_usec = 0;
+ }
+
FD_ZERO(&fds);
errno = 0;
sys_select_intr(0,&fds,NULL,NULL,&tval);
GetTimeOfDay(&t2);
+ if (t2.tv_sec < t1.tv_sec) {
+ /* Someone adjusted time... */
+ t1 = t2;
+ }
+
tdiff = TvalDiff(&t1,&t2);
}
}
@@ -793,15 +804,32 @@ struct in_addr *interpret_addr2(const char *str)
}
/*******************************************************************
- check if an IP is the 0.0.0.0
- ******************************************************************/
-BOOL zero_ip(struct in_addr ip)
+ Check if an IP is the 0.0.0.0
+ ******************************************************************/
+
+BOOL is_zero_ip(struct in_addr ip)
{
- uint32 a;
- putip((char *)&a,(char *)&ip);
- return(a == 0);
+ uint32 a;
+ putip((char *)&a,(char *)&ip);
+ return(a == 0);
}
+/*******************************************************************
+ Set an IP to 0.0.0.0
+ ******************************************************************/
+
+void zero_ip(struct in_addr *ip)
+{
+ static BOOL init;
+ static struct in_addr ipzero;
+
+ if (!init) {
+ ipzero = *interpret_addr2("0.0.0.0");
+ init = True;
+ }
+
+ *ip = ipzero;
+}
#if (defined(HAVE_NETGROUP) && defined(WITH_AUTOMOUNT))
/******************************************************************
@@ -1279,11 +1307,9 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
lock.l_len = count;
lock.l_pid = 0;
- errno = 0;
-
- ret = fcntl(fd,op,&lock);
+ ret = sys_fcntl_ptr(fd,op,&lock);
- if (errno != 0)
+ if (ret == -1 && errno != 0)
DEBUG(3,("fcntl_lock: fcntl lock gave errno %d (%s)\n",errno,strerror(errno)));
/* a lock query */
@@ -1333,6 +1359,25 @@ BOOL is_myname(char *s)
return(ret);
}
+/********************************************************************
+ Return only the first IP address of our configured interfaces
+ as a string
+ *******************************************************************/
+
+const char* get_my_primary_ip (void)
+{
+ static fstring ip_string;
+ int n;
+ struct iface_struct nics[MAX_INTERFACES];
+
+ if ((n=get_interfaces(nics, MAX_INTERFACES)) <= 0)
+ return NULL;
+
+ fstrcpy(ip_string, inet_ntoa(nics[0].ip));
+ return ip_string;
+}
+
+
BOOL is_myname_or_ipaddr(char *s)
{
char *ptr;
@@ -1710,11 +1755,10 @@ void *smb_xmalloc(size_t size)
return p;
}
-/*****************************************************************
+/**
Memdup with smb_panic on fail.
- *****************************************************************/
-
-void *xmemdup(const void *p, size_t size)
+**/
+void *smb_xmemdup(const void *p, size_t size)
{
void *p2;
p2 = smb_xmalloc(size);
@@ -1722,18 +1766,30 @@ void *xmemdup(const void *p, size_t size)
return p2;
}
-/*****************************************************************
+/**
strdup that aborts on malloc fail.
- *****************************************************************/
-
-char *xstrdup(const char *s)
+**/
+char *smb_xstrdup(const char *s)
{
char *s1 = strdup(s);
if (!s1)
- smb_panic("xstrdup: malloc fail\n");
+ smb_panic("smb_xstrdup: malloc fail\n");
return s1;
}
+/*
+ vasprintf that aborts on malloc fail
+*/
+int smb_xvasprintf(char **ptr, const char *format, va_list ap)
+{
+ int n;
+ n = vasprintf(ptr, format, ap);
+ if (n == -1 || ! *ptr) {
+ smb_panic("smb_xvasprintf: out of memory");
+ }
+ return n;
+}
+
/*****************************************************************
like strdup but for memory
*****************************************************************/
@@ -1780,6 +1836,26 @@ char *lock_path(char *name)
return fname;
}
+/*****************************************************************
+a useful function for returning a path in the Samba pid directory
+ *****************************************************************/
+char *pid_path(char *name)
+{
+ static pstring fname;
+
+ pstrcpy(fname,lp_piddir());
+ trim_string(fname,"","/");
+
+ if (!directory_exist(fname,NULL)) {
+ mkdir(fname,0755);
+ }
+
+ pstrcat(fname,"/");
+ pstrcat(fname,name);
+
+ return fname;
+}
+
/*******************************************************************
Given a filename - get its directory name
NB: Returned in static storage. Caveats:
@@ -1975,6 +2051,86 @@ BOOL unix_wild_match(char *pattern, char *string)
return unix_do_match(p2, s2) == 0;
}
+/*******************************************************************
+ free() a data blob
+*******************************************************************/
+
+static void free_data_blob(DATA_BLOB *d)
+{
+ if ((d) && (d->free)) {
+ SAFE_FREE(d->data);
+ }
+}
+
+/*******************************************************************
+ construct a data blob, must be freed with data_blob_free()
+ you can pass NULL for p and get a blank data blob
+*******************************************************************/
+
+DATA_BLOB data_blob(const void *p, size_t length)
+{
+ DATA_BLOB ret;
+
+ if (!length) {
+ ZERO_STRUCT(ret);
+ return ret;
+ }
+
+ if (p) {
+ ret.data = smb_xmemdup(p, length);
+ } else {
+ ret.data = smb_xmalloc(length);
+ }
+ ret.length = length;
+ ret.free = free_data_blob;
+ return ret;
+}
+
+/*******************************************************************
+ construct a data blob, using supplied TALLOC_CTX
+*******************************************************************/
+
+DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length)
+{
+ DATA_BLOB ret;
+
+ if (!p || !length) {
+ ZERO_STRUCT(ret);
+ return ret;
+ }
+
+ ret.data = talloc_memdup(mem_ctx, p, length);
+ if (ret.data == NULL)
+ smb_panic("data_blob_talloc: talloc_memdup failed.\n");
+
+ ret.length = length;
+ ret.free = NULL;
+ return ret;
+}
+
+/*******************************************************************
+free a data blob
+*******************************************************************/
+void data_blob_free(DATA_BLOB *d)
+{
+ if (d) {
+ if (d->free) {
+ (d->free)(d);
+ }
+ ZERO_STRUCTP(d);
+ }
+}
+
+/*******************************************************************
+clear a DATA_BLOB's contents
+*******************************************************************/
+void data_blob_clear(DATA_BLOB *d)
+{
+ if (d->data) {
+ memset(d->data, 0, d->length);
+ }
+}
+
#ifdef __INSURE__
/*******************************************************************
diff --git a/source/lib/util_file.c b/source/lib/util_file.c
index 526e8b01568..7ea9825ad1d 100644
--- a/source/lib/util_file.c
+++ b/source/lib/util_file.c
@@ -50,9 +50,10 @@ BOOL do_file_lock(int fd, int waitsecs, int type)
lock.l_pid = 0;
alarm(waitsecs);
+ /* Note we must *NOT* use sys_fcntl here ! JRA */
ret = fcntl(fd, SMB_F_SETLKW, &lock);
alarm(0);
- CatchSignal(SIGALRM, SIGNAL_CAST SIG_DFL);
+ CatchSignal(SIGALRM, SIGNAL_CAST SIG_IGN);
if (gotalarm) {
DEBUG(0, ("do_file_lock: failed to %s file.\n",
@@ -466,7 +467,7 @@ static char **file_lines_parse(char *p, size_t size, int *numlines, BOOL convert
if (convert) {
for (i = 0; ret[i]; i++)
- unix_to_dos(ret[i], True);
+ unix_to_dos(ret[i]);
}
return ret;
diff --git a/source/lib/util_seaccess.c b/source/lib/util_seaccess.c
index b8dc43dede4..b80ba6e8046 100644
--- a/source/lib/util_seaccess.c
+++ b/source/lib/util_seaccess.c
@@ -194,6 +194,31 @@ void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping)
}
}
+/* Map standard access rights to object specific rights. This technique is
+ used to give meaning to assigning read, write, execute and all access to
+ objects. Each type of object has its own mapping of standard to object
+ specific access rights. */
+
+void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping)
+{
+ uint32 old_mask = *access_mask;
+
+ if (*access_mask & READ_CONTROL_ACCESS) {
+ *access_mask &= ~READ_CONTROL_ACCESS;
+ *access_mask |= mapping->std_read;
+ }
+
+ if (*access_mask & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS)) {
+ *access_mask &= ~(DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS);
+ *access_mask |= mapping->std_all;
+ }
+
+ if (old_mask != *access_mask) {
+ DEBUG(10, ("se_map_standard(): mapped mask 0x%08x to 0x%08x\n",
+ old_mask, *access_mask));
+ }
+}
+
/*****************************************************************************
Check access rights of a user against a security descriptor. Look at
each ACE in the security descriptor until an access denied ACE denies
@@ -221,7 +246,7 @@ BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token,
*status = NT_STATUS_OK;
*acc_granted = 0;
- DEBUG(10,("se_access_check: requested access %x, for NT token with %u entries and first sid %s.\n",
+ DEBUG(10,("se_access_check: requested access 0x%08x, for NT token with %u entries and first sid %s.\n",
(unsigned int)acc_desired, (unsigned int)token->num_sids,
sid_to_string(sid_str, &token->user_sids[0])));
diff --git a/source/lib/util_sec.c b/source/lib/util_sec.c
index c559647bf45..af7edd60808 100644
--- a/source/lib/util_sec.c
+++ b/source/lib/util_sec.c
@@ -415,7 +415,7 @@ main()
#endif
/****************************************************************************
-Check if we are setuid root. Used in libsmb and smbpasswd parinoia checks.
+Check if we are setuid root. Used in libsmb and smbpasswd paranoia checks.
****************************************************************************/
BOOL is_setuid_root(void)
{
diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c
index d9f7efe39b8..0004aa87033 100644
--- a/source/lib/util_sid.c
+++ b/source/lib/util_sid.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
Samba utility functions
Copyright (C) Andrew Tridgell 1992-1998
Copyright (C) Luke Kenneth Caseson Leighton 1998-1999
@@ -23,7 +22,9 @@
#include "includes.h"
-
+/* NOTE! the global_sam_sid is the SID of our local SAM. This is only
+ equal to the domain SID when we are a DC, otherwise its our
+ workstation SID */
DOM_SID global_sam_sid;
extern pstring global_myname;
extern fstring global_myworkgroup;
@@ -61,7 +62,6 @@ static known_sid_users everyone_users[] = {
static known_sid_users creator_owner_users[] = {
{ 0, SID_NAME_ALIAS, "Creator Owner" },
- { 1, SID_NAME_ALIAS, "Creator Group" },
{0, (enum SID_NAME_USE)0, NULL}};
static known_sid_users nt_authority_users[] = {
@@ -360,6 +360,16 @@ char *sid_to_string(fstring sidstr_out, DOM_SID *sid)
return sidstr_out;
}
+/*
+ useful function for debug lines
+*/
+const char *sid_string_static(DOM_SID *sid)
+{
+ static fstring sid_str;
+ sid_to_string(sid_str, sid);
+ return sid_str;
+}
+
/*****************************************************************
Convert a string to a SID. Returns True on success, False on fail.
*****************************************************************/
@@ -370,21 +380,20 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
char *p, *q;
/* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */
uint32 ia;
-
-
+
if (StrnCaseCmp( sidstr, "S-", 2)) {
DEBUG(0,("string_to_sid: Sid %s does not start with 'S-'.\n", sidstr));
return False;
}
memset((char *)sidout, '\0', sizeof(DOM_SID));
-
+
q = p = strdup(sidstr + 2);
if (p == NULL) {
DEBUG(0, ("string_to_sid: out of memory!\n"));
return False;
}
-
+
if (!next_token(&p, tok, "-", sizeof(tok))) {
DEBUG(0,("string_to_sid: Sid %s is not in a valid format.\n", sidstr));
SAFE_FREE(q);
@@ -422,8 +431,6 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
sid_append_rid(sidout, (uint32)strtoul(tok, NULL, 10));
}
- DEBUG(7,("string_to_sid: converted SID %s ok\n", sidstr));
-
SAFE_FREE(q);
return True;
}
@@ -509,12 +516,11 @@ DOM_SID *sid_dup(DOM_SID *src)
/*****************************************************************
Write a sid out into on-the-wire format.
*****************************************************************/
-
BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid)
{
size_t i;
- if(len < sid_size(sid))
+ if (len < sid_size(sid))
return False;
SCVAL(outbuf,0,sid->sid_rev_num);
@@ -527,6 +533,45 @@ BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid)
}
/*****************************************************************
+ parse a on-the-wire SID to a DOM_SID
+*****************************************************************/
+BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid)
+{
+ int i;
+ if (len < 8) return False;
+ sid->sid_rev_num = CVAL(inbuf, 0);
+ sid->num_auths = CVAL(inbuf, 1);
+ memcpy(sid->id_auth, inbuf+2, 6);
+ if (len < 8 + sid->num_auths*4) return False;
+ for (i=0;i<sid->num_auths;i++) {
+ sid->sub_auths[i] = IVAL(inbuf, 8+i*4);
+ }
+ return True;
+}
+
+
+/*****************************************************************
+ Compare the auth portion of two sids.
+*****************************************************************/
+int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2)
+{
+ int i;
+
+ if (sid1 == sid2) return 0;
+ if (!sid1) return -1;
+ if (!sid2) return 1;
+
+ if (sid1->sid_rev_num != sid2->sid_rev_num)
+ return sid1->sid_rev_num - sid2->sid_rev_num;
+
+ for (i = 0; i < 6; i++)
+ if (sid1->id_auth[i] != sid2->id_auth[i])
+ return sid1->id_auth[i] - sid2->id_auth[i];
+
+ return 0;
+}
+
+/*****************************************************************
Compare two sids.
*****************************************************************/
int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2)
@@ -538,28 +583,36 @@ int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2)
if (!sid2) return 1;
/* compare most likely different rids, first: i.e start at end */
+ if (sid1->num_auths != sid2->num_auths)
+ return sid1->num_auths - sid2->num_auths;
+
for (i = sid1->num_auths-1; i >= 0; --i)
if (sid1->sub_auths[i] != sid2->sub_auths[i])
return sid1->sub_auths[i] - sid2->sub_auths[i];
- if (sid1->num_auths != sid2->num_auths)
- return sid1->num_auths - sid2->num_auths;
+ return sid_compare_auth(sid1, sid2);
+}
- if (sid1->sid_rev_num != sid2->sid_rev_num)
- return sid1->sid_rev_num - sid2->sid_rev_num;
+/*****************************************************************
+see if 2 SIDs are in the same domain
+this just compares the leading sub-auths
+*****************************************************************/
+int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2)
+{
+ int n, i;
- for (i = 0; i < 6; i++)
- if (sid1->id_auth[i] != sid2->id_auth[i])
- return sid1->id_auth[i] - sid2->id_auth[i];
+ n = MIN(sid1->num_auths, sid2->num_auths);
- return 0;
-}
+ for (i = n-1; i >= 0; --i)
+ if (sid1->sub_auths[i] != sid2->sub_auths[i])
+ return sid1->sub_auths[i] - sid2->sub_auths[i];
+ return sid_compare_auth(sid1, sid2);
+}
/*****************************************************************
Compare two sids.
*****************************************************************/
-
BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2)
{
return sid_compare(sid1, sid2) == 0;
@@ -567,6 +620,53 @@ BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2)
/*****************************************************************
+ Check if the SID is our domain SID (S-1-5-21-x-y-z).
+*****************************************************************/
+BOOL sid_check_is_domain(const DOM_SID *sid)
+{
+ return sid_equal(sid, &global_sam_sid);
+}
+
+
+/*****************************************************************
+ Check if the SID is the builtin SID (S-1-5-32).
+*****************************************************************/
+BOOL sid_check_is_builtin(const DOM_SID *sid)
+{
+ return sid_equal(sid, &global_sid_Builtin);
+}
+
+
+/*****************************************************************
+ Check if the SID is our domain SID (S-1-5-21-x-y-z).
+*****************************************************************/
+BOOL sid_check_is_in_our_domain(const DOM_SID *sid)
+{
+ DOM_SID dom_sid;
+ uint32 rid;
+
+ sid_copy(&dom_sid, sid);
+ sid_split_rid(&dom_sid, &rid);
+
+ return sid_equal(&dom_sid, &global_sam_sid);
+}
+
+/*****************************************************************
+ Check if the SID is our domain SID (S-1-5-21-x-y-z).
+*****************************************************************/
+BOOL sid_check_is_in_builtin(const DOM_SID *sid)
+{
+ DOM_SID dom_sid;
+ uint32 rid;
+
+ sid_copy(&dom_sid, sid);
+ sid_split_rid(&dom_sid, &rid);
+
+ return sid_equal(&dom_sid, &global_sid_Builtin);
+}
+
+
+/*****************************************************************
Calculates size of a sid.
*****************************************************************/
@@ -593,7 +693,7 @@ BOOL non_mappable_sid(DOM_SID *sid)
if (sid_equal(&dom, &global_sid_Builtin))
return True;
- if (sid_equal(&dom, &global_sid_Creator_Owner_Domain))
+ if (sid_equal(&dom, &global_sid_Creator_Owner_Domain))
return True;
if (sid_equal(&dom, &global_sid_NT_Authority))
@@ -601,3 +701,20 @@ BOOL non_mappable_sid(DOM_SID *sid)
return False;
}
+
+/*
+ return the binary string representation of a DOM_SID
+ caller must free
+*/
+char *sid_binstring(DOM_SID *sid)
+{
+ char *buf, *s;
+ int len = sid_size(sid);
+ buf = malloc(len);
+ if (!buf) return NULL;
+ sid_linearize(buf, len, sid);
+ s = binary_string(buf, len);
+ free(buf);
+ return s;
+}
+
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index c3eb78109c2..4b5abbb5724 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -42,20 +42,19 @@ int smb_read_error = 0;
BOOL is_a_socket(int fd)
{
- int v,l;
- l = sizeof(int);
- return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
+ int v,l;
+ l = sizeof(int);
+ return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
}
enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON};
-typedef struct smb_socket_option
-{
- char *name;
- int level;
- int option;
- int value;
- int opttype;
+typedef struct smb_socket_option {
+ char *name;
+ int level;
+ int option;
+ int value;
+ int opttype;
} smb_socket_option;
smb_socket_option socket_options[] = {
@@ -97,6 +96,7 @@ smb_socket_option socket_options[] = {
/****************************************************************************
Print socket options.
****************************************************************************/
+
static void print_socket_options(int s)
{
int value, vlen = 4;
@@ -178,7 +178,7 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len)
memset((char *)&sock,'\0',socklen);
memset((char *)&lastip,'\0',sizeof(lastip));
- ret = (ssize_t)recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen);
+ ret = (ssize_t)sys_recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen);
if (ret <= 0) {
DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno)));
return(0);
@@ -223,10 +223,10 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma
if(fd == sslFd){
readret = SSL_read(ssl, buf + nread, maxcnt - nread);
}else{
- readret = read(fd, buf + nread, maxcnt - nread);
+ readret = sys_read(fd, buf + nread, maxcnt - nread);
}
#else /* WITH_SSL */
- readret = read(fd, buf + nread, maxcnt - nread);
+ readret = sys_read(fd, buf + nread, maxcnt - nread);
#endif /* WITH_SSL */
if (readret == 0) {
@@ -280,10 +280,10 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma
if(fd == sslFd){
readret = SSL_read(ssl, buf + nread, maxcnt - nread);
}else{
- readret = read(fd, buf + nread, maxcnt - nread);
+ readret = sys_read(fd, buf + nread, maxcnt - nread);
}
#else /* WITH_SSL */
- readret = read(fd, buf+nread, maxcnt-nread);
+ readret = sys_read(fd, buf+nread, maxcnt-nread);
#endif /* WITH_SSL */
if (readret == 0) {
@@ -335,10 +335,10 @@ ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned
if(fd == sslFd){
readret = SSL_read(ssl, buf + nread, maxcnt - nread);
}else{
- readret = read(fd, buf + nread, maxcnt - nread);
+ readret = sys_read(fd, buf + nread, maxcnt - nread);
}
#else /* WITH_SSL */
- readret = read(fd, buf + nread, maxcnt - nread);
+ readret = sys_read(fd, buf + nread, maxcnt - nread);
#endif /* WITH_SSL */
if (readret <= 0)
@@ -372,10 +372,10 @@ ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned
if(fd == sslFd){
readret = SSL_read(ssl, buf + nread, maxcnt - nread);
}else{
- readret = read(fd, buf + nread, maxcnt - nread);
+ readret = sys_read(fd, buf + nread, maxcnt - nread);
}
#else /* WITH_SSL */
- readret = read(fd, buf+nread, maxcnt-nread);
+ readret = sys_read(fd, buf+nread, maxcnt-nread);
#endif /* WITH_SSL */
if (readret <= 0)
@@ -394,12 +394,12 @@ send a keepalive packet (rfc1002)
BOOL send_keepalive(int client)
{
- unsigned char buf[4];
+ unsigned char buf[4];
- buf[0] = 0x85;
- buf[1] = buf[2] = buf[3] = 0;
+ buf[0] = 0x85;
+ buf[1] = buf[2] = buf[3] = 0;
- return(write_socket_data(client,(char *)buf,4) == 4);
+ return(write_socket_data(client,(char *)buf,4) == 4);
}
/****************************************************************************
@@ -408,38 +408,36 @@ BOOL send_keepalive(int client)
ssize_t read_data(int fd,char *buffer,size_t N)
{
- ssize_t ret;
- size_t total=0;
+ ssize_t ret;
+ size_t total=0;
- smb_read_error = 0;
+ smb_read_error = 0;
- while (total < N)
- {
+ while (total < N) {
#ifdef WITH_SSL
- if(fd == sslFd){
- ret = SSL_read(ssl, buffer + total, N - total);
- }else{
- ret = read(fd,buffer + total,N - total);
- }
+ if(fd == sslFd){
+ ret = SSL_read(ssl, buffer + total, N - total);
+ }else{
+ ret = sys_read(fd,buffer + total,N - total);
+ }
#else /* WITH_SSL */
- ret = read(fd,buffer + total,N - total);
+ ret = sys_read(fd,buffer + total,N - total);
#endif /* WITH_SSL */
- if (ret == 0)
- {
- DEBUG(10,("read_data: read of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) ));
- smb_read_error = READ_EOF;
- return 0;
- }
- if (ret == -1)
- {
- DEBUG(0,("read_data: read failure for %d. Error = %s\n", (int)(N - total), strerror(errno) ));
- smb_read_error = READ_ERROR;
- return -1;
- }
- total += ret;
- }
- return (ssize_t)total;
+ if (ret == 0) {
+ DEBUG(10,("read_data: read of %d returned 0. Error = %s\n", (int)(N - total), strerror(errno) ));
+ smb_read_error = READ_EOF;
+ return 0;
+ }
+
+ if (ret == -1) {
+ DEBUG(0,("read_data: read failure for %d. Error = %s\n", (int)(N - total), strerror(errno) ));
+ smb_read_error = READ_ERROR;
+ return -1;
+ }
+ total += ret;
+ }
+ return (ssize_t)total;
}
/****************************************************************************
@@ -456,10 +454,10 @@ ssize_t write_data(int fd,char *buffer,size_t N)
if(fd == sslFd){
ret = SSL_write(ssl,buffer + total,N - total);
} else {
- ret = write(fd,buffer + total,N - total);
+ ret = sys_write(fd,buffer + total,N - total);
}
#else /* WITH_SSL */
- ret = write(fd,buffer + total,N - total);
+ ret = sys_write(fd,buffer + total,N - total);
#endif /* WITH_SSL */
if (ret == -1) {
@@ -481,30 +479,30 @@ ssize_t write_data(int fd,char *buffer,size_t N)
ssize_t write_socket_data(int fd,char *buffer,size_t N)
{
- size_t total=0;
- ssize_t ret;
+ size_t total=0;
+ ssize_t ret;
- while (total < N)
- {
+ while (total < N) {
#ifdef WITH_SSL
- if(fd == sslFd){
- ret = SSL_write(ssl,buffer + total,N - total);
- }else{
- ret = send(fd,buffer + total,N - total, 0);
- }
+ if(fd == sslFd){
+ ret = SSL_write(ssl,buffer + total,N - total);
+ }else{
+ ret = sys_send(fd,buffer + total,N - total, 0);
+ }
#else /* WITH_SSL */
- ret = send(fd,buffer + total,N - total,0);
+ ret = sys_send(fd,buffer + total,N - total,0);
#endif /* WITH_SSL */
- if (ret == -1) {
- DEBUG(0,("write_socket_data: write failure. Error = %s\n", strerror(errno) ));
- return -1;
- }
- if (ret == 0) return total;
+ if (ret == -1) {
+ DEBUG(0,("write_socket_data: write failure. Error = %s\n", strerror(errno) ));
+ return -1;
+ }
+ if (ret == 0)
+ return (ssize_t)total;
- total += ret;
- }
- return (ssize_t)total;
+ total += ret;
+ }
+ return (ssize_t)total;
}
/****************************************************************************
@@ -513,17 +511,17 @@ write to a socket
ssize_t write_socket(int fd,char *buf,size_t len)
{
- ssize_t ret=0;
+ ssize_t ret=0;
- DEBUG(6,("write_socket(%d,%d)\n",fd,(int)len));
- ret = write_socket_data(fd,buf,len);
+ DEBUG(6,("write_socket(%d,%d)\n",fd,(int)len));
+ ret = write_socket_data(fd,buf,len);
- DEBUG(6,("write_socket(%d,%d) wrote %d\n",fd,(int)len,(int)ret));
- if(ret <= 0)
- DEBUG(0,("write_socket: Error writing %d bytes to socket %d: ERRNO = %s\n",
- (int)len, fd, strerror(errno) ));
+ DEBUG(6,("write_socket(%d,%d) wrote %d\n",fd,(int)len,(int)ret));
+ if(ret <= 0)
+ DEBUG(0,("write_socket: Error writing %d bytes to socket %d: ERRNO = %s\n",
+ (int)len, fd, strerror(errno) ));
- return(ret);
+ return(ret);
}
/****************************************************************************
@@ -536,30 +534,29 @@ timeout is in milliseconds.
static ssize_t read_smb_length_return_keepalive(int fd,char *inbuf,unsigned int timeout)
{
- ssize_t len=0;
- int msg_type;
- BOOL ok = False;
+ ssize_t len=0;
+ int msg_type;
+ BOOL ok = False;
- while (!ok)
- {
- if (timeout > 0)
- ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4);
- else
- ok = (read_data(fd,inbuf,4) == 4);
+ while (!ok) {
+ if (timeout > 0)
+ ok = (read_socket_with_timeout(fd,inbuf,4,4,timeout) == 4);
+ else
+ ok = (read_data(fd,inbuf,4) == 4);
- if (!ok)
- return(-1);
+ if (!ok)
+ return(-1);
- len = smb_len(inbuf);
- msg_type = CVAL(inbuf,0);
+ len = smb_len(inbuf);
+ msg_type = CVAL(inbuf,0);
- if (msg_type == 0x85)
- DEBUG(5,("Got keepalive packet\n"));
- }
+ if (msg_type == 0x85)
+ DEBUG(5,("Got keepalive packet\n"));
+ }
- DEBUG(10,("got smb length of %d\n",len));
+ DEBUG(10,("got smb length of %d\n",len));
- return(len);
+ return(len);
}
/****************************************************************************
@@ -571,23 +568,22 @@ timeout is in milliseconds.
ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout)
{
- ssize_t len;
+ ssize_t len;
- for(;;)
- {
- len = read_smb_length_return_keepalive(fd, inbuf, timeout);
+ for(;;) {
+ len = read_smb_length_return_keepalive(fd, inbuf, timeout);
- if(len < 0)
- return len;
+ if(len < 0)
+ return len;
- /* Ignore session keepalives. */
- if(CVAL(inbuf,0) != 0x85)
- break;
- }
+ /* Ignore session keepalives. */
+ if(CVAL(inbuf,0) != 0x85)
+ break;
+ }
- DEBUG(10,("read_smb_length: got smb length of %d\n",len));
+ DEBUG(10,("read_smb_length: got smb length of %d\n",len));
- return len;
+ return len;
}
/****************************************************************************
@@ -609,19 +605,35 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout)
len = read_smb_length_return_keepalive(fd,buffer,timeout);
if (len < 0) {
DEBUG(10,("receive_smb: length < 0!\n"));
- smb_read_error = READ_ERROR;
+
+ /*
+ * Correct fix. smb_read_error may have already been
+ * set. Only set it here if not already set. Global
+ * variables still suck :-). JRA.
+ */
+
+ if (smb_read_error == 0)
+ smb_read_error = READ_ERROR;
return(False);
}
/*
* A WRITEX with CAP_LARGE_WRITEX can be 64k worth of data plus 65 bytes
- * of header. Don't print the error if this fits.... JRA.
+ * of header. Don't print the error if this fits.... JRA.
*/
if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) {
DEBUG(0,("Invalid packet length! (%d bytes).\n",len));
if (len > BUFFER_SIZE + (SAFETY_MARGIN/2)) {
- smb_read_error = READ_ERROR;
+
+ /*
+ * Correct fix. smb_read_error may have already been
+ * set. Only set it here if not already set. Global
+ * variables still suck :-). JRA.
+ */
+
+ if (smb_read_error == 0)
+ smb_read_error = READ_ERROR;
return False;
}
}
@@ -629,7 +641,8 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout)
if(len > 0) {
ret = read_data(fd,buffer+4,len);
if (ret != len) {
- smb_read_error = READ_ERROR;
+ if (smb_read_error == 0)
+ smb_read_error = READ_ERROR;
return False;
}
}
@@ -724,7 +737,7 @@ BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type)
len,inet_ntoa(ip),port,type==SOCK_DGRAM?"DGRAM":"STREAM"));
/* send it */
- ret = (sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0);
+ ret = (sys_sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0);
if (!ret)
DEBUG(0,("Packet send to %s(%d) failed ERRNO=%s\n",
@@ -1004,35 +1017,104 @@ char *get_socket_addr(int fd)
}
/*******************************************************************
- opens and connects to a unix pipe socket
+ Create protected unix domain socket.
+
+ some unixen cannot set permissions on a ux-dom-sock, so we
+ have to make sure that the directory contains the protection
+ permissions, instead.
******************************************************************/
-int open_pipe_sock(char *path)
+int create_pipe_sock(const char *socket_dir,
+ const char *socket_name,
+ mode_t dir_perms)
{
- int sock;
- struct sockaddr_un sa;
-
- sock = socket(AF_UNIX, SOCK_STREAM, 0);
-
- if (sock < 0)
- {
- DEBUG(0, ("unix socket open failed\n"));
- return sock;
- }
-
- ZERO_STRUCT(sa);
- sa.sun_family = AF_UNIX;
- safe_strcpy(sa.sun_path, path, sizeof(sa.sun_path)-1);
-
- DEBUG(10, ("socket open succeeded. file name: %s\n", sa.sun_path));
-
- if (connect(sock, (struct sockaddr*) &sa, sizeof(sa)) < 0)
- {
- DEBUG(0,("socket connect to %s failed\n", sa.sun_path));
- close(sock);
- return -1;
- }
-
- return sock;
+ struct sockaddr_un sunaddr;
+ struct stat st;
+ int sock;
+ mode_t old_umask;
+ pstring path;
+
+ /* Create the socket directory or reuse the existing one */
+
+ if (lstat(socket_dir, &st) == -1) {
+
+ if (errno == ENOENT) {
+
+ /* Create directory */
+
+ if (mkdir(socket_dir, dir_perms) == -1) {
+ DEBUG(0, ("error creating socket directory "
+ "%s: %s\n", socket_dir,
+ strerror(errno)));
+ return -1;
+ }
+
+ } else {
+
+ DEBUG(0, ("lstat failed on socket directory %s: %s\n",
+ socket_dir, strerror(errno)));
+ return -1;
+ }
+
+ } else {
+
+ /* Check ownership and permission on existing directory */
+
+ if (!S_ISDIR(st.st_mode)) {
+ DEBUG(0, ("socket directory %s isn't a directory\n",
+ socket_dir));
+ return -1;
+ }
+
+ if ((st.st_uid != sec_initial_uid()) ||
+ ((st.st_mode & 0777) != dir_perms)) {
+ DEBUG(0, ("invalid permissions on socket directory "
+ "%s\n", socket_dir));
+ return -1;
+ }
+ }
+
+ /* Create the socket file */
+
+ old_umask = umask(0);
+
+ sock = socket(AF_UNIX, SOCK_STREAM, 0);
+
+ if (sock == -1) {
+ perror("socket");
+ umask(old_umask);
+ return -1;
+ }
+
+ snprintf(path, sizeof(path), "%s/%s", socket_dir, socket_name);
+
+ unlink(path);
+ memset(&sunaddr, 0, sizeof(sunaddr));
+ sunaddr.sun_family = AF_UNIX;
+ safe_strcpy(sunaddr.sun_path, path, sizeof(sunaddr.sun_path)-1);
+
+ if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) {
+ DEBUG(0, ("bind failed on pipe socket %s: %s\n",
+ path,
+ strerror(errno)));
+ close(sock);
+ umask(old_umask);
+ return -1;
+ }
+
+ if (listen(sock, 5) == -1) {
+ DEBUG(0, ("listen failed on pipe socket %s: %s\n",
+ path,
+ strerror(errno)));
+ close(sock);
+ umask(old_umask);
+ return -1;
+ }
+
+ umask(old_umask);
+
+ /* Success! */
+
+ return sock;
}
/*******************************************************************
@@ -1127,4 +1209,3 @@ int sock_exec(const char *prog)
close(fd[1]);
return fd[0];
}
-
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index f5f9cc1fe44..a2b01a0fc7e 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -857,29 +857,29 @@ include the terminating zero.
char *safe_strcpy(char *dest,const char *src, size_t maxlength)
{
- size_t len;
+ size_t len;
- if (!dest) {
- DEBUG(0,("ERROR: NULL dest in safe_strcpy\n"));
- return NULL;
- }
+ if (!dest) {
+ DEBUG(0,("ERROR: NULL dest in safe_strcpy\n"));
+ return NULL;
+ }
- if (!src) {
- *dest = 0;
- return dest;
- }
+ if (!src) {
+ *dest = 0;
+ return dest;
+ }
- len = strlen(src);
+ len = strlen(src);
- if (len > maxlength) {
- DEBUG(0,("ERROR: string overflow by %d in safe_strcpy [%.50s]\n",
- (int)(len-maxlength), src));
- len = maxlength;
- }
+ if (len > maxlength) {
+ DEBUG(0,("ERROR: string overflow by %d in safe_strcpy [%.50s]\n",
+ (int)(len-maxlength), src));
+ len = maxlength;
+ }
- memcpy(dest, src, len);
- dest[len] = 0;
- return dest;
+ memcpy(dest, src, len);
+ dest[len] = 0;
+ return dest;
}
/*******************************************************************
@@ -889,29 +889,30 @@ include the terminating zero.
char *safe_strcat(char *dest, const char *src, size_t maxlength)
{
- size_t src_len, dest_len;
+ size_t src_len, dest_len;
- if (!dest) {
- DEBUG(0,("ERROR: NULL dest in safe_strcat\n"));
- return NULL;
- }
+ if (!dest) {
+ DEBUG(0,("ERROR: NULL dest in safe_strcat\n"));
+ return NULL;
+ }
- if (!src) {
- return dest;
- }
+ if (!src)
+ return dest;
- src_len = strlen(src);
- dest_len = strlen(dest);
+ src_len = strlen(src);
+ dest_len = strlen(dest);
- if (src_len + dest_len > maxlength) {
- DEBUG(0,("ERROR: string overflow by %d in safe_strcat [%.50s]\n",
- (int)(src_len + dest_len - maxlength), src));
- src_len = maxlength - dest_len;
- }
+ if (src_len + dest_len > maxlength) {
+ DEBUG(0,("ERROR: string overflow by %d in safe_strcat [%.50s]\n",
+ (int)(src_len + dest_len - maxlength), src));
+ if (dest_len >= maxlength)
+ return dest;
+ src_len = maxlength - dest_len;
+ }
- memcpy(&dest[dest_len], src, src_len);
- dest[dest_len + src_len] = 0;
- return dest;
+ memcpy(&dest[dest_len], src, src_len);
+ dest[dest_len + src_len] = 0;
+ return dest;
}
/*******************************************************************
@@ -1309,3 +1310,25 @@ char *string_truncate(char *s, int length)
}
return s;
}
+
+/*
+ return a RFC2254 binary string representation of a buffer
+ used in LDAP filters
+ caller must free
+*/
+char *binary_string(char *buf, int len)
+{
+ char *s;
+ int i, j;
+ const char *hex = "0123456789ABCDEF";
+ s = malloc(len * 3 + 1);
+ if (!s) return NULL;
+ for (j=i=0;i<len;i++) {
+ s[j] = '\\';
+ s[j+1] = hex[((unsigned char)buf[i]) >> 4];
+ s[j+2] = hex[((unsigned char)buf[i]) & 0xF];
+ j += 3;
+ }
+ s[j] = 0;
+ return s;
+}
diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c
index c044e8f248c..a2bd0cf4913 100644
--- a/source/lib/util_unistr.c
+++ b/source/lib/util_unistr.c
@@ -348,6 +348,20 @@ void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen)
*p = 0;
}
+/*******************************************************************
+ duplicate a UNISTR2 string into a null terminated char*
+ using a talloc context
+********************************************************************/
+char *unistr2_tdup(TALLOC_CTX *ctx, const UNISTR2 *str)
+{
+ char *s;
+ int maxlen = (str->uni_str_len+1)*4;
+ if (!str->buffer) return NULL;
+ s = (char *)talloc(ctx, maxlen); /* convervative */
+ if (!s) return NULL;
+ unistr2_to_ascii(s, str, maxlen);
+ return s;
+}
/*******************************************************************
Return a number stored in a buffer
@@ -492,20 +506,33 @@ char *dos_unistr(char *buf)
}
/*******************************************************************
+ returns the length in number of wide characters
+ ******************************************************************/
+int unistrlen(uint16 *s)
+{
+ int len;
+
+ if (!s)
+ return -1;
+
+ for (len=0; *s; s++,len++);
+
+ return len;
+}
+
+/*******************************************************************
Strcpy for unicode strings. returns length (in num of wide chars)
********************************************************************/
-int unistrcpy(char *dst, char *src)
+int unistrcpy(uint16 *dst, uint16 *src)
{
int num_wchars = 0;
- uint16 *wsrc = (uint16 *)src;
- uint16 *wdst = (uint16 *)dst;
- while (*wsrc) {
- *wdst++ = *wsrc++;
+ while (*src) {
+ *dst++ = *src++;
num_wchars++;
}
- *wdst = 0;
+ *dst = 0;
return num_wchars;
}
@@ -2053,6 +2080,11 @@ int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags)
{
if(dest_len==-1)
dest_len=MAXUNI-3;
- unistr_to_ascii(dest, src, dest_len - 1);
+
+ if (flags & STR_TERMINATE)
+ src_len = strlen_w(src)*2+2;
+
+ dest_len = MIN((src_len/2), (dest_len-1));
+ unistr_to_ascii(dest, src, dest_len);
return src_len;
}
diff --git a/source/lib/wins_srv.c b/source/lib/wins_srv.c
index c0cf64f751e..23700a026b5 100644
--- a/source/lib/wins_srv.c
+++ b/source/lib/wins_srv.c
@@ -184,11 +184,11 @@ struct in_addr wins_srv_ip( void )
if( now >= entry->mourning ) /* Found a live one. */
{
/* If we don't have the IP, look it up. */
- if( zero_ip( entry->ip_addr ) )
+ if( is_zero_ip( entry->ip_addr ) )
entry->ip_addr = *interpret_addr2( entry->server );
/* If we still don't have the IP then kill it, else return it. */
- if( zero_ip( entry->ip_addr ) )
+ if( is_zero_ip( entry->ip_addr ) )
entry->mourning = now + NECROMANCYCLE;
else
return( entry->ip_addr );
@@ -208,7 +208,7 @@ void wins_srv_died( struct in_addr boothill_ip )
{
list_entry *entry;
- if( zero_ip( boothill_ip ) )
+ if( is_zero_ip( boothill_ip ) )
{
DEBUG( 4, ("wins_srv_died(): Got request to mark zero IP down.\n") );
return;
diff --git a/source/libsmb/cli_dfs.c b/source/libsmb/cli_dfs.c
index 83220fd1afc..312275926c7 100644
--- a/source/libsmb/cli_dfs.c
+++ b/source/libsmb/cli_dfs.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000-2001,
diff --git a/source/libsmb/cli_lsarpc.c b/source/libsmb/cli_lsarpc.c
index 992c5c0439c..3234c366568 100644
--- a/source/libsmb/cli_lsarpc.c
+++ b/source/libsmb/cli_lsarpc.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000-2001,
Copyright (C) Andrew Tridgell 1992-1997,2000,
@@ -25,7 +24,7 @@
#include "includes.h"
-/** @defgroup lsa LSA rpc client routines
+/** @defgroup lsa LSA - Local Security Architecture
* @ingroup rpc_client
*
* @{
@@ -75,7 +74,7 @@ NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Initialise input parameters */
if (sec_qos) {
- init_lsa_sec_qos(&qos, 2, 1, 0, des_access);
+ init_lsa_sec_qos(&qos, 2, 1, 0);
init_q_open_pol(&q, '\\', 0, des_access, &qos);
} else {
init_q_open_pol(&q, '\\', 0, des_access, NULL);
@@ -109,7 +108,10 @@ NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
-/** Open a LSA policy handle */
+/** Open a LSA policy handle
+ *
+ * @param cli Handle on an initialised SMB connection
+ */
NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
BOOL sec_qos, uint32 des_access, POLICY_HND *pol)
@@ -131,11 +133,11 @@ NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Initialise input parameters */
if (sec_qos) {
- init_lsa_sec_qos(&qos, 2, 1, 0, des_access);
- init_q_open_pol2(&q, cli->clnt_name_slash, 0, des_access,
+ init_lsa_sec_qos(&qos, 2, 1, 0);
+ init_q_open_pol2(&q, cli->srv_name_slash, 0, des_access,
&qos);
} else {
- init_q_open_pol2(&q, cli->clnt_name_slash, 0, des_access,
+ init_q_open_pol2(&q, cli->srv_name_slash, 0, des_access,
NULL);
}
@@ -219,7 +221,7 @@ NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, int num_sids, DOM_SID *sids,
- char ***names, uint32 **types, int *num_names)
+ char ***domains, char ***names, uint32 **types)
{
prs_struct qbuf, rbuf;
LSA_Q_LOOKUP_SIDS q;
@@ -263,13 +265,13 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
if (!NT_STATUS_IS_OK(result) &&
- NT_STATUS_V(result) != NT_STATUS_V(NT_STATUS_FILES_OPEN)) {
+ NT_STATUS_V(result) != NT_STATUS_V(STATUS_SOME_UNMAPPED)) {
+
/* An actual error occured */
goto done;
}
-
/* Return output parameters */
if (r.mapped_count == 0) {
@@ -277,23 +279,29 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
- (*num_names) = r.mapped_count;
- result = NT_STATUS_OK;
+ if (!((*domains) = (char **)talloc(mem_ctx, sizeof(char *) *
+ num_sids))) {
+ DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
- if (!((*names) = (char **)talloc(mem_ctx, sizeof(char *) * r.mapped_count))) {
+ if (!((*names) = (char **)talloc(mem_ctx, sizeof(char *) *
+ num_sids))) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_UNSUCCESSFUL;
goto done;
}
- if (!((*types) = (uint32 *)talloc(mem_ctx, sizeof(uint32) * r.mapped_count))) {
+ if (!((*types) = (uint32 *)talloc(mem_ctx, sizeof(uint32) *
+ num_sids))) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_UNSUCCESSFUL;
goto done;
}
- for (i = 0; i < r.mapped_count; i++) {
- fstring name, dom_name, full_name;
+ for (i = 0; i < num_sids; i++) {
+ fstring name, dom_name;
uint32 dom_idx = t_names.name[i].domain_idx;
/* Translate optimised name through domain index array */
@@ -303,13 +311,15 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
unistr2_to_ascii(dom_name, &ref.ref_dom[dom_idx].uni_dom_name, sizeof(dom_name)- 1);
unistr2_to_ascii(name, &t_names.uni_name[i], sizeof(name) - 1);
- slprintf(full_name, sizeof(full_name) - 1,
- "%s%s%s", dom_name,
- (dom_name[0] && name[0]) ?
- lp_winbind_separator() : "", name);
-
- (*names)[i] = talloc_strdup(mem_ctx, full_name);
+ (*names)[i] = talloc_strdup(mem_ctx, name);
+ (*domains)[i] = talloc_strdup(mem_ctx, dom_name);
(*types)[i] = t_names.name[i].sid_name_use;
+
+ if (((*names)[i] == NULL) || ((*domains)[i] == NULL)) {
+ DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
} else {
(*names)[i] = NULL;
@@ -327,8 +337,9 @@ NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/** Lookup a list of names */
NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, int num_names, char **names,
- DOM_SID **sids, uint32 **types, int *num_sids)
+ POLICY_HND *pol, int num_names,
+ const char **names, DOM_SID **sids,
+ uint32 **types)
{
prs_struct qbuf, rbuf;
LSA_Q_LOOKUP_NAMES q;
@@ -367,13 +378,14 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
- if (!NT_STATUS_IS_OK(result)) {
+ if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) !=
+ NT_STATUS_V(STATUS_SOME_UNMAPPED)) {
+
/* An actual error occured */
goto done;
}
-
/* Return output parameters */
if (r.mapped_count == 0) {
@@ -381,22 +393,21 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
- (*num_sids) = r.mapped_count;
- result = NT_STATUS_OK;
-
- if (!((*sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) * r.mapped_count)))) {
+ if (!((*sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) *
+ num_names)))) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_UNSUCCESSFUL;
goto done;
}
- if (!((*types = (uint32 *)talloc(mem_ctx, sizeof(uint32) * r.mapped_count)))) {
+ if (!((*types = (uint32 *)talloc(mem_ctx, sizeof(uint32) *
+ num_names)))) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_UNSUCCESSFUL;
goto done;
}
- for (i = 0; i < r.mapped_count; i++) {
+ for (i = 0; i < num_names; i++) {
DOM_RID2 *t_rids = r.dom_rid;
uint32 dom_idx = t_rids[i].rid_idx;
uint32 dom_rid = t_rids[i].rid;
@@ -426,7 +437,9 @@ NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
-/** Query info policy */
+/** Query info policy
+ *
+ * @param domain_sid - returned remote server's domain sid */
NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
@@ -593,7 +606,7 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx,
unistr2_to_ascii(tmp, &r.uni_domain_name[i],
sizeof(tmp) - 1);
- (*domain_names)[i] = strdup(tmp);
+ (*domain_names)[i] = talloc_strdup(mem_ctx, tmp);
sid_copy(&(*domain_sids)[i], &r.domain_sid[i].sid);
}
}
@@ -785,6 +798,8 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
+ if (r.sids.num_entries==0)
+ goto done;
/* Return output parameters */
@@ -811,6 +826,231 @@ NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
+/** Open a LSA user handle
+ *
+ * @param cli Handle on an initialised SMB connection */
+
+NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access,
+ POLICY_HND *user_pol)
+{
+ prs_struct qbuf, rbuf;
+ LSA_Q_OPENACCOUNT q;
+ LSA_R_OPENACCOUNT r;
+ NTSTATUS result;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ init_lsa_q_open_account(&q, dom_pol, sid, des_access);
+
+ /* Marshall data and send request */
+
+ if (!lsa_io_q_open_account("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, LSA_OPENACCOUNT, &qbuf, &rbuf)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!lsa_io_r_open_account("", &r, &rbuf, 0)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ if (NT_STATUS_IS_OK(result = r.status)) {
+ *user_pol = r.pol;
+ }
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Enumerate user privileges
+ *
+ * @param cli Handle on an initialised SMB connection */
+
+NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 *count, LUID_ATTR **set)
+{
+ prs_struct qbuf, rbuf;
+ LSA_Q_ENUMPRIVSACCOUNT q;
+ LSA_R_ENUMPRIVSACCOUNT r;
+ NTSTATUS result;
+ int i;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ init_lsa_q_enum_privsaccount(&q, pol);
+
+ /* Marshall data and send request */
+
+ if (!lsa_io_q_enum_privsaccount("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, LSA_ENUMPRIVSACCOUNT, &qbuf, &rbuf)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!lsa_io_r_enum_privsaccount("", &r, &rbuf, 0)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ if (!NT_STATUS_IS_OK(result = r.status)) {
+ goto done;
+ }
+
+ if (r.count == 0)
+ goto done;
+
+ if (!((*set = (LUID_ATTR *)talloc(mem_ctx, sizeof(LUID_ATTR) * r.count)))) {
+ DEBUG(0, ("(cli_lsa_enum_privsaccount): out of memory\n"));
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ for (i=0; i<r.count; i++) {
+ (*set)[i].luid.low = r.set.set[i].luid.low;
+ (*set)[i].luid.high = r.set.set[i].luid.high;
+ (*set)[i].attr = r.set.set[i].attr;
+ }
+
+ *count=r.count;
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Get a privilege value given its name */
+
+NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, char *name, LUID *luid)
+{
+ prs_struct qbuf, rbuf;
+ LSA_Q_LOOKUPPRIVVALUE q;
+ LSA_R_LOOKUPPRIVVALUE r;
+ NTSTATUS result;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Marshall data and send request */
+
+ init_lsa_q_lookupprivvalue(&q, pol, name);
+
+ if (!lsa_io_q_lookupprivvalue("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, LSA_LOOKUPPRIVVALUE, &qbuf, &rbuf)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!lsa_io_r_lookupprivvalue("", &r, &rbuf, 0)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ if (!NT_STATUS_IS_OK(result = r.status)) {
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ (*luid).low=r.luid.low;
+ (*luid).high=r.luid.high;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Query LSA security object */
+
+NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 sec_info,
+ SEC_DESC_BUF **psdb)
+{
+ prs_struct qbuf, rbuf;
+ LSA_Q_QUERY_SEC_OBJ q;
+ LSA_R_QUERY_SEC_OBJ r;
+ NTSTATUS result;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Marshall data and send request */
+
+ init_q_query_sec_obj(&q, pol, sec_info);
+
+ if (!lsa_io_q_query_sec_obj("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, LSA_QUERYSECOBJ, &qbuf, &rbuf)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!lsa_io_r_query_sec_obj("", &r, &rbuf, 0)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ if (!NT_STATUS_IS_OK(result = r.status)) {
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ if (psdb)
+ *psdb = r.buf;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
/** Fetch a DOMAIN sid. Does complete cli setup / teardown anonymously. */
BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid)
@@ -839,8 +1079,8 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
}
if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
- DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS \
-session request. Error was %s\n", remote_machine, cli_errstr(&cli) ));
+ DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n",
+ remote_machine));
goto done;
}
diff --git a/source/libsmb/cli_netlogon.c b/source/libsmb/cli_netlogon.c
index 1e4f7955d26..cb438de9873 100644
--- a/source/libsmb/cli_netlogon.c
+++ b/source/libsmb/cli_netlogon.c
@@ -1,10 +1,12 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
NT Domain Authentication SMB / MSRPC client
- Copyright (C) Andrew Tridgell 1994-2000
+ Copyright (C) Andrew Tridgell 1992-2000
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
Copyright (C) Tim Potter 2001
+ Copyright (C) Paul Ashton 1997.
+ Copyright (C) Jeremy Allison 1998.
+ Copyright (C) Andrew Bartlett 2001.
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
@@ -49,7 +51,7 @@ NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal,
/* create and send a MSRPC command with api NET_REQCHAL */
- DEBUG(4,("cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n",
+ DEBUG(4,("new_cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n",
cli->desthost, global_myname, credstr(clnt_chal->data)));
/* store the parameters */
@@ -91,7 +93,8 @@ Ensure that the server credential returned matches the session key
encrypt of the server challenge originally received. JRA.
****************************************************************************/
-NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
+NTSTATUS new_cli_net_auth2(struct cli_state *cli,
+ uint16 sec_chan,
uint32 neg_flags, DOM_CHAL *srv_chal)
{
prs_struct qbuf, rbuf;
@@ -105,7 +108,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
/* create and send a MSRPC command with api NET_AUTH2 */
- DEBUG(4,("cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n",
+ DEBUG(4,("new_cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n",
cli->srv_name_slash, cli->mach_acct, sec_chan, global_myname,
credstr(cli->clnt_cred.challenge.data), neg_flags));
@@ -144,7 +147,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
/*
* Server replied with bad credential. Fail.
*/
- DEBUG(0,("cli_net_auth2: server %s replied with bad credential (bad machine \
+ DEBUG(0,("new_cli_net_auth2: server %s replied with bad credential (bad machine \
password ?).\n", cli->desthost ));
result = NT_STATUS_ACCESS_DENIED;
goto done;
@@ -161,7 +164,8 @@ password ?).\n", cli->desthost ));
/* Initialize domain session credentials */
NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli,
- unsigned char mach_pwd[16])
+ uint16 sec_chan,
+ const unsigned char mach_pwd[16])
{
DOM_CHAL clnt_chal;
DOM_CHAL srv_chal;
@@ -176,14 +180,14 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli,
result = new_cli_net_req_chal(cli, &clnt_chal, &srv_chal);
if (!NT_STATUS_IS_OK(result)) {
- DEBUG(0,("cli_nt_setup_creds: request challenge failed\n"));
+ DEBUG(0,("new_cli_nt_setup_creds: request challenge failed\n"));
return result;
}
/**************** Long-term Session key **************/
/* calculate the session key */
- cred_session_key(&clnt_chal, &srv_chal, (char *)mach_pwd,
+ cred_session_key(&clnt_chal, &srv_chal, mach_pwd,
cli->sess_key);
memset((char *)cli->sess_key+8, '\0', 8);
@@ -199,11 +203,10 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli,
* Receive an auth-2 challenge response and check it.
*/
- result = new_cli_net_auth2(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ?
- SEC_CHAN_WKSTA : SEC_CHAN_BDC, 0x000001ff,
+ result = new_cli_net_auth2(cli, sec_chan, 0x000001ff,
&srv_chal);
if (!NT_STATUS_IS_OK(result)) {
- DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed %s\n",
+ DEBUG(0,("new_cli_nt_setup_creds: auth2 challenge failed %s\n",
get_nt_error_msg(result)));
}
@@ -279,7 +282,7 @@ static void gen_next_creds( struct cli_state *cli, DOM_CRED *new_clnt_cred)
/* Sam synchronisation */
-NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds,
uint32 database_id, uint32 *num_deltas,
SAM_DELTA_HDR **hdr_deltas,
SAM_DELTA_CTR **deltas)
@@ -303,7 +306,7 @@ NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx,
gen_next_creds(cli, &clnt_creds);
init_net_q_sam_sync(&q, cli->srv_name_slash, cli->clnt_name_slash + 2,
- &clnt_creds, database_id);
+ &clnt_creds, ret_creds, database_id);
/* Marshall data and send request */
@@ -327,6 +330,8 @@ NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx,
*hdr_deltas = r.hdr_deltas;
*deltas = r.deltas;
+ memcpy(ret_creds, &r.srv_creds, sizeof(*ret_creds));
+
done:
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
@@ -438,7 +443,7 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
0, /* param_ctrl */
0xdead, 0xbeef, /* LUID? */
username, cli->clnt_name_slash,
- (char *)cli->sess_key, lm_owf_user_pwd,
+ cli->sess_key, lm_owf_user_pwd,
nt_owf_user_pwd);
break;
@@ -450,8 +455,8 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
generate_random_buffer(chal, 8, False);
- SMBencrypt((unsigned char *)password, chal, local_lm_response);
- SMBNTencrypt((unsigned char *)password, chal, local_nt_response);
+ SMBencrypt(password, chal, local_lm_response);
+ SMBNTencrypt(password, chal, local_nt_response);
init_id_info2(&ctr.auth.id2, lp_workgroup(),
0, /* param_ctrl */
@@ -490,5 +495,186 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
result = r.status;
done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
return result;
}
+
+/**
+ * Logon domain user with an 'network' SAM logon
+ *
+ * @param info3 Pointer to a NET_USER_INFO_3 already allocated by the caller.
+ **/
+
+NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ const char *username, const char *domain, const char *workstation,
+ const uint8 chal[8],
+ DATA_BLOB lm_response, DATA_BLOB nt_response,
+ NET_USER_INFO_3 *info3)
+
+{
+ prs_struct qbuf, rbuf;
+ NET_Q_SAM_LOGON q;
+ NET_R_SAM_LOGON r;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DOM_CRED clnt_creds, dummy_rtn_creds;
+ NET_ID_INFO_CTR ctr;
+ extern pstring global_myname;
+ int validation_level = 3;
+ char *workstation_name_slash;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ workstation_name_slash = talloc_asprintf(mem_ctx, "\\\\%s", workstation);
+
+ if (!workstation_name_slash) {
+ DEBUG(0, ("talloc_asprintf failed!\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ gen_next_creds(cli, &clnt_creds);
+
+ q.validation_level = validation_level;
+
+ memset(&dummy_rtn_creds, '\0', sizeof(dummy_rtn_creds));
+ dummy_rtn_creds.timestamp.time = time(NULL);
+
+ ctr.switch_value = NET_LOGON_TYPE;
+
+ init_id_info2(&ctr.auth.id2, domain,
+ 0, /* param_ctrl */
+ 0xdead, 0xbeef, /* LUID? */
+ username, workstation_name_slash, (const uchar*)chal,
+ lm_response.data, lm_response.length, nt_response.data, nt_response.length);
+
+ init_sam_info(&q.sam_id, cli->srv_name_slash, global_myname,
+ &clnt_creds, &dummy_rtn_creds, NET_LOGON_TYPE,
+ &ctr);
+
+ /* Marshall data and send request */
+
+ if (!net_io_q_sam_logon("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, NET_SAMLOGON, &qbuf, &rbuf)) {
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ r.user = info3;
+
+ if (!net_io_r_sam_logon("", &r, &rbuf, 0)) {
+ goto done;
+ }
+
+ /* Return results */
+
+ result = r.status;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+#if 0 /* JERRY */
+
+/*
+ * Still using old implementation in rpc_client/cli_netlogon.c
+ */
+
+/***************************************************************************
+LSA Server Password Set.
+****************************************************************************/
+
+ NTSTATUS cli_net_srv_pwset(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ char* machine_name, uint8 hashed_mach_pwd[16])
+{
+ prs_struct rbuf;
+ prs_struct qbuf;
+ DOM_CRED new_clnt_cred;
+ NET_Q_SRV_PWSET q_s;
+ uint16 sec_chan_type = 2;
+ NTSTATUS nt_status;
+ char *mach_acct;
+
+ gen_next_creds( cli, &new_clnt_cred);
+
+ prs_init(&qbuf , 1024, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* create and send a MSRPC command with api NET_SRV_PWSET */
+
+ mach_acct = talloc_asprintf(mem_ctx, "%s$", machine_name);
+
+ if (!mach_acct) {
+ DEBUG(0,("talloc_asprintf failed!\n"));
+ nt_status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+
+ DEBUG(4,("cli_net_srv_pwset: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n",
+ cli->srv_name_slash, mach_acct, sec_chan_type, machine_name,
+ credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time));
+
+ /* store the parameters */
+ init_q_srv_pwset(&q_s, cli->srv_name_slash, cli->sess_key,
+ mach_acct, sec_chan_type, machine_name,
+ &new_clnt_cred, (char *)hashed_mach_pwd);
+
+ /* turn parameters into data stream */
+ if(!net_io_q_srv_pwset("", &q_s, &qbuf, 0)) {
+ DEBUG(0,("cli_net_srv_pwset: Error : failed to marshall NET_Q_SRV_PWSET struct.\n"));
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* send the data on \PIPE\ */
+ if (rpc_api_pipe_req(cli, NET_SRVPWSET, &qbuf, &rbuf))
+ {
+ NET_R_SRV_PWSET r_s;
+
+ if (!net_io_r_srv_pwset("", &r_s, &rbuf, 0)) {
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ nt_status = r_s.status;
+
+ if (!NT_STATUS_IS_OK(r_s.status))
+ {
+ /* report error code */
+ DEBUG(0,("cli_net_srv_pwset: %s\n", nt_errstr(nt_status)));
+ goto done;
+ }
+
+ /* Update the credentials. */
+ if (!clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &(r_s.srv_cred)))
+ {
+ /*
+ * Server replied with bad credential. Fail.
+ */
+ DEBUG(0,("cli_net_srv_pwset: server %s replied with bad credential (bad machine \
+password ?).\n", cli->desthost ));
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ }
+ }
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return nt_status;
+}
+
+#endif /* JERRY */
+
diff --git a/source/libsmb/cli_reg.c b/source/libsmb/cli_reg.c
index b88b3532ef7..c09ccabb29f 100644
--- a/source/libsmb/cli_reg.c
+++ b/source/libsmb/cli_reg.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC Pipe client
Copyright (C) Andrew Tridgell 1992-1998,
diff --git a/source/libsmb/cli_samr.c b/source/libsmb/cli_samr.c
index 4a04d678876..e5ddc8f7bd1 100644
--- a/source/libsmb/cli_samr.c
+++ b/source/libsmb/cli_samr.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000-2001,
Copyright (C) Andrew Tridgell 1992-1997,2000,
@@ -407,6 +406,55 @@ NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
+/* Query user aliases */
+
+NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid,
+ uint32 *num_aliases, uint32 **als_rids)
+{
+ prs_struct qbuf, rbuf;
+ SAMR_Q_QUERY_USERALIASES q;
+ SAMR_R_QUERY_USERALIASES r;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ uint ptr=1;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Marshall data and send request */
+
+ init_samr_q_query_useraliases(&q, user_pol, num_sids, &ptr, sid);
+
+ if (!samr_io_q_query_useraliases("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SAMR_QUERY_USERALIASES, &qbuf, &rbuf)) {
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!samr_io_r_query_useraliases("", &r, &rbuf, 0)) {
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ if (NT_STATUS_IS_OK(result = r.status)) {
+ *num_aliases = r.num_entries;
+ *als_rids = r.rid;
+ }
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
/* Query user groups */
NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
@@ -534,6 +582,84 @@ NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
+/* Enumerate domain groups */
+
+NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 *start_idx,
+ uint32 size, struct acct_info **dom_groups,
+ uint32 *num_dom_groups)
+{
+ prs_struct qbuf, rbuf;
+ SAMR_Q_ENUM_DOM_ALIASES q;
+ SAMR_R_ENUM_DOM_ALIASES r;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ uint32 name_idx, i;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Marshall data and send request */
+
+ init_samr_q_enum_dom_aliases(&q, pol, *start_idx, size);
+
+ if (!samr_io_q_enum_dom_aliases("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SAMR_ENUM_DOM_ALIASES, &qbuf, &rbuf)) {
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!samr_io_r_enum_dom_aliases("", &r, &rbuf, 0)) {
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ if (!NT_STATUS_IS_OK(result) &&
+ NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) {
+ goto done;
+ }
+
+ *num_dom_groups = r.num_entries2;
+
+ if (!((*dom_groups) = (struct acct_info *)
+ talloc(mem_ctx, sizeof(struct acct_info) * *num_dom_groups))) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ memset(*dom_groups, 0, sizeof(struct acct_info) * *num_dom_groups);
+
+ name_idx = 0;
+
+ for (i = 0; i < *num_dom_groups; i++) {
+
+ (*dom_groups)[i].rid = r.sam[i].rid;
+
+ if (r.sam[i].hdr_name.buffer) {
+ unistr2_to_ascii((*dom_groups)[i].acct_name,
+ &r.uni_grp_name[name_idx],
+ sizeof(fstring) - 1);
+ name_idx++;
+ }
+
+ *start_idx = r.next_idx;
+ }
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
/* Query alias members */
NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
@@ -1082,3 +1208,49 @@ NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
+
+/* Query user security object */
+
+NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *user_pol, uint16 switch_value,
+ TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf)
+{
+ prs_struct qbuf, rbuf;
+ SAMR_Q_QUERY_SEC_OBJ q;
+ SAMR_R_QUERY_SEC_OBJ r;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Marshall data and send request */
+
+ init_samr_q_query_sec_obj(&q, user_pol, switch_value);
+
+ if (!samr_io_q_query_sec_obj("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SAMR_QUERY_SEC_OBJECT, &qbuf, &rbuf)) {
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!samr_io_r_query_sec_obj("", &r, &rbuf, 0)) {
+ goto done;
+ }
+
+ /* Return output parameters */
+
+ result = r.status;
+ *sec_desc_buf=dup_sec_desc_buf(ctx, r.buf);
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
diff --git a/source/libsmb/cli_spoolss.c b/source/libsmb/cli_spoolss.c
index 16a95b69e17..c56ecf05f80 100644
--- a/source/libsmb/cli_spoolss.c
+++ b/source/libsmb/cli_spoolss.c
@@ -1,13 +1,12 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
- Copyright (C) Gerald Carter 2001,
- Copyright (C) Tim Potter 2000,
- Copyright (C) Andrew Tridgell 1994-2000
- Copyright (C) Luke Kenneth Casson Leighton 1996-2000
- Copyright (C) Jean-Francois Micouleau 1999-2000
+ Copyright (C) Gerald Carter 2001-2002,
+ Copyright (C) Tim Potter 2000-2002,
+ Copyright (C) Andrew Tridgell 1994-2000,
+ Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
+ Copyright (C) Jean-Francois Micouleau 1999-2000.
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
@@ -26,9 +25,19 @@
#include "includes.h"
-extern pstring global_myname;
-
-/* Opens a SMB connection to the SPOOLSS pipe */
+/** @defgroup spoolss SPOOLSS - NT printing routines
+ * @ingroup rpc_client
+ *
+ * @{
+ **/
+
+/** Opens a SMB connection and connects to the SPOOLSS pipe.
+ *
+ * @param cli Uninitialised client handle.
+ * @param system_name NETBIOS name of the machine to connect to.
+ * @param creds User credentials to connect as.
+ * @returns Initialised client handle.
+ */
struct cli_state *cli_spoolss_initialise(struct cli_state *cli,
char *system_name,
struct ntuser_creds *creds)
@@ -36,126 +45,10 @@ struct cli_state *cli_spoolss_initialise(struct cli_state *cli,
return cli_pipe_initialise(cli, system_name, PIPE_SPOOLSS, creds);
}
-/* Open printer ex */
-
-NTSTATUS cli_spoolss_open_printer_ex(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- char *printername,
- char *datatype,
- uint32 access_required,
- char *station,
- char *username,
- POLICY_HND *pol
-)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_OPEN_PRINTER_EX q;
- SPOOL_R_OPEN_PRINTER_EX r;
- NTSTATUS result;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise parse structures */
-
- prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
-
- /* Initialise input parameters */
-
- make_spoolss_q_open_printer_ex(&q, printername, datatype,
- access_required, station, username);
-
- /* Marshall data and send request */
-
- if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) {
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- /* Unmarshall response */
-
- if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) {
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- /* Return output parameters */
-
- if (W_ERROR_IS_OK(r.status)) {
- result = NT_STATUS_OK;
- *pol = r.handle;
- } else {
- result = werror_to_ntstatus(r.status);
- }
-
- done:
- prs_mem_free(&qbuf);
- prs_mem_free(&rbuf);
-
- return result;
-}
-
-/* Close a printer handle */
-
-NTSTATUS cli_spoolss_close_printer(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *pol
-)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_CLOSEPRINTER q;
- SPOOL_R_CLOSEPRINTER r;
- NTSTATUS result;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Initialise parse structures */
-
- prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
-
- /* Initialise input parameters */
-
- make_spoolss_q_closeprinter(&q, pol);
-
- /* Marshall data and send request */
-
- if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) {
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- /* Unmarshall response */
-
- if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) {
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- /* Return output parameters */
-
- if (W_ERROR_IS_OK(r.status)) {
- *pol = r.handle;
- result = NT_STATUS_OK;
- } else {
- result = werror_to_ntstatus(r.status);
- }
-
- done:
- prs_mem_free(&qbuf);
- prs_mem_free(&rbuf);
-
- return result;
-}
-
-/* Initialize a spoolss NEW_BUFFER */
+/**********************************************************************
+ Initialize a new spoolss buff for use by a client rpc
+**********************************************************************/
static void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx)
{
buffer->ptr = (size != 0);
@@ -165,15 +58,14 @@ static void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx)
buffer->struct_start = prs_offset(&buffer->prs);
}
-/* Decode various printer info levels - perhaps this should live in
- parse_spoolss.c? */
+/*********************************************************************
+ Decode various spoolss rpc's and info levels
+ ********************************************************************/
-static void decode_printer_info_0(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- PRINTER_INFO_0 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_info_0(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PRINTER_INFO_0 **info)
{
uint32 i;
PRINTER_INFO_0 *inf;
@@ -189,12 +81,10 @@ static void decode_printer_info_0(
*info=inf;
}
-static void decode_printer_info_1(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- PRINTER_INFO_1 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PRINTER_INFO_1 **info)
{
uint32 i;
PRINTER_INFO_1 *inf;
@@ -210,12 +100,10 @@ static void decode_printer_info_1(
*info=inf;
}
-static void decode_printer_info_2(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- PRINTER_INFO_2 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PRINTER_INFO_2 **info)
{
uint32 i;
PRINTER_INFO_2 *inf;
@@ -233,12 +121,10 @@ static void decode_printer_info_2(
*info=inf;
}
-static void decode_printer_info_3(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- PRINTER_INFO_3 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_info_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PRINTER_INFO_3 **info)
{
uint32 i;
PRINTER_INFO_3 *inf;
@@ -256,14 +142,9 @@ static void decode_printer_info_3(
}
/**********************************************************************
- Decode a PORT_INFO_1 struct from a NEW_BUFFER
**********************************************************************/
-static void decode_port_info_1(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- PORT_INFO_1 **info
-)
+static void decode_port_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PORT_INFO_1 **info)
{
uint32 i;
PORT_INFO_1 *inf;
@@ -280,13 +161,9 @@ static void decode_port_info_1(
}
/**********************************************************************
- Decode a PORT_INFO_2 struct from a NEW_BUFFER
**********************************************************************/
-static void decode_port_info_2(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- PORT_INFO_2 **info)
+static void decode_port_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, PORT_INFO_2 **info)
{
uint32 i;
PORT_INFO_2 *inf;
@@ -302,12 +179,10 @@ static void decode_port_info_2(
*info=inf;
}
-static void decode_printer_driver_1(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- DRIVER_INFO_1 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_driver_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, DRIVER_INFO_1 **info)
{
uint32 i;
DRIVER_INFO_1 *inf;
@@ -323,12 +198,10 @@ static void decode_printer_driver_1(
*info=inf;
}
-static void decode_printer_driver_2(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- DRIVER_INFO_2 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_driver_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, DRIVER_INFO_2 **info)
{
uint32 i;
DRIVER_INFO_2 *inf;
@@ -344,12 +217,10 @@ static void decode_printer_driver_2(
*info=inf;
}
-static void decode_printer_driver_3(
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- DRIVER_INFO_3 **info
-)
+/**********************************************************************
+**********************************************************************/
+static void decode_printer_driver_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, DRIVER_INFO_3 **info)
{
uint32 i;
DRIVER_INFO_3 *inf;
@@ -365,11 +236,10 @@ static void decode_printer_driver_3(
*info=inf;
}
-static void decode_printerdriverdir_1 (
- TALLOC_CTX *mem_ctx,
- NEW_BUFFER *buffer,
- uint32 returned,
- DRIVER_DIRECTORY_1 **info
+/**********************************************************************
+**********************************************************************/
+static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 returned, DRIVER_DIRECTORY_1 **info
)
{
DRIVER_DIRECTORY_1 *inf;
@@ -383,24 +253,169 @@ static void decode_printerdriverdir_1 (
*info=inf;
}
+/** Return a handle to the specified printer or print server.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ *
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param printername The name of the printer or print server to be
+ * opened in UNC format.
+ *
+ * @param datatype Specifies the default data type for the printer.
+ *
+ * @param access_required The access rights requested on the printer or
+ * print server.
+ *
+ * @param station The UNC name of the requesting workstation.
+ *
+ * @param username The name of the user requesting the open.
+ *
+ * @param pol Returned policy handle.
+ */
+
+/*********************************************************************************
+ Win32 API - OpenPrinter()
+ ********************************************************************************/
+
+WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ char *printername, char *datatype, uint32 access_required,
+ char *station, char *username, POLICY_HND *pol)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_OPEN_PRINTER_EX q;
+ SPOOL_R_OPEN_PRINTER_EX r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
-/* Enumerate printers */
+ /* Initialise parse structures */
-NTSTATUS cli_spoolss_enum_printers(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 flags,
- uint32 level,
- int *returned,
- PRINTER_INFO_CTR *ctr
-)
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ make_spoolss_q_open_printer_ex(&q, printername, datatype,
+ access_required, station, username);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0))
+ goto done;
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ if (W_ERROR_IS_OK(result))
+ *pol = r.handle;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Close a printer handle
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ *
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param pol Policy handle of printer or print server to close.
+ */
+/*********************************************************************************
+ Win32 API - ClosePrinter()
+ ********************************************************************************/
+
+WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_CLOSEPRINTER q;
+ SPOOL_R_CLOSEPRINTER r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ make_spoolss_q_closeprinter(&q, pol);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0))
+ goto done;
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ if (W_ERROR_IS_OK(result))
+ *pol = r.handle;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Enumerate printers on a print server.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param offered Buffer size offered in the request.
+ * @param needed Number of bytes needed to complete the request.
+ * may be NULL.
+ *
+ * @param flags Selected from PRINTER_ENUM_* flags.
+ * @param level Request information level.
+ *
+ * @param num_printers Pointer to number of printers returned. May be
+ * NULL.
+ * @param ctr Return structure for printer information. May
+ * be NULL.
+ */
+/*********************************************************************************
+ Win32 API - EnumPrinters()
+ ********************************************************************************/
+
+WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 flags, uint32 level,
+ uint32 *num_printers, PRINTER_INFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_ENUMPRINTERS q;
SPOOL_R_ENUMPRINTERS r;
NEW_BUFFER buffer;
- uint32 needed = 0x1068;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -409,39 +424,47 @@ NTSTATUS cli_spoolss_enum_printers(
fstrcpy (server, cli->desthost);
strupper (server);
- do {
/* Initialise input parameters */
- init_buffer(&buffer, needed, mem_ctx);
+ init_buffer(&buffer, offered, mem_ctx);
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
make_spoolss_q_enumprinters(&q, flags, server, level, &buffer,
- needed);
+ offered);
/* Marshall data and send request */
if (!spoolss_io_q_enumprinters("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERS, &qbuf, &rbuf)) {
- result = NT_STATUS_UNSUCCESSFUL;
+ !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERS, &qbuf, &rbuf))
goto done;
- }
/* Unmarshall response */
+
if (spoolss_io_r_enumprinters("", &r, &rbuf, 0)) {
- needed = r.needed;
+ if (needed)
+ *needed = r.needed;
}
- result = werror_to_ntstatus(r.status);
+ result = r.status;
- if (NT_STATUS_V(result)==NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER) || !W_ERROR_IS_OK(result))
+ /* Return output parameters */
+
+ if (!W_ERROR_IS_OK(r.status))
goto done;
- /* Return output parameters */
+ if (num_printers)
+ *num_printers = r.returned;
+
+ if (!ctr)
+ goto done;
- if ((*returned = r.returned)) {
switch (level) {
+ case 0:
+ decode_printer_info_0(mem_ctx, r.buffer, r.returned,
+ &ctr->printers_0);
+ break;
case 1:
decode_printer_info_1(mem_ctx, r.buffer, r.returned,
&ctr->printers_1);
@@ -455,32 +478,43 @@ NTSTATUS cli_spoolss_enum_printers(
&ctr->printers_3);
break;
}
- }
done:
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
- } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
-
return result;
}
-/* Enumerate printer ports */
-NTSTATUS cli_spoolss_enum_ports(
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- int *returned,
- PORT_INFO_CTR *ctr
-)
+/*********************************************************************************
+ Win32 API - EnumPorts()
+ ********************************************************************************/
+/** Enumerate printer ports on a print server.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param offered Buffer size offered in the request.
+ * @param needed Number of bytes needed to complete the request.
+ * May be NULL.
+ *
+ * @param level Requested information level.
+ *
+ * @param num_ports Pointer to number of ports returned. May be NULL.
+ * @param ctr Pointer to structure holding port information.
+ * May be NULL.
+ */
+
+WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 level, int *num_ports, PORT_INFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_ENUMPORTS q;
SPOOL_R_ENUMPORTS r;
NEW_BUFFER buffer;
- uint32 needed = 100;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -489,36 +523,40 @@ NTSTATUS cli_spoolss_enum_ports(
slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
strupper (server);
- do {
/* Initialise input parameters */
- init_buffer(&buffer, needed, mem_ctx);
+ init_buffer(&buffer, offered, mem_ctx);
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
- make_spoolss_q_enumports(&q, server, level, &buffer, needed);
+ make_spoolss_q_enumports(&q, server, level, &buffer, offered);
/* Marshall data and send request */
if (!spoolss_io_q_enumports("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req(cli, SPOOLSS_ENUMPORTS, &qbuf, &rbuf)) {
- result = NT_STATUS_UNSUCCESSFUL;
+ !rpc_api_pipe_req(cli, SPOOLSS_ENUMPORTS, &qbuf, &rbuf))
goto done;
- }
/* Unmarshall response */
+
if (spoolss_io_r_enumports("", &r, &rbuf, 0)) {
- needed = r.needed;
+ if (needed)
+ *needed = r.needed;
}
+ result = r.status;
+
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
- if (NT_STATUS_IS_OK(result) &&
- r.returned > 0) {
+ if (!W_ERROR_IS_OK(result))
+ goto done;
- *returned = r.returned;
+ if (num_ports)
+ *num_ports = r.returned;
+
+ if (!ctr)
+ goto done;
switch (level) {
case 1:
@@ -530,56 +568,58 @@ NTSTATUS cli_spoolss_enum_ports(
&ctr->port.info_2);
break;
}
- }
done:
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
- } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
-
return result;
}
-/* Get printer info */
-NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr)
+/*********************************************************************************
+ Win32 API - GetPrinter()
+ ********************************************************************************/
+
+WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *pol, uint32 level,
+ PRINTER_INFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETPRINTER q;
SPOOL_R_GETPRINTER r;
NEW_BUFFER buffer;
- uint32 needed = 0x1068;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
ZERO_STRUCT(q);
ZERO_STRUCT(r);
- do {
/* Initialise input parameters */
- init_buffer(&buffer, needed, mem_ctx);
+ init_buffer(&buffer, offered, mem_ctx);
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
- make_spoolss_q_getprinter(mem_ctx, &q, pol, level, &buffer, needed);
+ make_spoolss_q_getprinter(mem_ctx, &q, pol, level, &buffer, offered);
/* Marshall data and send request */
+
if (!spoolss_io_q_getprinter("", &q, &qbuf, 0) ||
!rpc_api_pipe_req(cli, SPOOLSS_GETPRINTER, &qbuf, &rbuf))
- {
- result = NT_STATUS_UNSUCCESSFUL;
goto done;
- }
/* Unmarshall response */
- if (spoolss_io_r_getprinter("", &r, &rbuf, 0)) {
- needed = r.needed;
- }
+
+ if (!spoolss_io_r_getprinter("", &r, &rbuf, 0))
+ goto done;
+
+ if (needed)
+ *needed = r.needed;
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
+
+ result = r.status;
if (NT_STATUS_IS_OK(result)) {
switch (level) {
@@ -602,22 +642,35 @@ NTSTATUS cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
- } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
-
return result;
}
-/**********************************************************************
- * Set printer info
+/*********************************************************************************
+ Win32 API - SetPrinter()
+ ********************************************************************************/
+/** Set printer info
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param pol Policy handle on printer to set info.
+ * @param level Information level to set.
+ * @param ctr Pointer to structure holding printer information.
+ * @param command Specifies the action performed. See
+ * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_13ua.asp
+ * for details.
+ *
*/
-NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 level, PRINTER_INFO_CTR *ctr,
- uint32 command)
+
+WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 level,
+ PRINTER_INFO_CTR *ctr, uint32 command)
{
prs_struct qbuf, rbuf;
SPOOL_Q_SETPRINTER q;
SPOOL_R_SETPRINTER r;
- NTSTATUS result = NT_STATUS_ACCESS_DENIED;
+ WERROR result = W_ERROR(ERRgeneral);
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -629,20 +682,17 @@ NTSTATUS cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
make_spoolss_q_setprinter(mem_ctx, &q, pol, level, ctr, command);
/* Marshall data and send request */
+
if (!spoolss_io_q_setprinter("", &q, &qbuf, 0) ||
!rpc_api_pipe_req(cli, SPOOLSS_SETPRINTER, &qbuf, &rbuf))
- {
- result = NT_STATUS_ACCESS_DENIED;
goto done;
- }
/* Unmarshall response */
+
if (!spoolss_io_r_setprinter("", &r, &rbuf, 0))
- {
goto done;
- }
- result = werror_to_ntstatus(r.status);
+ result = r.status;
done:
prs_mem_free(&qbuf);
@@ -652,19 +702,39 @@ done:
return result;
}
-/**********************************************************************
- * Get installed printer drivers for a given printer
+/*********************************************************************************
+ Win32 API - GetPrinterDriver()
+ ********************************************************************************/
+/** Get installed printer drivers for a given printer
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ *
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param offered Buffer size offered in the request.
+ * @param needed Number of bytes needed to complete the request.
+ * may be NULL.
+ *
+ * @param pol Pointer to an open policy handle for the printer
+ * opened with cli_spoolss_open_printer_ex().
+ * @param level Requested information level.
+ * @param env The print environment or archictecture. This is
+ * "Windows NT x86" for NT4.
+ * @param ctr Returned printer driver information.
*/
-NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 level, char* env,
- PRINTER_DRIVER_CTR *ctr)
+
+WERROR cli_spoolss_getprinterdriver(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *pol, uint32 level,
+ char *env, PRINTER_DRIVER_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETPRINTERDRIVER2 q;
SPOOL_R_GETPRINTERDRIVER2 r;
NEW_BUFFER buffer;
- uint32 needed = 0x1068;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -673,40 +743,40 @@ NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ct
fstrcpy (server, cli->desthost);
strupper (server);
- do
- {
/* Initialise input parameters */
- init_buffer(&buffer, needed, mem_ctx);
+ init_buffer(&buffer, offered, mem_ctx);
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+ make_spoolss_q_getprinterdriver2(&q, pol, env, level, 2, 2,
+ &buffer, offered);
- /* write the request */
- make_spoolss_q_getprinterdriver2(&q, pol, env, level, 2, 2, &buffer, needed);
+ /* Marshall data and send request */
- /* Marshall data and send request */
if (!spoolss_io_q_getprinterdriver2 ("", &q, &qbuf, 0) ||
!rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVER2, &qbuf, &rbuf))
- {
- result = NT_STATUS_UNSUCCESSFUL;
goto done;
- }
/* Unmarshall response */
- if (spoolss_io_r_getprinterdriver2 ("", &r, &rbuf, 0))
- {
- needed = r.needed;
+
+ if (spoolss_io_r_getprinterdriver2 ("", &r, &rbuf, 0)) {
+ if (needed)
+ *needed = r.needed;
}
+ result = r.status;
+
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
- if (NT_STATUS_IS_OK(result))
- {
- switch (level)
- {
+ if (!W_ERROR_IS_OK(result))
+ goto done;
+
+ if (!ctr)
+ goto done;
+
+ switch (level) {
case 1:
decode_printer_driver_1(mem_ctx, r.buffer, 1, &ctr->info1);
break;
@@ -717,35 +787,32 @@ NTSTATUS cli_spoolss_getprinterdriver (struct cli_state *cli, TALLOC_CTX *mem_ct
decode_printer_driver_3(mem_ctx, r.buffer, 1, &ctr->info3);
break;
}
- }
done:
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
- } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
-
return result;
}
+/*********************************************************************************
+ Win32 API - EnumPrinterDrivers()
+ ********************************************************************************/
/**********************************************************************
* Get installed printer drivers for a given printer
*/
-NTSTATUS cli_spoolss_enumprinterdrivers (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- char* env,
- uint32 *returned,
- PRINTER_DRIVER_CTR *ctr
-)
+WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 level, char *env,
+ uint32 *num_drivers,
+ PRINTER_DRIVER_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_ENUMPRINTERDRIVERS q;
SPOOL_R_ENUMPRINTERDRIVERS r;
NEW_BUFFER buffer;
- uint32 needed = 0;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -754,41 +821,43 @@ NTSTATUS cli_spoolss_enumprinterdrivers (
slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
strupper (server);
- do
- {
/* Initialise input parameters */
- init_buffer(&buffer, needed, mem_ctx);
+
+ init_buffer(&buffer, offered, mem_ctx);
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+ /* Write the request */
- /* write the request */
- make_spoolss_q_enumprinterdrivers(&q, server, env, level, &buffer, needed);
+ make_spoolss_q_enumprinterdrivers(&q, server, env, level, &buffer,
+ offered);
/* Marshall data and send request */
+
if (!spoolss_io_q_enumprinterdrivers ("", &q, &qbuf, 0) ||
!rpc_api_pipe_req (cli, SPOOLSS_ENUMPRINTERDRIVERS, &qbuf, &rbuf))
- {
- result = NT_STATUS_UNSUCCESSFUL;
goto done;
- }
/* Unmarshall response */
- if (spoolss_io_r_enumprinterdrivers ("", &r, &rbuf, 0))
- {
- needed = r.needed;
- }
+
+ if (!spoolss_io_r_enumprinterdrivers ("", &r, &rbuf, 0))
+ goto done;
+
+ if (needed)
+ *needed = r.needed;
+
+ if (num_drivers)
+ *num_drivers = r.returned;
+
+ result = r.status;
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
- if (NT_STATUS_IS_OK(result) &&
- (r.returned != 0))
- {
- *returned = r.returned;
-
- switch (level)
- {
+
+ if (W_ERROR_IS_OK(result) && (r.returned != 0)) {
+ *num_drivers = r.returned;
+
+ switch (level) {
case 1:
decode_printer_driver_1(mem_ctx, r.buffer, r.returned, &ctr->info1);
break;
@@ -805,29 +874,27 @@ NTSTATUS cli_spoolss_enumprinterdrivers (
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
- } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
-
return result;
}
+/*********************************************************************************
+ Win32 API - GetPrinterDriverDirectory()
+ ********************************************************************************/
/**********************************************************************
* Get installed printer drivers for a given printer
*/
-NTSTATUS cli_spoolss_getprinterdriverdir (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- char* env,
- DRIVER_DIRECTORY_CTR *ctr
-)
+WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ uint32 level, char *env,
+ DRIVER_DIRECTORY_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETPRINTERDRIVERDIR q;
SPOOL_R_GETPRINTERDRIVERDIR r;
NEW_BUFFER buffer;
- uint32 needed = 100;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -836,40 +903,41 @@ NTSTATUS cli_spoolss_getprinterdriverdir (
slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
strupper (server);
- do
- {
/* Initialise input parameters */
- init_buffer(&buffer, needed, mem_ctx);
+
+ init_buffer(&buffer, offered, mem_ctx);
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+ /* Write the request */
- /* write the request */
- make_spoolss_q_getprinterdriverdir(&q, server, env, level, &buffer, needed);
+ make_spoolss_q_getprinterdriverdir(&q, server, env, level, &buffer,
+ offered);
/* Marshall data and send request */
+
if (!spoolss_io_q_getprinterdriverdir ("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVERDIRECTORY, &qbuf, &rbuf))
- {
- result = NT_STATUS_UNSUCCESSFUL;
+ !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVERDIRECTORY,
+ &qbuf, &rbuf))
goto done;
- }
/* Unmarshall response */
- if (spoolss_io_r_getprinterdriverdir ("", &r, &rbuf, 0))
- {
- needed = r.needed;
+
+ if (spoolss_io_r_getprinterdriverdir ("", &r, &rbuf, 0)) {
+ if (needed)
+ *needed = r.needed;
}
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
- if (NT_STATUS_IS_OK(result))
- {
- switch (level)
- {
+
+ result = r.status;
+
+ if (W_ERROR_IS_OK(result)) {
+ switch (level) {
case 1:
- decode_printerdriverdir_1(mem_ctx, r.buffer, 1, &ctr->info1);
+ decode_printerdriverdir_1(mem_ctx, r.buffer, 1,
+ &ctr->info1);
break;
}
}
@@ -878,25 +946,23 @@ NTSTATUS cli_spoolss_getprinterdriverdir (
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
- } while (NT_STATUS_V(result) == NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
-
return result;
}
+/*********************************************************************************
+ Win32 API - AddPrinterDriver()
+ ********************************************************************************/
/**********************************************************************
* Install a printer driver
*/
-NTSTATUS cli_spoolss_addprinterdriver (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- PRINTER_DRIVER_CTR *ctr
-)
+WERROR cli_spoolss_addprinterdriver (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, uint32 level,
+ PRINTER_DRIVER_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_ADDPRINTERDRIVER q;
SPOOL_R_ADDPRINTERDRIVER r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -909,28 +975,24 @@ NTSTATUS cli_spoolss_addprinterdriver (
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+ /* Write the request */
- /* write the request */
make_spoolss_q_addprinterdriver (mem_ctx, &q, server, level, ctr);
/* Marshall data and send request */
- result = NT_STATUS_UNSUCCESSFUL;
+
if (!spoolss_io_q_addprinterdriver ("", &q, &qbuf, 0) ||
!rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTERDRIVER, &qbuf, &rbuf))
- {
goto done;
- }
-
/* Unmarshall response */
- result = NT_STATUS_UNSUCCESSFUL;
+
if (!spoolss_io_r_addprinterdriver ("", &r, &rbuf, 0))
- {
goto done;
- }
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
+
+ result = r.status;
done:
prs_mem_free(&qbuf);
@@ -939,20 +1001,19 @@ done:
return result;
}
+/*********************************************************************************
+ Win32 API - AddPrinter()
+ ********************************************************************************/
/**********************************************************************
- * Install a printer
+ * Install a printer
*/
-NTSTATUS cli_spoolss_addprinterex (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- uint32 level,
- PRINTER_INFO_CTR *ctr
-)
+WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 level, PRINTER_INFO_CTR*ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_ADDPRINTEREX q;
SPOOL_R_ADDPRINTEREX r;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server,
client,
user;
@@ -966,56 +1027,53 @@ NTSTATUS cli_spoolss_addprinterex (
strupper (server);
fstrcpy (user, cli->user_name);
-
/* Initialise input parameters */
+
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+ /* Write the request */
- /* write the request */
- make_spoolss_q_addprinterex (mem_ctx, &q, server, client, user, level, ctr);
+ make_spoolss_q_addprinterex (mem_ctx, &q, server, client, user,
+ level, ctr);
/* Marshall data and send request */
- result = NT_STATUS_UNSUCCESSFUL;
+
if (!spoolss_io_q_addprinterex ("", &q, &qbuf, 0) ||
!rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTEREX, &qbuf, &rbuf))
- {
goto done;
- }
-
/* Unmarshall response */
- result = NT_STATUS_UNSUCCESSFUL;
+
if (!spoolss_io_r_addprinterex ("", &r, &rbuf, 0))
- {
goto done;
- }
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
-done:
+ result = r.status;
+
+ done:
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
return result;
}
+/*********************************************************************************
+ Win32 API - DeltePrinterDriver()
+ ********************************************************************************/
/**********************************************************************
* Delete a Printer Driver from the server (does not remove
* the driver files
*/
-NTSTATUS cli_spoolss_deleteprinterdriver (
- struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- char *arch,
- char *driver
-)
+WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, char *arch,
+ char *driver)
{
prs_struct qbuf, rbuf;
SPOOL_Q_DELETEPRINTERDRIVER q;
SPOOL_R_DELETEPRINTERDRIVER r;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
fstring server;
ZERO_STRUCT(q);
@@ -1029,90 +1087,321 @@ NTSTATUS cli_spoolss_deleteprinterdriver (
slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
strupper (server);
- /* write the request */
- make_spoolss_q_deleteprinterdriver (mem_ctx, &q, server, arch, driver);
+ /* Write the request */
+
+ make_spoolss_q_deleteprinterdriver(mem_ctx, &q, server, arch, driver);
/* Marshall data and send request */
- result = NT_STATUS_UNSUCCESSFUL;
+
if (!spoolss_io_q_deleteprinterdriver ("", &q, &qbuf, 0) ||
!rpc_api_pipe_req (cli,SPOOLSS_DELETEPRINTERDRIVER , &qbuf, &rbuf))
- {
goto done;
- }
-
/* Unmarshall response */
- result = NT_STATUS_UNSUCCESSFUL;
+
if (!spoolss_io_r_deleteprinterdriver ("", &r, &rbuf, 0))
- {
goto done;
- }
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
-done:
+ result = r.status;
+
+ done:
prs_mem_free(&qbuf);
prs_mem_free(&rbuf);
return result;
}
-/* Get print processor directory */
+/*********************************************************************************
+ Win32 API - GetPrinterProcessorDirectory()
+ ********************************************************************************/
-NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- char *name,
- char *environment,
- fstring procdir)
+WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ char *name, char *environment,
+ fstring procdir)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETPRINTPROCESSORDIRECTORY q;
SPOOL_R_GETPRINTPROCESSORDIRECTORY r;
- NTSTATUS result;
int level = 1;
+ WERROR result = W_ERROR(ERRgeneral);
NEW_BUFFER buffer;
- uint32 needed = 100;
ZERO_STRUCT(q);
ZERO_STRUCT(r);
/* Initialise parse structures */
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
/* Initialise input parameters */
- do {
- init_buffer(&buffer, needed, mem_ctx);
+ init_buffer(&buffer, offered, mem_ctx);
+
+ make_spoolss_q_getprintprocessordirectory(
+ &q, name, environment, level, &buffer, offered);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_getprintprocessordirectory("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTPROCESSORDIRECTORY,
+ &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_getprintprocessordirectory("", &r, &rbuf, 0))
+ goto done;
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ if (needed)
+ *needed = r.needed;
+
+ if (W_ERROR_IS_OK(result))
+ fstrcpy(procdir, "Not implemented!");
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Add a form to a printer.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param handle Policy handle opened with cli_spoolss_open_printer_ex
+ * or cli_spoolss_addprinterex.
+ * @param level Form info level to add - should always be 1.
+ * @param form A pointer to the form to be added.
+ *
+ */
+
+WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, uint32 level, FORM *form)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_ADDFORM q;
+ SPOOL_R_ADDFORM r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
- make_spoolss_q_getprintprocessordirectory(&q, name,
- environment, level,
- &buffer, needed);
+ /* Initialise input parameters */
+
+ make_spoolss_q_addform(&q, handle, level, form);
/* Marshall data and send request */
- if (!spoolss_io_q_getprintprocessordirectory("", &q, &qbuf, 0) ||
- !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTPROCESSORDIRECTORY, &qbuf, &rbuf)) {
- result = NT_STATUS_UNSUCCESSFUL;
+ if (!spoolss_io_q_addform("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_ADDFORM, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_addform("", &r, &rbuf, 0))
goto done;
- }
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+/** Set a form on a printer.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param handle Policy handle opened with cli_spoolss_open_printer_ex
+ * or cli_spoolss_addprinterex.
+ * @param level Form info level to set - should always be 1.
+ * @param form A pointer to the form to be set.
+ *
+ */
+
+WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, uint32 level, char *form_name,
+ FORM *form)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_SETFORM q;
+ SPOOL_R_SETFORM r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ make_spoolss_q_setform(&q, handle, level, form_name, form);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_setform("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_SETFORM, &qbuf, &rbuf))
+ goto done;
+
/* Unmarshall response */
- if (!spoolss_io_r_getprintprocessordirectory("", &r, &rbuf, 0)) {
- result = NT_STATUS_UNSUCCESSFUL;
+ if (!spoolss_io_r_setform("", &r, &rbuf, 0))
goto done;
- }
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ if (!W_ERROR_IS_OK(result))
+ goto done;
+
+
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Get a form on a printer.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param handle Policy handle opened with cli_spoolss_open_printer_ex
+ * or cli_spoolss_addprinterex.
+ * @param formname Name of the form to get
+ * @param level Form info level to get - should always be 1.
+ *
+ */
+
+WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *handle, char *formname, uint32 level,
+ FORM_1 *form)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_GETFORM q;
+ SPOOL_R_GETFORM r;
+ WERROR result = W_ERROR(ERRgeneral);
+ NEW_BUFFER buffer;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ init_buffer(&buffer, offered, mem_ctx);
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ make_spoolss_q_getform(&q, handle, formname, level, &buffer, offered);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_getform("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_GETFORM, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_getform("", &r, &rbuf, 0))
+ goto done;
/* Return output parameters */
- result = werror_to_ntstatus(r.status);
+ result = r.status;
+
+ if (needed)
+ *needed = r.needed;
+
+ if (W_ERROR_IS_OK(result))
+ smb_io_form_1("", r.buffer, form, 0);
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/** Delete a form on a printer.
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param handle Policy handle opened with cli_spoolss_open_printer_ex
+ * or cli_spoolss_addprinterex.
+ * @param form The name of the form to delete.
+ *
+ */
+
+WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, char *form_name)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_DELETEFORM q;
+ SPOOL_R_DELETEFORM r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
- } while (NT_STATUS_V(result) ==
- NT_STATUS_V(ERROR_INSUFFICIENT_BUFFER));
+ /* Initialise input parameters */
+
+ make_spoolss_q_deleteform(&q, handle, form_name);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_deleteform("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_DELETEFORM, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_deleteform("", &r, &rbuf, 0))
+ goto done;
+
+ /* Return output parameters */
+
+ result = r.status;
done:
prs_mem_free(&qbuf);
@@ -1121,16 +1410,99 @@ NTSTATUS cli_spoolss_getprintprocessordirectory(struct cli_state *cli,
return result;
}
+static void decode_forms_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
+ uint32 num_forms, FORM_1 **forms)
+{
+ int i;
+
+ *forms = (FORM_1 *)talloc(mem_ctx, num_forms * sizeof(FORM_1));
+ buffer->prs.data_offset = 0;
+
+ for (i = 0; i < num_forms; i++)
+ smb_io_form_1("", buffer, &((*forms)[i]), 0);
+}
+
+/** Enumerate forms
+ *
+ * @param cli Pointer to client state structure which is open
+ * on the SPOOLSS pipe.
+ * @param mem_ctx Pointer to an initialised talloc context.
+ *
+ * @param offered Buffer size offered in the request.
+ * @param needed Number of bytes needed to complete the request.
+ * may be NULL.
+ * or cli_spoolss_addprinterex.
+ * @param level Form info level to get - should always be 1.
+ * @param handle Open policy handle
+ *
+ */
-/*****************************************************************************/
+WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 offered, uint32 *needed,
+ POLICY_HND *handle, int level, uint32 *num_forms,
+ FORM_1 **forms)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_ENUMFORMS q;
+ SPOOL_R_ENUMFORMS r;
+ WERROR result = W_ERROR(ERRgeneral);
+ NEW_BUFFER buffer;
-NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ init_buffer(&buffer, offered, mem_ctx);
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+ /* Initialise input parameters */
+
+ make_spoolss_q_enumforms(&q, handle, level, &buffer, offered);
+
+ /* Marshall data and send request */
+
+ if (!spoolss_io_q_enumforms("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, SPOOLSS_ENUMFORMS, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+
+ if (!spoolss_io_r_enumforms("", &r, &rbuf, 0))
+ goto done;
+
+ /* Return output parameters */
+
+ result = r.status;
+
+ if (needed)
+ *needed = r.needed;
+
+ if (num_forms)
+ *num_forms = r.numofforms;
+
+ decode_forms_1(mem_ctx, r.buffer, *num_forms, forms);
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
+
+/*********************************************************************************
+ Win32 API - SetPrinterData()
+ ********************************************************************************/
+
+WERROR cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, char* valname, char* value)
{
prs_struct qbuf, rbuf;
SPOOL_Q_SETPRINTERDATA q;
SPOOL_R_SETPRINTERDATA r;
- NTSTATUS result;
+ WERROR result = W_ERROR(ERRgeneral);
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1147,15 +1519,13 @@ NTSTATUS cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Marshall data and send request */
if (!spoolss_io_q_setprinterdata ("", &q, &qbuf, 0) ||
!rpc_api_pipe_req (cli, SPOOLSS_SETPRINTERDATA, &qbuf, &rbuf))
- {
- result = NT_STATUS_UNSUCCESSFUL;
goto done;
- }
/* Unmarshall response */
- if (spoolss_io_r_setprinterdata ("", &r, &rbuf, 0)) {
- result = werror_to_ntstatus(r.status);
- }
+ if (spoolss_io_r_setprinterdata ("", &r, &rbuf, 0))
+ goto done;
+
+ result = r.status;
done:
prs_mem_free(&qbuf);
@@ -1164,3 +1534,5 @@ done:
return result;
}
+
+/** @} **/
diff --git a/source/libsmb/cli_srvsvc.c b/source/libsmb/cli_srvsvc.c
index c9bd4643622..9d33149540b 100644
--- a/source/libsmb/cli_srvsvc.c
+++ b/source/libsmb/cli_srvsvc.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
NT Domain Authentication SMB / MSRPC client
Copyright (C) Andrew Tridgell 1994-2000
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
@@ -70,7 +69,7 @@ NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli,
goto done;
}
- result = r.status;
+ result = werror_to_ntstatus(r.status);
done:
prs_mem_free(&qbuf);
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 16da673e73c..5e1cbeca386 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -730,7 +730,6 @@ open the client sockets
****************************************************************************/
BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
{
- extern struct in_addr ipzero;
extern pstring user_socket_options;
int name_type = 0x20;
char *p;
@@ -747,7 +746,7 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
*p = 0;
}
- if (!ip || ip_equal(*ip, ipzero)) {
+ if (!ip || is_zero_ip(*ip)) {
if (!resolve_name(cli->desthost, &cli->dest_ip, name_type)) {
return False;
}
@@ -924,6 +923,120 @@ BOOL cli_establish_connection(struct cli_state *cli,
return True;
}
+/* Initialise client credentials for authenticated pipe access */
+
+static void init_creds(struct ntuser_creds *creds, char* username,
+ char* domain, char* password, int pass_len)
+{
+ ZERO_STRUCTP(creds);
+
+ pwd_set_cleartext(&creds->pwd, password);
+
+ fstrcpy(creds->user_name, username);
+ fstrcpy(creds->domain, domain);
+
+ if (!*username) {
+ creds->pwd.null_pwd = True;
+ }
+}
+
+/****************************************************************************
+establishes a connection right up to doing tconX, password specified.
+****************************************************************************/
+NTSTATUS cli_full_connection(struct cli_state **output_cli,
+ const char *my_name, const char *dest_host,
+ struct in_addr *dest_ip, int port,
+ char *service, char *service_type,
+ char *user, char *domain,
+ char *password, int pass_len)
+{
+ struct ntuser_creds creds;
+ NTSTATUS nt_status;
+ struct nmb_name calling;
+ struct nmb_name called;
+ struct cli_state *cli;
+ struct in_addr ip;
+
+ if (!output_cli)
+ DEBUG(0, ("output_cli is NULL!?!"));
+
+ *output_cli = NULL;
+
+ make_nmb_name(&calling, my_name, 0x0);
+ make_nmb_name(&called , dest_host, 0x20);
+
+again:
+
+ if (!(cli = cli_initialise(NULL)))
+ return NT_STATUS_NO_MEMORY;
+
+ if (cli_set_port(cli, port) != port) {
+ cli_shutdown(cli);
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ ip = *dest_ip;
+
+ DEBUG(3,("Connecting to host=%s share=%s\n", dest_host, service));
+
+ if (!cli_connect(cli, dest_host, &ip)) {
+ DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
+ nmb_namestr(&called), inet_ntoa(*dest_ip)));
+ cli_shutdown(cli);
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ if (!cli_session_request(cli, &calling, &called)) {
+ char *p;
+ DEBUG(1,("session request to %s failed (%s)\n",
+ called.name, cli_errstr(cli)));
+ cli_shutdown(cli);
+ if ((p=strchr(called.name, '.'))) {
+ *p = 0;
+ goto again;
+ }
+ if (strcmp(called.name, "*SMBSERVER")) {
+ make_nmb_name(&called , "*SMBSERVER", 0x20);
+ goto again;
+ }
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ if (!cli_negprot(cli)) {
+ DEBUG(1,("failed negprot\n"));
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ cli_shutdown(cli);
+ return nt_status;
+ }
+
+ if (!cli_session_setup(cli, user, password, pass_len, password, pass_len,
+ domain)) {
+ DEBUG(1,("failed session setup\n"));
+ nt_status = cli_nt_error(cli);
+ cli_shutdown(cli);
+ if (NT_STATUS_IS_OK(nt_status))
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ return nt_status;
+ }
+
+ if (service) {
+ if (!cli_send_tconX(cli, service, service_type,
+ (char*)password, pass_len)) {
+ DEBUG(1,("failed tcon_X\n"));
+ nt_status = cli_nt_error(cli);
+ cli_shutdown(cli);
+ if (NT_STATUS_IS_OK(nt_status))
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ return nt_status;
+ }
+ }
+
+ init_creds(&creds, user, domain, password, pass_len);
+ cli_init_creds(cli, &creds);
+
+ *output_cli = cli;
+ return NT_STATUS_OK;
+}
/****************************************************************************
Attempt a NetBIOS session request, falling back to *SMBSERVER if needed.
@@ -932,53 +1045,54 @@ BOOL cli_establish_connection(struct cli_state *cli,
BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost,
struct in_addr *pdest_ip)
{
- struct nmb_name calling, called;
+ struct nmb_name calling, called;
- make_nmb_name(&calling, srchost, 0x0);
+ make_nmb_name(&calling, srchost, 0x0);
- /*
- * If the called name is an IP address
- * then use *SMBSERVER immediately.
- */
+ /*
+ * If the called name is an IP address
+ * then use *SMBSERVER immediately.
+ */
- if(is_ipaddress(desthost))
- make_nmb_name(&called, "*SMBSERVER", 0x20);
- else
- make_nmb_name(&called, desthost, 0x20);
+ if(is_ipaddress(desthost))
+ make_nmb_name(&called, "*SMBSERVER", 0x20);
+ else
+ make_nmb_name(&called, desthost, 0x20);
- if (!cli_session_request(cli, &calling, &called)) {
- struct nmb_name smbservername;
+ if (!cli_session_request(cli, &calling, &called)) {
+
+ struct nmb_name smbservername;
- make_nmb_name(&smbservername , "*SMBSERVER", 0x20);
+ make_nmb_name(&smbservername , "*SMBSERVER", 0x20);
- /*
- * If the name wasn't *SMBSERVER then
- * try with *SMBSERVER if the first name fails.
- */
+ /*
+ * If the name wasn't *SMBSERVER then
+ * try with *SMBSERVER if the first name fails.
+ */
- if (nmb_name_equal(&called, &smbservername)) {
+ if (nmb_name_equal(&called, &smbservername)) {
- /*
- * The name used was *SMBSERVER, don't bother with another name.
- */
+ /*
+ * The name used was *SMBSERVER, don't bother with another name.
+ */
- DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER \
-with error %s.\n", desthost, cli_errstr(cli) ));
- cli_shutdown(cli);
- return False;
- }
+ DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s.\n",
+ desthost, cli_errstr(cli) ));
+ cli_shutdown(cli);
+ return False;
+ }
- cli_shutdown(cli);
+ cli_shutdown(cli);
- if (!cli_initialise(cli) ||
- !cli_connect(cli, desthost, pdest_ip) ||
- !cli_session_request(cli, &calling, &smbservername)) {
- DEBUG(0,("attempt_netbios_session_request: %s rejected the session for \
-name *SMBSERVER with error %s\n", desthost, cli_errstr(cli) ));
- cli_shutdown(cli);
- return False;
- }
- }
+ if (!cli_initialise(cli) || !cli_connect(cli, desthost, pdest_ip) ||
+ !cli_session_request(cli, &calling, &smbservername))
+ {
+ DEBUG(0,("attempt_netbios_session_request: %s rejected the session for name *SMBSERVER with error %s\n",
+ desthost, cli_errstr(cli) ));
+ cli_shutdown(cli);
+ return False;
+ }
+ }
- return True;
+ return True;
}
diff --git a/source/libsmb/clidgram.c b/source/libsmb/clidgram.c
index ded47b7d068..c21c4263f5a 100644
--- a/source/libsmb/clidgram.c
+++ b/source/libsmb/clidgram.c
@@ -122,7 +122,7 @@ int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int
/* Copy the data to buffer, respecting sizes ... */
- bcopy(&dgram->data[92], buf, MIN(bufsiz, (dgram->datasize - 92)));
+ memcpy(buf, &dgram->data[92], MIN(bufsiz, (dgram->datasize - 92)));
}
else
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c
index ca78ad8dde5..25510da43ce 100644
--- a/source/libsmb/clientgen.c
+++ b/source/libsmb/clientgen.c
@@ -43,7 +43,7 @@ BOOL cli_receive_smb(struct cli_state *cli)
if (cli->fd == -1) return False;
again:
- ret = client_receive_smb(cli->fd,cli->inbuf,cli->timeout);
+ ret = client_receive_smb(cli->fd,cli->inbuf,abs(cli->timeout));
if (ret) {
/* it might be an oplock break request */
@@ -64,7 +64,7 @@ BOOL cli_receive_smb(struct cli_state *cli)
/* If the server is not responding, note that now */
- if (!ret) {
+ if (!ret && cli->timeout > 0) {
close(cli->fd);
cli->fd = -1;
}
diff --git a/source/libsmb/clierror.c b/source/libsmb/clierror.c
index 6957c2cec29..33c359fc2d3 100644
--- a/source/libsmb/clierror.c
+++ b/source/libsmb/clierror.c
@@ -75,6 +75,12 @@ char *cli_errstr(struct cli_state *cli)
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), errnum;
uint8 errclass;
int i;
+
+ if (!cli->initialised) {
+ fstrcpy(cli_error_message, "[Programmer's error] cli_errstr called on unitialized cli_stat struct!\n");
+ return cli_error_message;
+ }
+
/* Case #1: RAP error */
if (cli->rap_error) {
diff --git a/source/libsmb/clifile.c b/source/libsmb/clifile.c
index 52c553c1cdc..ed13bf4d812 100644
--- a/source/libsmb/clifile.c
+++ b/source/libsmb/clifile.c
@@ -544,6 +544,57 @@ BOOL cli_close(struct cli_state *cli, int fnum)
}
/****************************************************************************
+ send a lock with a specified locktype
+ this is used for testing LOCKING_ANDX_CANCEL_LOCK
+****************************************************************************/
+NTSTATUS cli_locktype(struct cli_state *cli, int fnum,
+ uint32 offset, uint32 len, int timeout, unsigned char locktype)
+{
+ char *p;
+ int saved_timeout = cli->timeout;
+
+ memset(cli->outbuf,'\0',smb_size);
+ memset(cli->inbuf,'\0', smb_size);
+
+ set_message(cli->outbuf,8,0,True);
+
+ SCVAL(cli->outbuf,smb_com,SMBlockingX);
+ SSVAL(cli->outbuf,smb_tid,cli->cnum);
+ cli_setup_packet(cli);
+
+ SCVAL(cli->outbuf,smb_vwv0,0xFF);
+ SSVAL(cli->outbuf,smb_vwv2,fnum);
+ SCVAL(cli->outbuf,smb_vwv3,locktype);
+ SIVALS(cli->outbuf, smb_vwv4, timeout);
+ SSVAL(cli->outbuf,smb_vwv6,0);
+ SSVAL(cli->outbuf,smb_vwv7,1);
+
+ p = smb_buf(cli->outbuf);
+ SSVAL(p, 0, cli->pid);
+ SIVAL(p, 2, offset);
+ SIVAL(p, 6, len);
+
+ p += 10;
+
+ cli_setup_bcc(cli, p);
+
+ cli_send_smb(cli);
+
+ if (timeout != 0) {
+ cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ }
+
+ if (!cli_receive_smb(cli)) {
+ cli->timeout = saved_timeout;
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ cli->timeout = saved_timeout;
+
+ return cli_nt_error(cli);
+}
+
+/****************************************************************************
Lock a file.
****************************************************************************/
@@ -581,6 +632,9 @@ BOOL cli_lock(struct cli_state *cli, int fnum,
cli_send_smb(cli);
cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ if (timeout != 0) {
+ cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ }
if (!cli_receive_smb(cli)) {
cli->timeout = saved_timeout;
@@ -683,6 +737,10 @@ BOOL cli_lock64(struct cli_state *cli, int fnum,
cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 2*1000);
+ if (timeout != 0) {
+ cli->timeout = (timeout == -1) ? 0x7FFFFFFF : (timeout + 5*1000);
+ }
+
if (!cli_receive_smb(cli)) {
cli->timeout = saved_timeout;
return False;
diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c
index 2c24e5c8645..2f1423aa1a1 100644
--- a/source/libsmb/clirap.c
+++ b/source/libsmb/clirap.c
@@ -179,8 +179,8 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, co
char *cmnt = comment_offset?(rdata+comment_offset-converter):"";
pstring s1, s2;
- pstrcpy(s1, dos_to_unix(sname, False));
- pstrcpy(s2, dos_to_unix(cmnt, False));
+ pstrcpy(s1, dos_to_unix_static(sname));
+ pstrcpy(s2, dos_to_unix_static(cmnt));
fn(s1, type, s2, state);
}
@@ -261,8 +261,8 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
- pstrcpy(s1, dos_to_unix(sname, False));
- pstrcpy(s2, dos_to_unix(cmnt, False));
+ pstrcpy(s1, dos_to_unix_static(sname));
+ pstrcpy(s2, dos_to_unix_static(cmnt));
fn(s1, stype, s2, state);
}
}
diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index 93333bff951..ca0b1bb2d51 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/libsmb/clireadwrite.c
@@ -224,6 +224,14 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1
{
char *p;
+ if (size > cli->bufsize) {
+ cli->outbuf = realloc(cli->outbuf, size + 1024);
+ cli->inbuf = realloc(cli->inbuf, size + 1024);
+ if (cli->outbuf == NULL || cli->inbuf == NULL)
+ return False;
+ cli->bufsize = size + 1024;
+ }
+
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
@@ -301,6 +309,7 @@ ssize_t cli_write(struct cli_state *cli,
break;
bwritten += SVAL(cli->inbuf, smb_vwv2);
+ bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))>>16);
}
while (received < issued && cli_receive_smb(cli))
@@ -358,6 +367,8 @@ ssize_t cli_smbwrite(struct cli_state *cli,
size1 -= size;
total += size;
+ offset += size;
+
} while (size1);
return total;
diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c
index 784463566f3..512a2f60332 100644
--- a/source/libsmb/clispnego.c
+++ b/source/libsmb/clispnego.c
@@ -248,13 +248,22 @@ BOOL spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket)
{
BOOL ret;
ASN1_DATA data;
+ int ata_remaining;
asn1_load(&data, blob);
asn1_start_tag(&data, ASN1_APPLICATION(0));
asn1_check_OID(&data, OID_KERBEROS5);
asn1_check_BOOLEAN(&data, 0);
- *ticket = data_blob(data.data, asn1_tag_remaining(&data));
- asn1_read(&data, ticket->data, ticket->length);
+
+ data_remaining = asn1_tag_remaining(&data);
+
+ if (data_remaining < 1) {
+ data.has_error = True;
+ } else {
+ *ticket = data_blob(data.data, data_remaining);
+ asn1_read(&data, ticket->data, ticket->length);
+ }
+
asn1_end_tag(&data);
ret = !data.has_error;
diff --git a/source/libsmb/clistr.c b/source/libsmb/clistr.c
index 8a76855c7f4..72178967ed5 100644
--- a/source/libsmb/clistr.c
+++ b/source/libsmb/clistr.c
@@ -65,7 +65,7 @@ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len
if (flags & STR_TERMINATE)
len++;
if (flags & STR_CONVERT)
- unix_to_dos(dest,True);
+ unix_to_dos(dest);
if (flags & STR_UPPER)
strupper(dest);
return len;
@@ -73,7 +73,7 @@ int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len
/* the server likes unicode. give it the works */
if (flags & STR_CONVERT)
- dos_PutUniCode(dest, unix_to_dos(src,False), dest_len, flags & STR_TERMINATE);
+ dos_PutUniCode(dest, unix_to_dos_static(src), dest_len, flags & STR_TERMINATE);
else
unix_PutUniCode(dest, src, dest_len, flags & STR_TERMINATE);
@@ -123,7 +123,7 @@ int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len
memcpy(dest, src, len);
dest[len] = 0;
}
- safe_strcpy(dest,dos_to_unix(dest,False),dest_len);
+ safe_strcpy(dest,dos_to_unix_static(dest),dest_len);
return len;
}
diff --git a/source/libsmb/credentials.c b/source/libsmb/credentials.c
index 5f65c13edd9..86adf03c402 100644
--- a/source/libsmb/credentials.c
+++ b/source/libsmb/credentials.c
@@ -24,7 +24,7 @@
/****************************************************************************
represent a credential as a string
****************************************************************************/
-char *credstr(uchar *cred)
+char *credstr(const uchar *cred)
{
static fstring buf;
slprintf(buf, sizeof(buf) - 1, "%02X%02X%02X%02X%02X%02X%02X%02X",
@@ -42,8 +42,8 @@ Input: 8 byte challenge block
Output:
8 byte session key
****************************************************************************/
-void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
- uchar session_key[8])
+void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass,
+ uchar session_key[8])
{
uint32 sum[2];
unsigned char sum2[8];
@@ -54,7 +54,7 @@ void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
SIVAL(sum2,0,sum[0]);
SIVAL(sum2,4,sum[1]);
- cred_hash1(session_key, sum2,(unsigned char *)pass);
+ cred_hash1(session_key, sum2,pass);
/* debug output */
DEBUG(4,("cred_session_key\n"));
diff --git a/source/libsmb/domain_client_validate.c b/source/libsmb/domain_client_validate.c
index 04ce90895ae..42269a73f1e 100644
--- a/source/libsmb/domain_client_validate.c
+++ b/source/libsmb/domain_client_validate.c
@@ -22,8 +22,6 @@
#include "includes.h"
-extern struct in_addr ipzero;
-
extern pstring global_myname;
/***********************************************************************
@@ -86,8 +84,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
}
if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) {
- DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \
-session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
+ DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS session request.\n", remote_machine));
return False;
}
@@ -181,7 +178,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip,
* Ignore addresses we have already tried.
*/
- if (ip_equal(ipzero, *ip))
+ if (is_zero_ip(*ip))
return False;
if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name))
@@ -194,6 +191,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip,
We have been asked to dynamcially determine the IP addresses of
the PDC and BDC's for this DOMAIN, and query them in turn.
************************************************************************/
+
static BOOL find_connect_pdc(struct cli_state *pcli,
unsigned char *trust_passwd,
time_t last_change_time)
@@ -230,7 +228,7 @@ static BOOL find_connect_pdc(struct cli_state *pcli,
if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
break;
- ip_list[i] = ipzero; /* Tried and failed. */
+ zero_ip(&ip_list[i]); /* Tried and failed. */
}
/*
@@ -239,8 +237,10 @@ static BOOL find_connect_pdc(struct cli_state *pcli,
if(!connected_ok) {
i = (sys_random() % count);
- if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
- ip_list[i] = ipzero; /* Tried and failed. */
+ if (!is_zero_ip(ip_list[i]) {
+ if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
+ zero_ip(&ip_list[i]); /* Tried and failed. */
+ }
}
/*
@@ -253,14 +253,15 @@ static BOOL find_connect_pdc(struct cli_state *pcli,
* Note that from a WINS server the #1 IP address is the PDC.
*/
for(i = 0; i < count; i++) {
+ if (is_zero_ip(ip_list[i]))
+ continue;
+
if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
break;
}
}
SAFE_FREE(ip_list);
-
-
return connected_ok;
}
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c
index 55f17b2b34e..ad0861e84f6 100644
--- a/source/libsmb/libsmbclient.c
+++ b/source/libsmb/libsmbclient.c
@@ -79,7 +79,7 @@ static pstring smbc_user;
* We accept smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]]
*
* smb:// means show all the workgroups
- * smb://name/ means, if name<1D> exists, list servers in workgroup,
+ * smb://name/ means, if name<1D> or name<1B> exists, list servers in workgroup,
* else, if name<20> exists, list all shares for server ...
*/
@@ -245,9 +245,9 @@ struct smbc_server *smbc_server(char *server, char *share,
fstring group;
pstring ipenv;
struct in_addr ip;
- extern struct in_addr ipzero;
+ int tried_reverse = 0;
- ip = ipzero;
+ zero_ip(&ip);
ZERO_STRUCT(c);
/* try to use an existing connection */
@@ -305,7 +305,7 @@ struct smbc_server *smbc_server(char *server, char *share,
again:
slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n);
- ip = ipzero;
+ zero_ip(&ip);
/* have to open a new connection */
if (!cli_initialise(&c) || !cli_connect(&c, server_n, &ip)) {
@@ -320,6 +320,30 @@ struct smbc_server *smbc_server(char *server, char *share,
make_nmb_name(&called , "*SMBSERVER", 0x20);
goto again;
}
+ else { /* Try one more time, but ensure we don't loop */
+
+ /* Only try this if server is an IP address ... */
+
+ if (is_ipaddress(server) && !tried_reverse) {
+ fstring remote_name;
+ struct in_addr rem_ip;
+
+ if (!inet_aton(server, &rem_ip)) {
+ DEBUG(4, ("Could not convert IP address %s to struct in_addr\n", server));
+ errno = ENOENT;
+ return NULL;
+ }
+
+ tried_reverse++; /* Yuck */
+
+ if (name_status_find("*", 0, 0, rem_ip, remote_name)) {
+ make_nmb_name(&called, remote_name, 0x20);
+ goto again;
+ }
+
+
+ }
+ }
errno = ENOENT;
return NULL;
}
@@ -1590,8 +1614,11 @@ int smbc_opendir(const char *fname)
}
/* We have server and share and path empty ... so list the workgroups */
+ /* first try to get the LMB for our workgroup, and if that fails, */
+ /* try the DMB */
- if (!resolve_name(lp_workgroup(), &rem_ip, 0x1d)) {
+ if (!(resolve_name(lp_workgroup(), &rem_ip, 0x1d) ||
+ resolve_name(lp_workgroup(), &rem_ip, 0x1b))) {
errno = EINVAL; /* Something wrong with smb.conf? */
return -1;
@@ -1604,7 +1631,7 @@ int smbc_opendir(const char *fname)
if (!name_status_find("*", 0, 0, rem_ip, server)) {
- DEBUG(0,("Could not get the name of local master browser for server %s\n", server));
+ DEBUG(0,("Could not get the name of local/domain master browser for server %s\n", server));
errno = EINVAL;
return -1;
@@ -1659,11 +1686,12 @@ int smbc_opendir(const char *fname)
}
- /* Check to see if <server><1D> translates, or <server><20> translates */
+ /* Check to see if <server><1D>, <server><1B>, or <server><20> translates */
/* However, we check to see if <server> is an IP address first */
if (!is_ipaddress(server) && /* Not an IP addr so check next */
- resolve_name(server, &rem_ip, 0x1d)) { /* Found LMB */
+ (resolve_name(server, &rem_ip, 0x1d) || /* Found LMB */
+ resolve_name(server, &rem_ip, 0x1b) )) { /* Found DMB */
pstring buserver;
smbc_file_table[slot]->dir_type = SMBC_SERVER;
@@ -1675,7 +1703,7 @@ int smbc_opendir(const char *fname)
if (!name_status_find("*", 0, 0, rem_ip, buserver)) {
- DEBUG(0, ("Could not get name of local master browser for server %s\n", server));
+ DEBUG(0, ("Could not get name of local/domain master browser for server %s\n", server));
errno = EPERM; /* FIXME, is this correct */
return -1;
@@ -1912,7 +1940,7 @@ struct smbc_dirent *smbc_readdir(unsigned int fd)
/* Hmmm, do I even need to copy it? */
- bcopy(dirent, smbc_local_dirent, dirent->dirlen); /* Copy the dirent */
+ memcpy(smbc_local_dirent, dirent, dirent->dirlen); /* Copy the dirent */
dirp = (struct smbc_dirent *)smbc_local_dirent;
dirp->comment = (char *)(&dirp->name + dirent->namelen + 1);
fe->dir_next = fe->dir_next->next;
@@ -2001,7 +2029,7 @@ int smbc_getdents(unsigned int fd, struct smbc_dirent *dirp, int count)
dirent = dir->dirent;
- bcopy(dirent, ndir, reqd); /* Copy the data in ... */
+ memcpy(ndir, dirent, reqd); /* Copy the data in ... */
((struct smbc_dirent *)ndir)->comment =
(char *)(&((struct smbc_dirent *)ndir)->name + dirent->namelen + 1);
@@ -2244,6 +2272,10 @@ off_t smbc_telldir(int fd)
}
+ /*
+ * This causes problems on some UNIXens ... wonder who is using
+ * it ... FIXME.
+ */
return (off_t) fe->dir_next;
}
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index d9a61d9368c..24018bfb26a 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -26,25 +26,25 @@
BOOL global_in_nmbd = False;
/****************************************************************************
-generate a random trn_id
+ Generate a random trn_id.
****************************************************************************/
+
static int generate_trn_id(void)
{
static int trn_id;
- if (trn_id == 0) {
+ if (trn_id == 0)
sys_srandom(sys_getpid());
- }
trn_id = sys_random();
return trn_id % (unsigned)0x7FFF;
}
-
/****************************************************************************
- parse a node status response into an array of structures
+ Parse a node status response into an array of structures.
****************************************************************************/
+
static struct node_status *parse_node_status(char *p, int *num_names)
{
struct node_status *ret;
@@ -68,11 +68,11 @@ static struct node_status *parse_node_status(char *p, int *num_names)
return ret;
}
-
/****************************************************************************
-do a NBT node status query on an open socket and return an array of
-structures holding the returned names or NULL if the query failed
+ Do a NBT node status query on an open socket and return an array of
+ structures holding the returned names or NULL if the query failed.
**************************************************************************/
+
struct node_status *node_status_query(int fd,struct nmb_name *name,
struct in_addr to_ip, int *num_names)
{
@@ -188,7 +188,7 @@ BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr t
StrnCpy(name, status[i].name, 15);
- dos_to_unix(name, True);
+ dos_to_unix(name);
SAFE_FREE(status);
return True;
@@ -822,6 +822,10 @@ static BOOL internal_resolve_name(const char *name, int name_type,
BOOL allones = (strcmp(name,"255.255.255.255") == 0);
BOOL allzeros = (strcmp(name,"0.0.0.0") == 0);
BOOL is_address = is_ipaddress(name);
+ BOOL result = False;
+ struct in_addr *nodupes_iplist;
+ int i;
+
*return_iplist = NULL;
*return_count = 0;
@@ -849,29 +853,89 @@ static BOOL internal_resolve_name(const char *name, int name_type,
while (next_token(&ptr, tok, LIST_SEP, sizeof(tok))) {
if((strequal(tok, "host") || strequal(tok, "hosts"))) {
if (name_type == 0x20 && resolve_hosts(name, return_iplist, return_count)) {
- return True;
+ result = True;
+ goto done;
}
} else if(strequal( tok, "lmhosts")) {
if (resolve_lmhosts(name, name_type, return_iplist, return_count)) {
- return True;
+ result = True;
+ goto done;
}
} else if(strequal( tok, "wins")) {
/* don't resolve 1D via WINS */
if (name_type != 0x1D &&
- resolve_wins(name, name_type, return_iplist, return_count)) {
- return True;
+ resolve_wins(name, name_type, return_iplist, return_count)) {
+ result = True;
+ goto done;
}
} else if(strequal( tok, "bcast")) {
if (name_resolve_bcast(name, name_type, return_iplist, return_count)) {
- return True;
+ result = True;
+ goto done;
}
} else {
DEBUG(0,("resolve_name: unknown name switch type %s\n", tok));
}
}
+ /* All of the resolve_* functions above have returned false. */
+
SAFE_FREE(*return_iplist);
return False;
+
+ done:
+
+ /* Remove duplicate entries. Some queries, notably #1c (domain
+ controllers) return the PDC in iplist[0] and then all domain
+ controllers including the PDC in iplist[1..n]. Iterating over
+ the iplist when the PDC is down will cause two sets of timeouts. */
+
+ if (*return_count && (nodupes_iplist =
+ (struct in_addr *)malloc(sizeof(struct in_addr) * (*return_count)))) {
+ int nodupes_count = 0;
+
+ /* Iterate over return_iplist looking for duplicates */
+
+ for (i = 0; i < *return_count; i++) {
+ BOOL is_dupe = False;
+ int j;
+
+ for (j = i + 1; j < *return_count; j++) {
+ if (ip_equal((*return_iplist)[i],
+ (*return_iplist)[j])) {
+ is_dupe = True;
+ break;
+ }
+ }
+
+ if (!is_dupe) {
+
+ /* This one not a duplicate */
+
+ nodupes_iplist[nodupes_count] = (*return_iplist)[i];
+ nodupes_count++;
+ }
+ }
+
+ /* Switcheroo with original list */
+
+ free(*return_iplist);
+
+ *return_iplist = nodupes_iplist;
+ *return_count = nodupes_count;
+ }
+
+ /* Display some debugging info */
+
+ DEBUG(10, ("internal_resolve_name: returning %d addresses: ",
+ *return_count));
+
+ for (i = 0; i < *return_count; i++)
+ DEBUGADD(10, ("%s ", inet_ntoa((*return_iplist)[i])));
+
+ DEBUG(10, ("\n"));
+
+ return result;
}
/********************************************************
@@ -1190,7 +1254,7 @@ NT GETDC call, UNICODE, NT domain SID and uncle tom cobbley and all...
Get the IP address list of the PDC/BDC's of a Domain.
*********************************************************/
-BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count)
+BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count)
{
int name_type = pdc_only ? 0x1B : 0x1C;
@@ -1211,8 +1275,15 @@ BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *coun
p = pserver;
while (next_token(&p,name,LIST_SEP,sizeof(name))) {
- if (strequal(name, "*"))
- return internal_resolve_name(group, name_type, ip_list, count);
+ if (strequal(name, "*")) {
+ /*
+ * Use 1C followed by 1B. This shouldn't work but with
+ * broken WINS servers it might. JRA.
+ */
+ if (!pdc_only && internal_resolve_name(group, 0x1C, ip_list, count))
+ return True;
+ return internal_resolve_name(group, 0x1B, ip_list, count);
+ }
num_adresses++;
}
if (num_adresses == 0)
@@ -1240,6 +1311,7 @@ BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *coun
/********************************************************
Get the IP address list of the Local Master Browsers
********************************************************/
+
BOOL get_lmb_list(struct in_addr **ip_list, int *count)
{
return internal_resolve_name( MSBROWSE, 0x1, ip_list, count);
diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c
index 08748ed0aa0..54f34cc233a 100644
--- a/source/libsmb/nmblib.c
+++ b/source/libsmb/nmblib.c
@@ -767,6 +767,14 @@ static BOOL send_udp(int fd,char *buf,int len,struct in_addr ip,int port)
XXXX This currently doesn't handle packets too big for one
datagram. It should split them and use the packet_offset, more and
first flags to handle the fragmentation. Yuck.
+
+ [...but it isn't clear that we would ever need to send a
+ a fragmented NBT Datagram. The IP layer does its own
+ fragmentation to ensure that messages can fit into the path
+ MTU. It *is* important to be able to receive and rebuild
+ fragmented NBT datagrams, just in case someone out there
+ really has implemented this 'feature'. crh -)------ ]
+
******************************************************************/
static int build_dgram(char *buf,struct packet_struct *p)
{
@@ -777,8 +785,10 @@ static int build_dgram(char *buf,struct packet_struct *p)
/* put in the header */
ubuf[0] = dgram->header.msg_type;
ubuf[1] = (((int)dgram->header.flags.node_type)<<2);
- if (dgram->header.flags.more) ubuf[1] |= 1;
- if (dgram->header.flags.first) ubuf[1] |= 2;
+ if (dgram->header.flags.more)
+ ubuf[1] |= 1;
+ if (dgram->header.flags.first)
+ ubuf[1] |= 2;
RSSVAL(ubuf,2,dgram->header.dgm_id);
putip(ubuf+4,(char *)&dgram->header.source_ip);
RSSVAL(ubuf,8,dgram->header.source_port);
@@ -788,7 +798,7 @@ static int build_dgram(char *buf,struct packet_struct *p)
if (dgram->header.msg_type == 0x10 ||
dgram->header.msg_type == 0x11 ||
- dgram->header.msg_type == 0x12) {
+ dgram->header.msg_type == 0x12) {
offset += put_nmb_name((char *)ubuf,offset,&dgram->source_name);
offset += put_nmb_name((char *)ubuf,offset,&dgram->dest_name);
}
@@ -796,8 +806,11 @@ static int build_dgram(char *buf,struct packet_struct *p)
memcpy(ubuf+offset,dgram->data,dgram->datasize);
offset += dgram->datasize;
- /* automatically set the dgm_length */
- dgram->header.dgm_length = offset;
+ /* automatically set the dgm_length
+ * NOTE: RFC1002 says the dgm_length does *not*
+ * include the fourteen-byte header. crh
+ */
+ dgram->header.dgm_length = (offset - 14);
RSSVAL(ubuf,10,dgram->header.dgm_length);
return(offset);
@@ -811,7 +824,7 @@ void make_nmb_name( struct nmb_name *n, const char *name, int type)
extern pstring global_scope;
memset( (char *)n, '\0', sizeof(struct nmb_name) );
StrnCpy( n->name, name, 15 );
- unix_to_dos(n->name, True);
+ unix_to_dos(n->name);
strupper( n->name );
n->name_type = (unsigned int)type & 0xFF;
StrnCpy( n->scope, global_scope, 63 );
diff --git a/source/libsmb/nterr.c b/source/libsmb/nterr.c
index 25286156ee3..e9e6c131ac4 100644
--- a/source/libsmb/nterr.c
+++ b/source/libsmb/nterr.c
@@ -534,7 +534,8 @@ nt_err_code_struct nt_errs[] =
{ "NT_STATUS_TOO_MANY_LINKS", NT_STATUS_TOO_MANY_LINKS },
{ "NT_STATUS_QUOTA_LIST_INCONSISTENT", NT_STATUS_QUOTA_LIST_INCONSISTENT },
{ "NT_STATUS_FILE_IS_OFFLINE", NT_STATUS_FILE_IS_OFFLINE },
- { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
+ { "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
+ { "STATUS_SOME_UNMAPPED", STATUS_SOME_UNMAPPED },
{ NULL, NT_STATUS(0) }
};
@@ -559,6 +560,11 @@ char *get_nt_error_msg(NTSTATUS nt_code)
return msg;
}
+char *nt_errstr(NTSTATUS nt_code)
+{
+ return get_nt_error_msg(nt_code);
+}
+
/*****************************************************************************
returns an NT_STATUS constant as a string for inclusion in autogen C code
*****************************************************************************/
diff --git a/source/libsmb/pwd_cache.c b/source/libsmb/pwd_cache.c
index 45fb00e6e16..dde5a02ead2 100644
--- a/source/libsmb/pwd_cache.c
+++ b/source/libsmb/pwd_cache.c
@@ -132,7 +132,7 @@ void pwd_set_cleartext(struct pwd_info *pwd, char *clr)
{
pwd_init(pwd);
fstrcpy(pwd->password, clr);
- unix_to_dos(pwd->password,True);
+ unix_to_dos(pwd->password);
pwd->cleartext = True;
pwd->null_pwd = False;
pwd->crypted = False;
@@ -146,7 +146,7 @@ void pwd_get_cleartext(struct pwd_info *pwd, char *clr)
{
if (pwd->cleartext) {
fstrcpy(clr, pwd->password);
- dos_to_unix(clr, True);
+ dos_to_unix(clr);
} else {
clr[0] = 0;
}
@@ -198,7 +198,7 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr)
pwd_init(pwd);
pstrcpy(dos_passwd, clr);
- unix_to_dos(dos_passwd, True);
+ unix_to_dos(dos_passwd);
nt_lm_owf_gen(dos_passwd, pwd->smb_nt_pwd, pwd->smb_lm_pwd);
pwd->null_pwd = False;
diff --git a/source/libsmb/smbdes.c b/source/libsmb/smbdes.c
index 866fc0c7e0b..440121d1265 100644
--- a/source/libsmb/smbdes.c
+++ b/source/libsmb/smbdes.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
a partial implementation of DES designed for use in the
SMB authentication protocol
@@ -331,7 +330,7 @@ void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *
smbhash(out+8, in+8, p14+7, 1);
}
-void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key)
+void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key)
{
unsigned char buf[8];
@@ -339,7 +338,7 @@ void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key)
smbhash(out, buf, key+9, 1);
}
-void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key)
+void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key)
{
unsigned char buf[8];
static unsigned char key2[8];
@@ -349,7 +348,7 @@ void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key)
smbhash(out, buf, key2, 1);
}
-void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw)
+void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw)
{
static unsigned char key2[8];
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c
index 1de2ca53084..c87ff61fdfc 100644
--- a/source/libsmb/smbencrypt.c
+++ b/source/libsmb/smbencrypt.c
@@ -28,13 +28,13 @@
This implements the X/Open SMB password encryption
It takes a password, a 8 byte "crypt key" and puts 24 bytes of
encrypted password into p24 */
-void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
+void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24)
{
uchar p14[15], p21[21];
memset(p21,'\0',21);
memset(p14,'\0',14);
- StrnCpy((char *)p14,(char *)passwd,14);
+ StrnCpy((char *)p14,(const char *)passwd,14);
strupper((char *)p14);
E_P16(p14, p21);
@@ -53,13 +53,13 @@ void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
* Creates the MD4 Hash of the users password in NT UNICODE.
*/
-void E_md4hash(uchar *passwd, uchar *p16)
+void E_md4hash(const uchar *passwd, uchar *p16)
{
int len;
int16 wpwd[129];
/* Password cannot be longer than 128 characters */
- len = strlen((char *)passwd);
+ len = strlen(passwd);
if(len > 128)
len = 128;
/* Password must be converted to NT unicode - null terminated. */
@@ -138,7 +138,7 @@ void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24])
/* Does the NT MD4 hash then des encryption. */
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
+void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24)
{
uchar p21[21];
diff --git a/source/libsmb/smberr.c b/source/libsmb/smberr.c
index 3ef4eaf989e..fbe1d779472 100644
--- a/source/libsmb/smberr.c
+++ b/source/libsmb/smberr.c
@@ -246,18 +246,6 @@ char *smb_dos_errstr(char *inbuf)
return(ret);
}
-
-/*****************************************************************************
- returns an WERROR error message.
- *****************************************************************************/
-char *werror_str(WERROR status)
-{
- static fstring msg;
- slprintf(msg, sizeof(msg), "WIN32 code 0x%08x", W_ERROR_V(status));
- return msg;
-}
-
-
/*****************************************************************************
map a unix errno to a win32 error
*****************************************************************************/
diff --git a/source/locking/brlock.c b/source/locking/brlock.c
index cbf98c46a5e..8c22f7d7ab2 100644
--- a/source/locking/brlock.c
+++ b/source/locking/brlock.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
byte range locking code
Updated to handle range splits/merges.
@@ -163,6 +162,10 @@ static BOOL brl_conflict_other(struct lock_struct *lck1, struct lock_struct *lck
}
+#if DONT_DO_THIS
+ /* doing this traversal could kill solaris machines under high load (tridge) */
+ /* delete any dead locks */
+
/****************************************************************************
Delete a record if it is for a dead process, if check_self is true, then
delete any records belonging to this pid also (there shouldn't be any).
@@ -216,6 +219,7 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat
tdb_chainunlock(tdb, kbuf);
return 0;
}
+#endif
/****************************************************************************
Open up the brlock.tdb database.
@@ -223,8 +227,6 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat
void brl_init(int read_only)
{
- BOOL check_self = False;
-
if (tdb)
return;
tdb = tdb_open_log(lock_path("brlock.tdb"), 0, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
@@ -234,9 +236,14 @@ void brl_init(int read_only)
return;
}
+#if DONT_DO_THIS
+ /* doing this traversal could kill solaris machines under high load (tridge) */
/* delete any dead locks */
- if (!read_only)
+ if (!read_only) {
+ BOOL check_self = False;
tdb_traverse(tdb, delete_fn, &check_self);
+ }
+#endif
}
/****************************************************************************
@@ -245,14 +252,17 @@ void brl_init(int read_only)
void brl_shutdown(int read_only)
{
- BOOL check_self = True;
-
if (!tdb)
return;
+#if DONT_DO_THIS
+ /* doing this traversal could kill solaris machines under high load (tridge) */
/* delete any dead locks */
- if (!read_only)
+ if (!read_only) {
+ BOOL check_self = True;
tdb_traverse(tdb, delete_fn, &check_self);
+ }
+#endif
tdb_close(tdb);
}
@@ -286,6 +296,8 @@ NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
struct lock_struct lock, *locks;
char *tp;
NTSTATUS status = NT_STATUS_OK;
+ static int last_failed = -1;
+ static br_off last_failed_start;
kbuf = locking_key(dev,ino);
@@ -294,7 +306,6 @@ NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
#if !ZERO_ZERO
if (start == 0 && size == 0) {
DEBUG(0,("client sent 0/0 lock - please report this\n"));
- return NT_STATUS_INVALID_PARAMETER;
}
#endif
@@ -350,6 +361,18 @@ NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
return NT_STATUS_OK;
fail:
+ /* this is a nasty hack to try to simulate the lock result cache code in w2k.
+ It isn't completely accurate as I haven't yet worked out the correct
+ semantics (tridge)
+ */
+ if (last_failed == fnum &&
+ last_failed_start == start &&
+ NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED)) {
+ status = NT_STATUS_FILE_LOCK_CONFLICT;
+ }
+ last_failed = fnum;
+ last_failed_start = start;
+
SAFE_FREE(dbuf.dptr);
tdb_chainunlock(tdb, kbuf);
return status;
diff --git a/source/locking/locking.c b/source/locking/locking.c
index 9822c587f1c..90ef61ddf51 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -98,7 +98,7 @@ BOOL is_locked(files_struct *fsp,connection_struct *conn,
Utility function called by locking requests.
****************************************************************************/
-NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
+static NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type)
{
NTSTATUS status;
@@ -143,6 +143,41 @@ NTSTATUS do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
}
/****************************************************************************
+ Utility function called by locking requests. This is *DISGISTING*. It also
+ appears to be "What Windows Does" (tm). Andrew, ever wonder why Windows 2000
+ is so slow on the locking tests...... ? This is the reason. Much though I hate
+ it, we need this. JRA.
+****************************************************************************/
+
+NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
+ SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type)
+{
+ int j, maxj = lp_lock_spin_count();
+ int sleeptime = lp_lock_sleep_time();
+ NTSTATUS status, ret;
+
+ if (maxj <= 0)
+ maxj = 1;
+
+ ret = NT_STATUS_OK; /* to keep dumb compilers happy */
+
+ for (j = 0; j < maxj; j++) {
+ status = do_lock(fsp, conn, lock_pid, count, offset, lock_type);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED) &&
+ !NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT)) {
+ return status;
+ }
+ /* if we do fail then return the first error code we got */
+ if (j == 0) {
+ ret = status;
+ }
+ if (sleeptime)
+ sys_usleep(sleeptime);
+ }
+ return ret;
+}
+
+/****************************************************************************
Utility function called by unlocking requests.
****************************************************************************/
@@ -172,7 +207,7 @@ NTSTATUS do_unlock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
if (!ok) {
DEBUG(10,("do_unlock: returning ERRlock.\n" ));
- return NT_STATUS_LOCK_NOT_GRANTED;
+ return NT_STATUS_RANGE_NOT_LOCKED;
}
if (!lp_posix_locking(SNUM(conn)))
@@ -388,8 +423,8 @@ static char *share_mode_str(int num, share_mode_entry *e)
static pstring share_str;
slprintf(share_str, sizeof(share_str)-1, "share_mode_entry[%d]: \
-pid = %u, share_mode = 0x%x, port = 0x%x, type= 0x%x, file_id = %lu, dev = 0x%x, inode = %.0f",
- num, e->pid, e->share_mode, e->op_port, e->op_type, e->share_file_id,
+pid = %u, share_mode = 0x%x, desired_access = 0x%x, port = 0x%x, type= 0x%x, file_id = %lu, dev = 0x%x, inode = %.0f",
+ num, e->pid, e->share_mode, (unsigned int)e->desired_access, e->op_port, e->op_type, e->share_file_id,
(unsigned int)e->dev, (double)e->inode );
return share_str;
@@ -498,6 +533,7 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t
memset(e, '\0', sizeof(share_mode_entry));
e->pid = sys_getpid();
e->share_mode = fsp->share_mode;
+ e->desired_access = fsp->desired_access;
e->op_port = port;
e->op_type = op_type;
memcpy(x, &fsp->open_time, sizeof(struct timeval));
@@ -508,7 +544,7 @@ static void fill_share_mode(char *p, files_struct *fsp, uint16 port, uint16 op_t
/*******************************************************************
Check if two share mode entries are identical, ignoring oplock
- and port info.
+ and port info and desired_access.
********************************************************************/
BOOL share_modes_identical( share_mode_entry *e1, share_mode_entry *e2)
diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c
index 729e8d48c6d..97f3a7b2092 100644
--- a/source/msdfs/msdfs.c
+++ b/source/msdfs/msdfs.c
@@ -22,7 +22,7 @@
#include "includes.h"
-extern pstring global_myname;
+extern fstring local_machine;
extern uint32 global_client_caps;
#ifdef WITH_MSDFS
@@ -88,8 +88,8 @@ static BOOL create_conn_struct( connection_struct *conn, int snum)
conn->service = snum;
conn->connectpath = lp_pathname(snum);
- if (!vfs_init(conn)) {
- DEBUG(0,("create_conn_struct: vfs init failed.\n"));
+ if (!smbd_vfs_init(conn)) {
+ DEBUG(0,("create_conn_struct: smbd_vfs_init failed.\n"));
return False;
}
return True;
@@ -155,7 +155,8 @@ static inline BOOL parse_symlink(char* buf,struct referral** preflist,
Returns true if the unix path is a valid msdfs symlink
**********************************************************************/
BOOL is_msdfs_link(connection_struct* conn, char* path,
- struct referral** reflistp, int* refcnt)
+ struct referral** reflistp, int* refcnt,
+ SMB_STRUCT_STAT *sbufp)
{
SMB_STRUCT_STAT st;
pstring referral;
@@ -166,12 +167,15 @@ BOOL is_msdfs_link(connection_struct* conn, char* path,
strlower(path);
- if (conn->vfs_ops.lstat(conn,dos_to_unix(path,False),&st) != 0) {
+ if (sbufp == NULL)
+ sbufp = &st;
+
+ if (conn->vfs_ops.lstat(conn,dos_to_unix_static(path), sbufp) != 0) {
DEBUG(5,("is_msdfs_link: %s does not exist.\n",path));
return False;
}
- if (S_ISLNK(st.st_mode)) {
+ if (S_ISLNK(sbufp->st_mode)) {
/* open the link and read it */
referral_len = conn->vfs_ops.readlink(conn, path, referral,
sizeof(pstring));
@@ -230,7 +234,7 @@ static BOOL resolve_dfs_path(char* dfspath, struct dfs_path* dp,
fstrcpy(localpath, conn->connectpath);
fstrcat(localpath, "/");
fstrcat(localpath, dp->reqpath);
- if (is_msdfs_link(conn, localpath, reflistpp, refcntp)) {
+ if (is_msdfs_link(conn, localpath, reflistpp, refcntp, NULL)) {
if (findfirst_flag) {
DEBUG(6,("resolve_dfs_path (FindFirst) No redirection "
"for dfs link %s.\n", dfspath));
@@ -252,7 +256,7 @@ static BOOL resolve_dfs_path(char* dfspath, struct dfs_path* dp,
fstrcpy(localpath, conn->connectpath);
fstrcat(localpath, "/");
fstrcat(localpath, reqpath);
- if (is_msdfs_link(conn, localpath, reflistpp, refcntp)) {
+ if (is_msdfs_link(conn, localpath, reflistpp, refcntp, NULL)) {
DEBUG(4, ("resolve_dfs_path: Redirecting %s because parent %s is dfs link\n", dfspath, localpath));
/* To find the path consumed, we truncate the original
@@ -346,10 +350,15 @@ BOOL get_referred_path(char *pathname, struct junction_map* jn,
parse_dfs_path(pathname, &dp);
/* Verify hostname in path */
- if (global_myname && (strcasecmp(global_myname, dp.hostname) != 0)) {
+ if (local_machine && (strcasecmp(local_machine, dp.hostname) != 0)) {
+
+ /* Hostname mismatch, check if one of our IP addresses */
+ if (!ismyip(*interpret_addr2(dp.hostname))) {
+
DEBUG(3, ("get_referred_path: Invalid hostname %s in path %s\n",
- dp.hostname, pathname));
+ dp.hostname, pathname));
return False;
+ }
}
pstrcpy(jn->service_name, dp.servicename);
@@ -417,9 +426,9 @@ static int setup_ver2_dfs_referral(char* pathname, char** ppdata,
DEBUG(10,("setting up version2 referral\nRequested path:\n"));
- requestedpathlen = (dos_struni2(uni_requestedpath,pathname,512)+1)*2;
+ requestedpathlen = (dos_struni2((char *)uni_requestedpath,pathname,512) + 1) * 2;
- dump_data(10,uni_requestedpath,requestedpathlen);
+ dump_data(10, (char *) uni_requestedpath,requestedpathlen);
DEBUG(10,("ref count = %u\n",junction->referral_count));
@@ -510,9 +519,9 @@ static int setup_ver3_dfs_referral(char* pathname, char** ppdata,
DEBUG(10,("setting up version3 referral\n"));
- reqpathlen = (dos_struni2(uni_reqpath,pathname,512)+1)*2;
+ reqpathlen = (dos_struni2((char *) uni_reqpath,pathname,512)+1)*2;
- dump_data(10,uni_reqpath,reqpathlen);
+ dump_data(10, (char *) uni_reqpath,reqpathlen);
uni_reqpathoffset1 = REFERRAL_HEADER_SIZE + VERSION3_REFERRAL_SIZE * junction->referral_count;
uni_reqpathoffset2 = uni_reqpathoffset1 + reqpathlen;
@@ -582,23 +591,33 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata)
BOOL self_referral = False;
pstring buf;
int reply_size = 0;
+ char *pathnamep = pathname;
ZERO_STRUCT(junction);
/* get the junction entry */
- if (!pathname)
+ if (!pathnamep)
return -1;
- safe_strcpy(buf, pathname, sizeof(buf));
+ /* Trim pathname sent by client so it begins with only one backslash.
+ Two backslashes confuse some dfs clients
+ */
+ while (strlen(pathnamep) > 1 && pathnamep[0] == '\\'
+ && pathnamep[1] == '\\')
+ pathnamep++;
+
+ safe_strcpy(buf, pathnamep, sizeof(buf));
if (!get_referred_path(buf, &junction, &consumedcnt,
&self_referral))
return -1;
if (!self_referral)
{
+ pathnamep[consumedcnt] = '\0';
+
if( DEBUGLVL( 3 ) ) {
int i=0;
- dbgtext("setup_dfs_referral: Path %s to alternate path(s):",pathname);
+ dbgtext("setup_dfs_referral: Path %s to alternate path(s):",pathnamep);
for(i=0;i<junction.referral_count;i++)
dbgtext(" %s",junction.referral_list[i].alternate_path);
dbgtext(".\n");
@@ -613,14 +632,14 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata)
switch(max_referral_level) {
case 2:
{
- reply_size = setup_ver2_dfs_referral(pathname, ppdata, &junction,
+ reply_size = setup_ver2_dfs_referral(pathnamep, ppdata, &junction,
consumedcnt, self_referral);
SAFE_FREE(junction.referral_list);
break;
}
case 3:
{
- reply_size = setup_ver3_dfs_referral(pathname, ppdata, &junction,
+ reply_size = setup_ver3_dfs_referral(pathnamep, ppdata, &junction,
consumedcnt, self_referral);
SAFE_FREE(junction.referral_list);
break;
@@ -655,11 +674,15 @@ BOOL create_junction(char* pathname, struct junction_map* jn)
parse_dfs_path(pathname,&dp);
- /* check if path is dfs : check hostname is the first token */
- if(global_myname && (strcasecmp(global_myname,dp.hostname)!=0)) {
+ /* check if path is dfs : validate first token */
+ if (local_machine && (strcasecmp(local_machine,dp.hostname)!=0)) {
+
+ /* Hostname mismatch, check if one of our IP addresses */
+ if (!ismyip(*interpret_addr2(dp.hostname))) {
DEBUG(4,("create_junction: Invalid hostname %s in dfs path %s\n",
dp.hostname, pathname));
return False;
+ }
}
/* Check for a non-DFS share */
@@ -707,7 +730,7 @@ BOOL create_msdfs_link(struct junction_map* jn, BOOL exists)
connection_struct conns;
connection_struct *conn = &conns;
int i=0;
- BOOL insert_comma;
+ BOOL insert_comma = False;
if(!junction_to_local_path(jn, path, sizeof(path), conn))
return False;
@@ -795,7 +818,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count)
jn[cnt].referral_count = 1;
slprintf(alt_path,sizeof(alt_path)-1,"\\\\%s\\%s",
- global_myname, service_name);
+ local_machine, service_name);
ref = jn[cnt].referral_list = (struct referral*) malloc(sizeof(struct referral));
if (jn[cnt].referral_list == NULL) {
DEBUG(0, ("Malloc failed!\n"));
@@ -808,7 +831,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count)
cnt++;
}
- dirp = conn->vfs_ops.opendir(conn, dos_to_unix(connect_path,False));
+ dirp = conn->vfs_ops.opendir(conn, dos_to_unix_static(connect_path));
if(!dirp)
return False;
@@ -820,7 +843,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count)
pstrcat(pathreal, dname);
if (is_msdfs_link(conn, pathreal, &(jn[cnt].referral_list),
- &(jn[cnt].referral_count))) {
+ &(jn[cnt].referral_count), NULL)) {
pstrcpy(jn[cnt].service_name, service_name);
pstrcpy(jn[cnt].volume_name, dname);
cnt++;
@@ -856,7 +879,8 @@ int enum_msdfs_links(struct junction_map* jn)
}
BOOL is_msdfs_link(connection_struct* conn, char* path,
- struct referral** reflistpp, int* refcntp)
+ struct referral** reflistpp, int* refcntp,
+ SMB_STRUCT_STAT *sbufp)
{
return False;
}
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index fa4e1c4cfd9..52f9d6d9f03 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -50,55 +50,52 @@ BOOL found_lm_clients = False;
time_t StartupTime = 0;
-extern struct in_addr ipzero;
-
/**************************************************************************** **
- Catch a sigterm.
+ Handle a SIGTERM in band.
**************************************************************************** */
-static void sig_term(int sig)
+static void terminate(void)
{
- BlockSignals(True,SIGTERM);
-
- DEBUG(0,("Got SIGTERM: going down...\n"));
-
- /* Write out wins.dat file if samba is a WINS server */
- wins_write_database(False);
-
- /* Remove all SELF registered names. */
- release_my_names();
-
- /* Announce all server entries as 0 time-to-live, 0 type. */
- announce_my_servers_removed();
+ DEBUG(0,("Got SIGTERM: going down...\n"));
+
+ /* Write out wins.dat file if samba is a WINS server */
+ wins_write_database(False);
- /* If there was an async dns child - kill it. */
- kill_async_dns_child();
+ /* Remove all SELF registered names. */
+ release_my_names();
- exit(0);
+ /* Announce all server entries as 0 time-to-live, 0 type. */
+ announce_my_servers_removed();
-} /* sig_term */
+ /* If there was an async dns child - kill it. */
+ kill_async_dns_child();
+
+ exit(0);
+}
/**************************************************************************** **
- Catch a sighup.
+ Catch a SIGTERM signal.
**************************************************************************** */
-static VOLATILE sig_atomic_t reload_after_sighup = False;
+static VOLATILE sig_atomic_t got_sig_term;
-static void sig_hup(int sig)
+static void sig_term(int sig)
{
- BlockSignals( True, SIGHUP );
-
- DEBUG( 0, ( "Got SIGHUP dumping debug info.\n" ) );
-
- write_browse_list( 0, True );
-
- dump_all_namelists();
+ got_sig_term = 1;
+ sys_select_signal();
+}
- reload_after_sighup = True;
+/**************************************************************************** **
+ Catch a SIGHUP signal.
+ **************************************************************************** */
- BlockSignals(False,SIGHUP);
+static VOLATILE sig_atomic_t reload_after_sighup;
-} /* sig_hup */
+static void sig_hup(int sig)
+{
+ reload_after_sighup = 1;
+ sys_select_signal();
+}
#if DUMP_CORE
/**************************************************************************** **
@@ -337,6 +334,15 @@ static void process(void)
return;
/*
+ * Handle termination inband.
+ */
+
+ if (got_sig_term) {
+ got_sig_term = 0;
+ terminate();
+ }
+
+ /*
* Process all incoming packets
* read above. This calls the success and
* failure functions registered when response
@@ -493,11 +499,14 @@ static void process(void)
*/
if(reload_after_sighup) {
- reload_nmbd_services( True );
- reopen_logs();
- if(reload_interfaces(0))
- return;
- reload_after_sighup = False;
+ DEBUG( 0, ( "Got SIGHUP dumping debug info.\n" ) );
+ write_browse_list( 0, True );
+ dump_all_namelists();
+ reload_nmbd_services( True );
+ reopen_logs();
+ if(reload_interfaces(0))
+ return;
+ reload_after_sighup = 0;
}
/* check for new network interfaces */
@@ -662,6 +671,7 @@ static void usage(char *pname)
extern FILE *dbf;
extern char *optarg;
extern BOOL append_log;
+ extern BOOL AllowDebugChange;
BOOL opt_interactive = False;
pstring logfile;
@@ -754,6 +764,7 @@ static void usage(char *pname)
break;
case 'd':
DEBUGLEVEL = atoi(optarg);
+ AllowDebugChange = False;
break;
case 'p':
global_nmb_port = atoi(optarg);
diff --git a/source/nmbd/nmbd_become_dmb.c b/source/nmbd/nmbd_become_dmb.c
index 6825643c85a..7af896e3e03 100644
--- a/source/nmbd/nmbd_become_dmb.c
+++ b/source/nmbd/nmbd_become_dmb.c
@@ -27,7 +27,6 @@
extern pstring global_myname;
extern fstring global_myworkgroup;
extern char **my_netbios_names;
-extern struct in_addr ipzero;
extern struct in_addr allones_ip;
extern uint16 samba_nb_type; /* Samba's NetBIOS type. */
@@ -214,7 +213,7 @@ static void become_domain_master_query_success(struct subnet_record *subrec,
/* BUG note. Samba 1.9.16p11 servers seem to return the broadcast
address or zero ip for this query. Pretend this is ok. */
- if(ismyip(ip) || ip_equal(allones_ip, ip) || ip_equal(ipzero, ip))
+ if(ismyip(ip) || ip_equal(allones_ip, ip) || is_zero_ip(ip))
{
if( DEBUGLVL( 3 ) )
{
@@ -231,12 +230,13 @@ static void become_domain_master_query_success(struct subnet_record *subrec,
else
{
if( DEBUGLVL( 0 ) )
- {
+ {
dbgtext( "become_domain_master_query_success:\n" );
dbgtext( "There is already a domain master browser at " );
dbgtext( "IP %s for workgroup %s ", inet_ntoa(ip), nmbname->name );
dbgtext( "registered on subnet %s.\n", subrec->subnet_name );
- }
+ }
+ become_domain_master_stage1(subrec, nmbname->name);
}
}
diff --git a/source/nmbd/nmbd_browsesync.c b/source/nmbd/nmbd_browsesync.c
index d472b6ff284..40e04e7ecb7 100644
--- a/source/nmbd/nmbd_browsesync.c
+++ b/source/nmbd/nmbd_browsesync.c
@@ -25,7 +25,6 @@
#include "includes.h"
#include "smb.h"
-extern struct in_addr ipzero;
extern pstring global_myname;
extern fstring global_myworkgroup;
@@ -308,7 +307,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec,
/* First check if we already have a dmb for this workgroup. */
- if(!ip_equal(work->dmb_addr, ipzero) && ip_equal(work->dmb_addr, answer_ip))
+ if(!is_zero_ip(work->dmb_addr) && ip_equal(work->dmb_addr, answer_ip))
{
/* Do the local master browser announcement to the domain
master browser name and IP. */
@@ -319,7 +318,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec,
return;
}
else
- putip((char *)&work->dmb_addr, &ipzero);
+ zero_ip(&work->dmb_addr);
/* Now initiate the node status request. */
make_nmb_name(&nmbname,"*",0x0);
diff --git a/source/nmbd/nmbd_logonnames.c b/source/nmbd/nmbd_logonnames.c
index 4f48b21b7fd..52340f1f310 100644
--- a/source/nmbd/nmbd_logonnames.c
+++ b/source/nmbd/nmbd_logonnames.c
@@ -27,7 +27,6 @@
extern pstring global_myname;
extern fstring global_myworkgroup;
extern char **my_netbios_names;
-extern struct in_addr ipzero;
extern struct in_addr allones_ip;
extern uint16 samba_nb_type; /* Samba's NetBIOS type. */
diff --git a/source/nmbd/nmbd_mynames.c b/source/nmbd/nmbd_mynames.c
index b1b3f48b62a..07745e793a1 100644
--- a/source/nmbd/nmbd_mynames.c
+++ b/source/nmbd/nmbd_mynames.c
@@ -80,6 +80,35 @@ Exiting.\n", global_myworkgroup, subrec->subnet_name));
initiate_myworkgroup_startup(subrec, work);
}
+/*******************************************************************
+ Utility function to add a name to the unicast subnet, or add in
+ our IP address if it already exists.
+******************************************************************/
+
+static void insert_refresh_name_into_unicast( struct subnet_record *subrec,
+ struct nmb_name *nmbname, uint16 nb_type )
+{
+ struct name_record *namerec;
+
+ if (!we_are_a_wins_client()) {
+ insert_permanent_name_into_unicast(subrec, nmbname, nb_type);
+ return;
+ }
+
+ if((namerec = find_name_on_subnet(unicast_subnet, nmbname, FIND_SELF_NAME)) == NULL)
+ {
+ /* The name needs to be created on the unicast subnet. */
+ (void)add_name_to_subnet( unicast_subnet, nmbname->name,
+ nmbname->name_type, nb_type,
+ MIN(lp_max_ttl(), MAX_REFRESH_TIME), SELF_NAME, 1, &subrec->myip);
+ }
+ else
+ {
+ /* The name already exists on the unicast subnet. Add our local
+ IP for the given broadcast subnet to the name. */
+ add_ip_to_name_record( namerec, subrec->myip);
+ }
+}
/****************************************************************************
Add my workgroup and my given names to the subnet lists.
@@ -115,13 +144,13 @@ BOOL register_my_workgroup_and_names(void)
struct nmb_name nmbname;
make_nmb_name(&nmbname, my_netbios_names[i],0x20);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
+ insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type);
make_nmb_name(&nmbname, my_netbios_names[i],0x3);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
+ insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type);
make_nmb_name(&nmbname, my_netbios_names[i],0x0);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type);
+ insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type);
}
}
@@ -138,10 +167,10 @@ BOOL register_my_workgroup_and_names(void)
struct nmb_name nmbname;
make_nmb_name(&nmbname, global_myworkgroup, 0x0);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
+ insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
make_nmb_name(&nmbname, global_myworkgroup, 0x1e);
- insert_permanent_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
+ insert_refresh_name_into_unicast(subrec, &nmbname, samba_nb_type|NB_GROUP);
}
/*
diff --git a/source/nmbd/nmbd_namequery.c b/source/nmbd/nmbd_namequery.c
index 1f0895ee37f..9d2a7a48958 100644
--- a/source/nmbd/nmbd_namequery.c
+++ b/source/nmbd/nmbd_namequery.c
@@ -24,8 +24,6 @@
#include "includes.h"
-extern struct in_addr ipzero;
-
/****************************************************************************
Deal with a response packet when querying a name.
****************************************************************************/
@@ -38,7 +36,9 @@ static void query_name_response( struct subnet_record *subrec,
BOOL success = False;
struct nmb_name *question_name =
&rrec->packet->packet.nmb.question.question_name;
- struct in_addr answer_ip = ipzero;
+ struct in_addr answer_ip;
+
+ zero_ip(&answer_ip);
/* Ensure we don't retry the query but leave the response record cleanup
to the timeout code. We may get more answer responses in which case
diff --git a/source/nmbd/nmbd_responserecordsdb.c b/source/nmbd/nmbd_responserecordsdb.c
index b24c85a9d81..63601ff26c4 100644
--- a/source/nmbd/nmbd_responserecordsdb.c
+++ b/source/nmbd/nmbd_responserecordsdb.c
@@ -26,8 +26,6 @@
extern int ClientNMB;
-extern struct in_addr ipzero;
-
int num_response_packets = 0;
/***************************************************************************
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c
index 9030e42b298..0067d89f669 100644
--- a/source/nmbd/nmbd_subnetdb.c
+++ b/source/nmbd/nmbd_subnetdb.c
@@ -33,7 +33,6 @@ extern int global_nmb_port;
extern fstring myworkgroup;
extern char **my_netbios_names;
-extern struct in_addr ipzero;
/* This is the broadcast subnets database. */
struct subnet_record *subnetlist = NULL;
@@ -232,7 +231,7 @@ BOOL create_subnets(void)
{
int num_interfaces = iface_count();
int i;
- struct in_addr unicast_ip;
+ struct in_addr unicast_ip, ipzero;
extern struct in_addr loopback_ip;
if(num_interfaces == 0)
@@ -280,7 +279,7 @@ BOOL create_subnets(void)
struct in_addr real_wins_ip;
real_wins_ip = wins_srv_ip();
- if (!zero_ip(real_wins_ip))
+ if (!is_zero_ip(real_wins_ip))
{
unicast_ip = real_wins_ip;
}
@@ -302,7 +301,7 @@ BOOL create_subnets(void)
{
/* We should not be using a WINS server at all. Set the
ip address of the subnet to be zero. */
- unicast_ip = ipzero;
+ zero_ip(&unicast_ip);
}
/*
@@ -315,6 +314,8 @@ BOOL create_subnets(void)
unicast_subnet = make_subnet( "UNICAST_SUBNET", UNICAST_SUBNET,
unicast_ip, unicast_ip, unicast_ip);
+ zero_ip(&ipzero);
+
remote_broadcast_subnet = make_subnet( "REMOTE_BROADCAST_SUBNET",
REMOTE_BROADCAST_SUBNET,
ipzero, ipzero, ipzero);
@@ -347,7 +348,7 @@ BOOL we_are_a_wins_client(void)
static int cache_we_are_a_wins_client = -1;
if(cache_we_are_a_wins_client == -1)
- cache_we_are_a_wins_client = (ip_equal(ipzero, unicast_subnet->myip) ?
+ cache_we_are_a_wins_client = (is_zero_ip(unicast_subnet->myip) ?
False : True);
return cache_we_are_a_wins_client;
diff --git a/source/nmbd/nmbd_synclists.c b/source/nmbd/nmbd_synclists.c
index 1132d9a5147..c8dac82aa15 100644
--- a/source/nmbd/nmbd_synclists.c
+++ b/source/nmbd/nmbd_synclists.c
@@ -101,7 +101,7 @@ static void sync_child(char *name, int nm_type,
/* All the cli_XX functions take UNIX character set. */
fstrcpy(unix_workgroup, cli.server_domain?cli.server_domain:workgroup);
- dos_to_unix(unix_workgroup, True);
+ dos_to_unix(unix_workgroup);
/* Fetch a workgroup list. */
cli_NetServerEnum(&cli, unix_workgroup,
@@ -111,7 +111,7 @@ static void sync_child(char *name, int nm_type,
/* Now fetch a server list. */
if (servers) {
fstrcpy(unix_workgroup, workgroup);
- dos_to_unix(unix_workgroup, True);
+ dos_to_unix(unix_workgroup);
cli_NetServerEnum(&cli, unix_workgroup,
local?SV_TYPE_LOCAL_LIST_ONLY:SV_TYPE_ALL,
callback, NULL);
@@ -260,7 +260,7 @@ static void complete_sync(struct sync_record *s)
ptr = line;
/* The line is written in UNIX character set. Convert to DOS codepage. */
- unix_to_dos(line,True);
+ unix_to_dos(line);
if (!next_token(&ptr,server,NULL,sizeof(server)) ||
!next_token(&ptr,type_str,NULL, sizeof(type_str)) ||
diff --git a/source/nmbd/nmbd_winsserver.c b/source/nmbd/nmbd_winsserver.c
index 04f7ae33bbc..45385fc4e00 100644
--- a/source/nmbd/nmbd_winsserver.c
+++ b/source/nmbd/nmbd_winsserver.c
@@ -26,12 +26,10 @@
#define WINS_LIST "wins.dat"
#define WINS_VERSION 1
-extern struct in_addr ipzero;
-
-
/****************************************************************************
possibly call the WINS hook external program when a WINS change is made
*****************************************************************************/
+
static void wins_hook(char *operation, struct name_record *namerec, int ttl)
{
pstring command;
diff --git a/source/nmbd/nmbd_workgroupdb.c b/source/nmbd/nmbd_workgroupdb.c
index baa40dc1f9e..1dddc2cd18c 100644
--- a/source/nmbd/nmbd_workgroupdb.c
+++ b/source/nmbd/nmbd_workgroupdb.c
@@ -31,7 +31,6 @@ extern pstring global_myname;
extern fstring global_myworkgroup;
extern char **my_netbios_names;
extern uint16 samba_nb_type;
-extern struct in_addr ipzero;
int workgroup_count = 0; /* unique index key: one for each workgroup */
@@ -101,7 +100,7 @@ static struct work_record *create_workgroup(const char *name, int ttl)
/* No known domain master browser as yet. */
*work->dmb_name.name = '\0';
- putip((char *)&work->dmb_addr, &ipzero);
+ zero_ip(&work->dmb_addr);
/* WfWg uses 01040b01 */
/* Win95 uses 01041501 */
diff --git a/source/nsswitch/hp_nss_common.h b/source/nsswitch/hp_nss_common.h
index 7ce67ed81fa..5f39e9abb05 100644
--- a/source/nsswitch/hp_nss_common.h
+++ b/source/nsswitch/hp_nss_common.h
@@ -2,8 +2,7 @@
#define _HP_NSS_COMMON_H
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
Donated by HP to enable Winbindd to build on HPUX 11.x.
Copyright (C) Jeremy Allison 2002.
@@ -24,12 +23,8 @@
Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_SYNCH_H
#include <synch.h>
-#endif
-#ifdef HAVE_PTHREAD_H
#include <pthread.h>
-#endif
typedef enum {
NSS_SUCCESS,
diff --git a/source/nsswitch/hp_nss_dbdefs.h b/source/nsswitch/hp_nss_dbdefs.h
index c6951277356..bd24772e339 100644
--- a/source/nsswitch/hp_nss_dbdefs.h
+++ b/source/nsswitch/hp_nss_dbdefs.h
@@ -2,8 +2,7 @@
#define _HP_NSS_DBDEFS_H
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
Donated by HP to enable Winbindd to build on HPUX 11.x.
Copyright (C) Jeremy Allison 2002.
diff --git a/source/nsswitch/nss.h b/source/nsswitch/nss.h
index f30f9ca1348..e021b013b50 100644
--- a/source/nsswitch/nss.h
+++ b/source/nsswitch/nss.h
@@ -1,8 +1,7 @@
#ifndef _NSSWITCH_NSS_H
#define _NSSWITCH_NSS_H
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
a common place to work out how to define NSS_STATUS on various
platforms
@@ -73,7 +72,7 @@ typedef enum
#define NSD_MEM_VOLATILE 1
#define NSD_MEM_DYNAMIC 2
-#elif defined(HPUX) && defined(HAVE_NSSWITCH_H)
+#elif defined(HPUX)
/* HP-UX 11 */
#include "nsswitch/hp_nss_common.h"
diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c
index 048140fd790..4d696d7de73 100644
--- a/source/nsswitch/pam_winbind.c
+++ b/source/nsswitch/pam_winbind.c
@@ -1,8 +1,12 @@
/* pam_winbind module
Copyright Andrew Tridgell <tridge@samba.org> 2000
+ Copyright Tim Potter <tpot@samba.org> 2000
+ Copyright Andrew Bartlett <abartlet@samba.org> 2002
largely based on pam_userdb by Christian Gafton <gafton@redhat.com>
+ also contains large slabs of code from pam_unix by Elliot Lee <sopwith@redhat.com>
+ (see copyright below for full details)
*/
#include "pam_winbind.h"
@@ -12,6 +16,10 @@ void init_request(struct winbindd_request *req,int rq_type);
int write_sock(void *buffer, int count);
int read_reply(struct winbindd_response *response);
+/* data tokens */
+
+#define MAX_PASSWD_TRIES 3
+
/* some syslogging */
static void _pam_log(int err, const char *format, ...)
{
@@ -24,27 +32,71 @@ static void _pam_log(int err, const char *format, ...)
closelog();
}
-static int ctrl = 0;
-
static int _pam_parse(int argc, const char **argv)
{
- /* step through arguments */
- for (ctrl = 0; argc-- > 0; ++argv) {
-
- /* generic options */
-
- if (!strcmp(*argv,"debug"))
- ctrl |= PAM_DEBUG_ARG;
- else if (!strcasecmp(*argv, "use_authtok"))
- ctrl |= PAM_USE_AUTHTOK_ARG;
- else if (!strcasecmp(*argv, "unknown_ok"))
- ctrl |= PAM_UNKNOWN_OK_ARG;
- else {
- _pam_log(LOG_ERR, "pam_parse: unknown option; %s", *argv);
- }
- }
+ int ctrl;
+ /* step through arguments */
+ for (ctrl = 0; argc-- > 0; ++argv) {
+
+ /* generic options */
+
+ if (!strcmp(*argv,"debug"))
+ ctrl |= WINBIND_DEBUG_ARG;
+ else if (!strcasecmp(*argv, "use_authtok"))
+ ctrl |= WINBIND_USE_AUTHTOK_ARG;
+ else if (!strcasecmp(*argv, "use_first_pass"))
+ ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
+ else if (!strcasecmp(*argv, "try_first_pass"))
+ ctrl |= WINBIND_USE_FIRST_PASS_ARG;
+ else if (!strcasecmp(*argv, "unknown_ok"))
+ ctrl |= WINBIND_UNKNOWN_OK_ARG;
+ else {
+ _pam_log(LOG_ERR, "pam_parse: unknown option; %s", *argv);
+ }
+ }
+
+ return ctrl;
+}
- return ctrl;
+/* --- authentication management functions --- */
+
+/* Attempt a conversation */
+
+static int converse(pam_handle_t *pamh, int nargs,
+ struct pam_message **message,
+ struct pam_response **response)
+{
+ int retval;
+ struct pam_conv *conv;
+
+ retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv ) ;
+ if (retval == PAM_SUCCESS) {
+ retval = conv->conv(nargs, (const struct pam_message **)message,
+ response, conv->appdata_ptr);
+ }
+
+ return retval; /* propagate error status */
+}
+
+
+int _make_remark(pam_handle_t * pamh, int type, const char *text)
+{
+ int retval = PAM_SUCCESS;
+
+ struct pam_message *pmsg[1], msg[1];
+ struct pam_response *resp;
+
+ pmsg[0] = &msg[0];
+ msg[0].msg = text;
+ msg[0].msg_style = type;
+
+ resp = NULL;
+ retval = converse(pamh, 1, pmsg, &resp);
+
+ if (resp) {
+ _pam_drop_reply(resp, 1);
+ }
+ return retval;
}
static int winbind_request(enum winbindd_cmd req_type,
@@ -55,27 +107,38 @@ static int winbind_request(enum winbindd_cmd req_type,
init_request(request, req_type);
if (write_sock(request, sizeof(*request)) == -1) {
- return -2;
+ _pam_log(LOG_ERR, "write to socket failed!");
+ return PAM_SERVICE_ERR;
}
/* Wait for reply */
if (read_reply(response) == -1) {
- return -2;
+ _pam_log(LOG_ERR, "read from socket failed!");
+ return PAM_SERVICE_ERR;
}
/* Copy reply data from socket */
if (response->result != WINBINDD_OK) {
- return 1;
+ if (response->data.auth.pam_error != PAM_SUCCESS) {
+ _pam_log(LOG_ERR, "request failed, PAM error was %d, NT error was %s",
+ response->data.auth.pam_error,
+ response->data.auth.nt_status_string);
+ return response->data.auth.pam_error;
+ } else {
+ _pam_log(LOG_ERR, "request failed, but PAM error 0!");
+ return PAM_SERVICE_ERR;
+ }
}
- return 0;
+ return PAM_SUCCESS;
}
/* talk to winbindd */
-static int winbind_auth_request(const char *user, const char *pass)
+static int winbind_auth_request(const char *user, const char *pass, int ctrl)
{
struct winbindd_request request;
struct winbindd_response response;
+ int retval;
ZERO_STRUCT(request);
@@ -85,7 +148,33 @@ static int winbind_auth_request(const char *user, const char *pass)
strncpy(request.data.auth.pass, pass,
sizeof(request.data.auth.pass)-1);
- return winbind_request(WINBINDD_PAM_AUTH, &request, &response);
+ retval = winbind_request(WINBINDD_PAM_AUTH, &request, &response);
+
+ switch (retval) {
+ case PAM_AUTH_ERR:
+ /* incorrect password */
+ _pam_log(LOG_WARNING, "user `%s' denied access (incorrect password)", user);
+ return retval;
+ case PAM_USER_UNKNOWN:
+ /* the user does not exist */
+ if (ctrl & WINBIND_DEBUG_ARG)
+ _pam_log(LOG_NOTICE, "user `%s' not found",
+ user);
+ if (ctrl & WINBIND_UNKNOWN_OK_ARG) {
+ return PAM_IGNORE;
+ }
+ return retval;
+ case PAM_SUCCESS:
+ /* Otherwise, the authentication looked good */
+ _pam_log(LOG_NOTICE, "user '%s' granted acces", user);
+ return retval;
+ default:
+ /* we don't know anything about this return value */
+ _pam_log(LOG_ERR, "internal module error (retval = %d, user = `%s'",
+ retval, user);
+ return retval;
+ }
+ /* should not be reached */
}
/* talk to winbindd */
@@ -120,20 +209,6 @@ static int winbind_chauthtok_request(const char *user, const char *oldpass,
}
/*
- * Looks up an user name and checks the password
- *
- * return values:
- * 1 = User not found
- * 0 = OK
- * -1 = Password incorrect
- * -2 = System error
- */
-static int user_lookup(const char *user, const char *pass)
-{
- return winbind_auth_request(user, pass);
-}
-
-/*
* Checks if a user has an account
*
* return values:
@@ -147,27 +222,6 @@ static int valid_user(const char *user)
return 1;
}
-/* --- authentication management functions --- */
-
-/* Attempt a conversation */
-
-static int converse(pam_handle_t *pamh, int nargs,
- struct pam_message **message,
- struct pam_response **response)
-{
- int retval;
- struct pam_conv *conv;
-
- retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv ) ;
- if (retval == PAM_SUCCESS) {
- retval = conv->conv(nargs, (const struct pam_message **)message,
- response, conv->appdata_ptr);
- }
-
- return retval; /* propagate error status */
-}
-
-
static char *_pam_delete(register char *xx)
{
_pam_overwrite(xx);
@@ -176,48 +230,155 @@ static char *_pam_delete(register char *xx)
}
/*
- * This is a conversation function to obtain the user's password
+ * obtain a password from the user
*/
-static int auth_conversation(pam_handle_t *pamh)
+
+int _winbind_read_password(pam_handle_t * pamh
+ ,unsigned int ctrl
+ ,const char *comment
+ ,const char *prompt1
+ ,const char *prompt2
+ ,const char **pass)
{
- struct pam_message msg, *pmsg;
- struct pam_response *resp;
- int retval;
- char * token = NULL;
-
- pmsg = &msg;
- msg.msg_style = PAM_PROMPT_ECHO_OFF;
- msg.msg = "Password: ";
-
- /* so call the conversation expecting i responses */
- resp = NULL;
- retval = converse(pamh, 1, &pmsg, &resp);
-
- if (resp != NULL) {
- char * const item;
- /* interpret the response */
- if (retval == PAM_SUCCESS) { /* a good conversation */
- token = x_strdup(resp[0].resp);
- if (token == NULL) {
- return PAM_AUTHTOK_RECOVER_ERR;
- }
+ int authtok_flag;
+ int retval;
+ const char *item;
+ char *token;
+
+ /*
+ * make sure nothing inappropriate gets returned
+ */
+
+ *pass = token = NULL;
+
+ /*
+ * which authentication token are we getting?
+ */
+
+ authtok_flag = on(WINBIND__OLD_PASSWORD, ctrl) ? PAM_OLDAUTHTOK : PAM_AUTHTOK;
+
+ /*
+ * should we obtain the password from a PAM item ?
+ */
+
+ if (on(WINBIND_TRY_FIRST_PASS_ARG, ctrl) || on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) {
+ retval = pam_get_item(pamh, authtok_flag, (const void **) &item);
+ if (retval != PAM_SUCCESS) {
+ /* very strange. */
+ _pam_log(LOG_ALERT,
+ "pam_get_item returned error to unix-read-password"
+ );
+ return retval;
+ } else if (item != NULL) { /* we have a password! */
+ *pass = item;
+ item = NULL;
+ return PAM_SUCCESS;
+ } else if (on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) {
+ return PAM_AUTHTOK_RECOVER_ERR; /* didn't work */
+ } else if (on(WINBIND_USE_AUTHTOK_ARG, ctrl)
+ && off(WINBIND__OLD_PASSWORD, ctrl)) {
+ return PAM_AUTHTOK_RECOVER_ERR;
+ }
+ }
+ /*
+ * getting here implies we will have to get the password from the
+ * user directly.
+ */
+
+ {
+ struct pam_message msg[3], *pmsg[3];
+ struct pam_response *resp;
+ int i, replies;
+
+ /* prepare to converse */
+
+ if (comment != NULL) {
+ pmsg[0] = &msg[0];
+ msg[0].msg_style = PAM_TEXT_INFO;
+ msg[0].msg = comment;
+ i = 1;
+ } else {
+ i = 0;
+ }
+
+ pmsg[i] = &msg[i];
+ msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
+ msg[i++].msg = prompt1;
+ replies = 1;
+
+ if (prompt2 != NULL) {
+ pmsg[i] = &msg[i];
+ msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
+ msg[i++].msg = prompt2;
+ ++replies;
+ }
+ /* so call the conversation expecting i responses */
+ resp = NULL;
+ retval = converse(pamh, i, pmsg, &resp);
+
+ if (resp != NULL) {
+
+ /* interpret the response */
+
+ if (retval == PAM_SUCCESS) { /* a good conversation */
+
+ token = x_strdup(resp[i - replies].resp);
+ if (token != NULL) {
+ if (replies == 2) {
+
+ /* verify that password entered correctly */
+ if (!resp[i - 1].resp
+ || strcmp(token, resp[i - 1].resp)) {
+ _pam_delete(token); /* mistyped */
+ retval = PAM_AUTHTOK_RECOVER_ERR;
+ _make_remark(pamh ,PAM_ERROR_MSG, MISTYPED_PASS);
+ }
+ }
+ } else {
+ _pam_log(LOG_NOTICE
+ ,"could not recover authentication token");
+ }
+
+ }
+ /*
+ * tidy up the conversation (resp_retcode) is ignored
+ * -- what is it for anyway? AGM
+ */
+
+ _pam_drop_reply(resp, i);
+
+ } else {
+ retval = (retval == PAM_SUCCESS)
+ ? PAM_AUTHTOK_RECOVER_ERR : retval;
+ }
}
- /* set the auth token */
- retval = pam_set_item(pamh, PAM_AUTHTOK, token);
- token = _pam_delete(token); /* clean it up */
- if ( (retval != PAM_SUCCESS) ||
- (retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &item)) != PAM_SUCCESS ) {
- return retval;
+ if (retval != PAM_SUCCESS) {
+ if (on(WINBIND_DEBUG_ARG, ctrl))
+ _pam_log(LOG_DEBUG,
+ "unable to obtain a password");
+ return retval;
}
+ /* 'token' is the entered password */
+
+ /* we store this password as an item */
- _pam_drop_reply(resp, 1);
- } else {
- retval = (retval == PAM_SUCCESS)
- ? PAM_AUTHTOK_RECOVER_ERR:retval ;
- }
+ retval = pam_set_item(pamh, authtok_flag, token);
+ _pam_delete(token); /* clean it up */
+ if (retval != PAM_SUCCESS
+ || (retval = pam_get_item(pamh, authtok_flag
+ ,(const void **) &item))
+ != PAM_SUCCESS) {
+
+ _pam_log(LOG_CRIT, "error manipulating password");
+ return retval;
+
+ }
+
+ *pass = item;
+ item = NULL; /* break link to password */
- return retval;
+ return PAM_SUCCESS;
}
PAM_EXTERN
@@ -229,68 +390,39 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
int retval = PAM_AUTH_ERR;
/* parse arguments */
- ctrl = _pam_parse(argc, argv);
+ int ctrl = _pam_parse(argc, argv);
/* Get the username */
retval = pam_get_user(pamh, &username, NULL);
if ((retval != PAM_SUCCESS) || (!username)) {
- if (ctrl & PAM_DEBUG_ARG)
+ if (ctrl & WINBIND_DEBUG_ARG)
_pam_log(LOG_DEBUG,"can not get the username");
return PAM_SERVICE_ERR;
}
- if ((ctrl & PAM_USE_AUTHTOK_ARG) == 0) {
- /* Converse just to be sure we have the password */
- retval = auth_conversation(pamh);
- if (retval != PAM_SUCCESS) {
- _pam_log(LOG_ERR, "could not obtain password for `%s'",
- username);
- return PAM_CONV_ERR;
- }
- }
+ retval = _winbind_read_password(pamh, ctrl, NULL,
+ "Password: ", NULL,
+ &password);
- /* Get the password */
- retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &password);
if (retval != PAM_SUCCESS) {
_pam_log(LOG_ERR, "Could not retrive user's password");
return PAM_AUTHTOK_ERR;
}
- if (ctrl & PAM_DEBUG_ARG)
+ if (ctrl & WINBIND_DEBUG_ARG) {
+
+ /* Let's not give too much away in the log file */
+
+#ifdef DEBUG_PASSWORD
_pam_log(LOG_INFO, "Verify user `%s' with password `%s'",
username, password);
-
- /* Now use the username to look up password */
- retval = user_lookup(username, password);
- switch (retval) {
- case -2:
- /* some sort of system error. The log was already printed */
- return PAM_SERVICE_ERR;
- case -1:
- /* incorrect password */
- _pam_log(LOG_WARNING, "user `%s' denied access (incorrect password)", username);
- return PAM_AUTH_ERR;
- case 1:
- /* the user does not exist */
- if (ctrl & PAM_DEBUG_ARG)
- _pam_log(LOG_NOTICE, "user `%s' not found",
- username);
- if (ctrl & PAM_UNKNOWN_OK_ARG) {
- return PAM_IGNORE;
- }
- return PAM_USER_UNKNOWN;
- case 0:
- /* Otherwise, the authentication looked good */
- _pam_log(LOG_NOTICE, "user '%s' granted access", username);
- return PAM_SUCCESS;
- default:
- /* we don't know anything about this return value */
- _pam_log(LOG_ERR, "internal module error (retval = %d, user = `%s'",
- retval, username);
- return PAM_SERVICE_ERR;
+#else
+ _pam_log(LOG_INFO, "Verify user `%s'", username);
+#endif
}
- /* should not be reached */
- return PAM_IGNORE;
+
+ /* Now use the username to look up password */
+ return winbind_auth_request(username, password, ctrl);
}
PAM_EXTERN
@@ -312,12 +444,12 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
int retval = PAM_USER_UNKNOWN;
/* parse arguments */
- ctrl = _pam_parse(argc, argv);
+ int ctrl = _pam_parse(argc, argv);
/* Get the username */
retval = pam_get_user(pamh, &username, NULL);
if ((retval != PAM_SUCCESS) || (!username)) {
- if (ctrl & PAM_DEBUG_ARG)
+ if (ctrl & WINBIND_DEBUG_ARG)
_pam_log(LOG_DEBUG,"can not get the username");
return PAM_SERVICE_ERR;
}
@@ -330,15 +462,15 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
return PAM_SERVICE_ERR;
case 1:
/* the user does not exist */
- if (ctrl & PAM_DEBUG_ARG)
+ if (ctrl & WINBIND_DEBUG_ARG)
_pam_log(LOG_NOTICE, "user `%s' not found",
username);
- if (ctrl & PAM_UNKNOWN_OK_ARG)
+ if (ctrl & WINBIND_UNKNOWN_OK_ARG)
return PAM_IGNORE;
return PAM_USER_UNKNOWN;
case 0:
/* Otherwise, the authentication looked good */
- _pam_log(LOG_NOTICE, "user '%s' granted access", username);
+ _pam_log(LOG_NOTICE, "user '%s' granted acces", username);
return PAM_SUCCESS;
default:
/* we don't know anything about this return value */
@@ -351,139 +483,182 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
return PAM_IGNORE;
}
-
-PAM_EXTERN
-int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc,
- const char **argv)
-{
- int retval;
- char *newpw, *oldpw;
- const char *user;
-
- /* Get name of a user */
-
- retval = pam_get_user(pamh, &user, "Username: ");
-
- if (retval != PAM_SUCCESS) {
- return retval;
- }
-
- /* XXX check in domain format */
-
- /* Perform preliminary check and store requested password for updating
- later on */
-
- if (flags & PAM_PRELIM_CHECK) {
- struct pam_message msg[3], *pmsg[3];
- struct pam_response *resp;
-
- /* Converse to ensure we have the current password */
-
- retval = auth_conversation(pamh);
-
- if (retval != PAM_SUCCESS) {
- return retval;
- }
-
- /* Obtain and verify current password */
-
- pmsg[0] = &msg[0];
- msg[0].msg_style = PAM_TEXT_INFO;
- msg[0].msg = "Changing password for user %s";
-
- pmsg[1] = &msg[1];
- msg[1].msg_style = PAM_PROMPT_ECHO_OFF;
- msg[1].msg = "New NT password: ";
-
- pmsg[2] = &msg[2];
- msg[2].msg_style = PAM_PROMPT_ECHO_OFF;
- msg[2].msg = "Retype new NT password: ";
-
- resp = NULL;
-
- retval = converse(pamh, 3, pmsg, &resp);
-
- if (resp != NULL) {
-
- if (retval == PAM_SUCCESS) {
-
- /* Check password entered correctly */
-
- if (strcmp(resp[1].resp, resp[2].resp) != 0) {
- struct pam_response *resp2;
-
- msg[0].msg_style = PAM_ERROR_MSG;
- msg[0].msg = "Sorry, passwords do not match";
-
- converse(pamh, 1, pmsg, &resp2);
-
- _pam_drop_reply(resp, 3);
- _pam_drop_reply(resp2, 1);
-
- return PAM_AUTHTOK_RECOVER_ERR;
- }
-
- /* Store passwords */
-
- retval = pam_set_item(pamh, PAM_OLDAUTHTOK, resp[1].resp);
- _pam_drop_reply(resp, 3);
- }
- }
-
- /* XXX What happens if root? */
- /* XXX try first pass and use first pass args */
-
- return retval;
- }
-
- if (flags & PAM_UPDATE_AUTHTOK) {
-
- retval = pam_get_item(pamh, PAM_OLDAUTHTOK, (const void **)&newpw);
- if (retval != PAM_SUCCESS) {
- return PAM_AUTHTOK_ERR;
- }
-
- retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **)&oldpw);
- if (retval != PAM_SUCCESS) {
- return PAM_AUTHTOK_ERR;
- }
-
- fprintf(stderr, "oldpw = %s, newpw = %s\n", oldpw, newpw);
-
- if (retval == PAM_SUCCESS &&
- winbind_chauthtok_request(user, oldpw, newpw) == 0) {
- return PAM_SUCCESS;
- }
-
- return PAM_AUTHTOK_ERR;
- }
-
- return PAM_SERVICE_ERR;
-}
-
-/* HP added session open and close handlers to always return success */
-PAM_EXTERN
-int pam_sm_open_session(pam_handle_t *pamh, int flags,
- int argc, const char **argv)
+PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags,
+ int argc, const char **argv)
{
/* parse arguments */
- ctrl = _pam_parse(argc, argv);
- if (ctrl & PAM_DEBUG_ARG)
- _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_open_session handler") ;
+ int ctrl = _pam_parse(argc, argv);
+ if (ctrl & WINBIND_DEBUG_ARG)
+ _pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_open_session handler");
return PAM_SUCCESS;
}
-PAM_EXTERN
-int pam_sm_close_session(pam_handle_t *pamh, int flags,
- int argc, const char **argv)
+PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags,
+ int argc, const char **argv)
{
/* parse arguments */
- ctrl = _pam_parse(argc, argv);
- if (ctrl & PAM_DEBUG_ARG)
+ int ctrl = _pam_parse(argc, argv);
+ if (ctrl & WINBIND_DEBUG_ARG)
_pam_log(LOG_DEBUG,"libpam_winbind:pam_sm_close_session handler");
return PAM_SUCCESS;
}
-/* end HP add */
+
+PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ int argc, const char **argv)
+{
+ unsigned int lctrl;
+ int retval;
+ unsigned int ctrl = _pam_parse(argc, argv);
+
+ /* <DO NOT free() THESE> */
+ const char *user;
+ char *pass_old, *pass_new;
+ /* </DO NOT free() THESE> */
+
+ char *Announce;
+
+ int retry = 0;
+
+ /*
+ * First get the name of a user
+ */
+ retval = pam_get_user(pamh, &user, "Username: ");
+ if (retval == PAM_SUCCESS) {
+ if (user == NULL) {
+ _pam_log(LOG_ERR, "username was NULL!");
+ return PAM_USER_UNKNOWN;
+ }
+ if (retval == PAM_SUCCESS && on(WINBIND_DEBUG_ARG, ctrl))
+ _pam_log(LOG_DEBUG, "username [%s] obtained",
+ user);
+ } else {
+ if (on(WINBIND_DEBUG_ARG, ctrl))
+ _pam_log(LOG_DEBUG,
+ "password - could not identify user");
+ return retval;
+ }
+
+ /*
+ * obtain and verify the current password (OLDAUTHTOK) for
+ * the user.
+ */
+
+ if (flags & PAM_PRELIM_CHECK) {
+
+ /* instruct user what is happening */
+#define greeting "Changing password for "
+ Announce = (char *) malloc(sizeof(greeting) + strlen(user));
+ if (Announce == NULL) {
+ _pam_log(LOG_CRIT,
+ "password - out of memory");
+ return PAM_BUF_ERR;
+ }
+ (void) strcpy(Announce, greeting);
+ (void) strcpy(Announce + sizeof(greeting) - 1, user);
+#undef greeting
+
+ lctrl = ctrl | WINBIND__OLD_PASSWORD;
+ retval = _winbind_read_password(pamh, lctrl
+ ,Announce
+ ,"(current) NT password: "
+ ,NULL
+ ,(const char **) &pass_old);
+ free(Announce);
+
+ if (retval != PAM_SUCCESS) {
+ _pam_log(LOG_NOTICE
+ ,"password - (old) token not obtained");
+ return retval;
+ }
+ /* verify that this is the password for this user */
+
+ retval = winbind_auth_request(user, pass_old, ctrl);
+
+ if (retval != PAM_ACCT_EXPIRED
+ && retval != PAM_NEW_AUTHTOK_REQD
+ && retval != PAM_SUCCESS) {
+ pass_old = NULL;
+ return retval;
+ }
+
+ retval = pam_set_item(pamh, PAM_OLDAUTHTOK, (const void *) pass_old);
+ pass_old = NULL;
+ if (retval != PAM_SUCCESS) {
+ _pam_log(LOG_CRIT,
+ "failed to set PAM_OLDAUTHTOK");
+ }
+ } else if (flags & PAM_UPDATE_AUTHTOK) {
+
+ /*
+ * obtain the proposed password
+ */
+
+ /*
+ * get the old token back.
+ */
+
+ retval = pam_get_item(pamh, PAM_OLDAUTHTOK
+ ,(const void **) &pass_old);
+
+ if (retval != PAM_SUCCESS) {
+ _pam_log(LOG_NOTICE, "user not authenticated");
+ return retval;
+ }
+
+ lctrl = ctrl;
+
+ if (on(WINBIND_USE_AUTHTOK_ARG, lctrl)) {
+ ctrl = WINBIND_USE_FIRST_PASS_ARG | lctrl;
+ }
+ retry = 0;
+ retval = PAM_AUTHTOK_ERR;
+ while ((retval != PAM_SUCCESS) && (retry++ < MAX_PASSWD_TRIES)) {
+ /*
+ * use_authtok is to force the use of a previously entered
+ * password -- needed for pluggable password strength checking
+ */
+
+ retval = _winbind_read_password(pamh, lctrl
+ ,NULL
+ ,"Enter new NT password: "
+ ,"Retype new NT password: "
+ ,(const char **) &pass_new);
+
+ if (retval != PAM_SUCCESS) {
+ if (on(WINBIND_DEBUG_ARG, ctrl)) {
+ _pam_log(LOG_ALERT
+ ,"password - new password not obtained");
+ }
+ pass_old = NULL;/* tidy up */
+ return retval;
+ }
+
+ /*
+ * At this point we know who the user is and what they
+ * propose as their new password. Verify that the new
+ * password is acceptable.
+ */
+
+ if (pass_new[0] == '\0') {/* "\0" password = NULL */
+ pass_new = NULL;
+ }
+ }
+
+ /*
+ * By reaching here we have approved the passwords and must now
+ * rebuild the password database file.
+ */
+
+ retval = winbind_chauthtok_request(user, pass_old, pass_new);
+ _pam_overwrite(pass_new);
+ _pam_overwrite(pass_old);
+ pass_old = pass_new = NULL;
+ } else {
+ retval = PAM_SERVICE_ERR;
+ }
+
+ return retval;
+}
#ifdef PAM_STATIC
@@ -494,16 +669,22 @@ struct pam_module _pam_winbind_modstruct = {
pam_sm_authenticate,
pam_sm_setcred,
pam_sm_acct_mgmt,
- pam_sm_open_session,
- pam_sm_close_session,
+ NULL,
+ NULL,
pam_sm_chauthtok
};
#endif
/*
- * Copyright (c) Andrew Tridgell <tridge@samba.org> 2000
- * Copyright (c) Tim Potter <tpot@samba.org> 2000
+ * Copyright (c) Andrew Tridgell <tridge@samba.org> 2000
+ * Copyright (c) Tim Potter <tpot@samba.org> 2000
+ * Copyright (c) Andrew Bartlettt <abartlet@samba.org> 2002
+ * Copyright (c) Jan Rêkorajski 1999.
+ * Copyright (c) Andrew G. Morgan 1996-8.
+ * Copyright (c) Alex O. Yuriev, 1996.
+ * Copyright (c) Cristian Gafton 1996.
+ * Copyright (C) Elliot Lee <sopwith@redhat.com> 1996, Red Hat Software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/source/nsswitch/pam_winbind.h b/source/nsswitch/pam_winbind.h
index 058168c72ec..9897249e164 100644
--- a/source/nsswitch/pam_winbind.h
+++ b/source/nsswitch/pam_winbind.h
@@ -27,7 +27,7 @@
#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX)
-/* Solaris and HPUX always use dynamic pam modules */
+/* Solaris always uses dynamic pam modules */
#define PAM_EXTERN extern
#include <security/pam_appl.h>
@@ -73,9 +73,22 @@ do { \
#define x_strdup(s) ( (s) ? strdup(s):NULL )
#endif
-#define PAM_DEBUG_ARG (1<<0)
-#define PAM_USE_AUTHTOK_ARG (1<<1)
-#define PAM_UNKNOWN_OK_ARG (1<<2)
+#define WINBIND_DEBUG_ARG (1<<0)
+#define WINBIND_USE_AUTHTOK_ARG (1<<1)
+#define WINBIND_UNKNOWN_OK_ARG (1<<2)
+#define WINBIND_TRY_FIRST_PASS_ARG (1<<3)
+#define WINBIND_USE_FIRST_PASS_ARG (1<<4)
+#define WINBIND__OLD_PASSWORD (1<<5)
+
+/*
+ * here is the string to inform the user that the new passwords they
+ * typed were not the same.
+ */
+
+#define MISTYPED_PASS "Sorry, passwords do not match"
+
+#define on(x, y) (x & y)
+#define off(x, y) (!(x & y))
#include "winbind_nss_config.h"
#include "winbindd_nss.h"
diff --git a/source/nsswitch/wb_client.c b/source/nsswitch/wb_client.c
index 843b85c0c7b..efeb26fe45f 100644
--- a/source/nsswitch/wb_client.c
+++ b/source/nsswitch/wb_client.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
winbind client code
@@ -24,31 +23,29 @@
*/
#include "includes.h"
+#include "nsswitch/nss.h"
NSS_STATUS winbindd_request(int req_type,
struct winbindd_request *request,
struct winbindd_response *response);
-/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
- form DOMAIN/user into a domain and a user */
-
-static BOOL parse_domain_user(char *domuser, fstring domain, fstring user)
+static BOOL parse_domain_user(const char *domuser, fstring domain, fstring user)
{
char *p = strchr(domuser,*lp_winbind_separator());
if (!p)
- return False;
-
+ return False;
+
fstrcpy(user, p+1);
fstrcpy(domain, domuser);
domain[PTR_DIFF(p, domuser)] = 0;
strupper(domain);
- return True;
+ return True;
}
/* Call winbindd to convert a name to a sid */
-BOOL winbind_lookup_name(const char *name, DOM_SID *sid,
+BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
enum SID_NAME_USE *name_type)
{
struct winbindd_request request;
@@ -58,19 +55,18 @@ BOOL winbind_lookup_name(const char *name, DOM_SID *sid,
if (!sid || !name_type)
return False;
- /*
- * Don't do the lookup if the name has no separator.
- */
-
- if (!strchr(name, *lp_winbind_separator()))
- return False;
-
/* Send off request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- fstrcpy(request.data.name, name);
+ if (dom_name == NULL) {
+ if (!parse_domain_user(name, request.data.name.dom_name, request.data.name.name))
+ return False;
+ } else {
+ fstrcpy(request.data.name.dom_name, dom_name);
+ fstrcpy(request.data.name.name, name);
+ }
if ((result = winbindd_request(WINBINDD_LOOKUPNAME, &request,
&response)) == NSS_STATUS_SUCCESS) {
@@ -83,7 +79,8 @@ BOOL winbind_lookup_name(const char *name, DOM_SID *sid,
/* Call winbindd to convert sid to name */
-BOOL winbind_lookup_sid(DOM_SID *sid, fstring dom_name, fstring name,
+BOOL winbind_lookup_sid(DOM_SID *sid,
+ fstring dom_name, fstring name,
enum SID_NAME_USE *name_type)
{
struct winbindd_request request;
@@ -106,7 +103,8 @@ BOOL winbind_lookup_sid(DOM_SID *sid, fstring dom_name, fstring name,
/* Copy out result */
if (result == NSS_STATUS_SUCCESS) {
- parse_domain_user(response.data.name.name, dom_name, name);
+ fstrcpy(dom_name, response.data.name.dom_name);
+ fstrcpy(name, response.data.name.name);
*name_type = (enum SID_NAME_USE)response.data.name.type;
DEBUG(10, ("winbind_lookup_sid: SUCCESS: SID %s -> %s %s\n",
@@ -249,7 +247,7 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
}
/* Fetch the list of groups a user is a member of from winbindd. This is
- used by winbind_initgroups and winbind_getgroups. */
+ used by winbind_getgroups. */
static int wb_getgroups(const char *user, gid_t **groups)
{
@@ -362,10 +360,11 @@ int winbind_getgroups(const char *user, int size, gid_t *list)
int result, i;
/*
- * Don't do the lookup if the name has no separator.
+ * Don't do the lookup if the name has no separator _and_ we are not in
+ * 'winbind use default domain' mode.
*/
- if (!strchr(user, *lp_winbind_separator()))
+ if (!(strchr(user, *lp_winbind_separator()) || lp_winbind_use_default_domain()))
return -1;
/* Fetch list of groups */
@@ -445,7 +444,7 @@ BOOL winbind_nametouid(uid_t *puid, const char *name)
DOM_SID sid;
enum SID_NAME_USE name_type;
- if (!winbind_lookup_name(name, &sid, &name_type))
+ if (!winbind_lookup_name(NULL, name, &sid, &name_type))
return False;
if (name_type != SID_NAME_USER)
@@ -461,7 +460,7 @@ BOOL winbind_nametogid(gid_t *pgid, const char *gname)
DOM_SID g_sid;
enum SID_NAME_USE name_type;
- if (!winbind_lookup_name(gname, &g_sid, &name_type))
+ if (!winbind_lookup_name(NULL, gname, &g_sid, &name_type))
return False;
if (name_type != SID_NAME_DOM_GRP)
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c
index d3feaeb4504..6a2143f8f0f 100644
--- a/source/nsswitch/wb_common.c
+++ b/source/nsswitch/wb_common.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
winbind client common code
@@ -58,6 +57,8 @@ void init_request(struct winbindd_request *request, int request_type)
static char *domain_env;
static BOOL initialised;
+ request->length = sizeof(struct winbindd_request);
+
request->cmd = (enum winbindd_cmd)request_type;
request->pid = getpid();
request->domain[0] = '\0';
diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c
index fceb0e86342..9803d6505f4 100644
--- a/source/nsswitch/wbinfo.c
+++ b/source/nsswitch/wbinfo.c
@@ -1,10 +1,10 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind status program.
- Copyright (C) Tim Potter 2000
+ Copyright (C) Tim Potter 2000
+ Copyright (C) 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
@@ -31,6 +31,84 @@ NSS_STATUS winbindd_request(int req_type,
struct winbindd_request *request,
struct winbindd_response *response);
+static char winbind_separator(void)
+{
+ struct winbindd_response response;
+ static BOOL got_sep;
+ static char sep;
+
+ if (got_sep)
+ return sep;
+
+ ZERO_STRUCT(response);
+
+ /* Send off request */
+
+ if (winbindd_request(WINBINDD_INFO, NULL, &response) !=
+ NSS_STATUS_SUCCESS) {
+ printf("could not obtain winbind separator!\n");
+ /* HACK: (this module should not call lp_ funtions) */
+ return *lp_winbind_separator();
+ }
+
+ sep = response.data.info.winbind_separator;
+ got_sep = True;
+
+ if (!sep) {
+ printf("winbind separator was NULL!\n");
+ /* HACK: (this module should not call lp_ funtions) */
+ sep = *lp_winbind_separator();
+ }
+
+ return sep;
+}
+
+static char *get_winbind_domain(void)
+{
+ struct winbindd_response response;
+ static fstring winbind_domain;
+
+ ZERO_STRUCT(response);
+
+ /* Send off request */
+
+ if (winbindd_request(WINBINDD_DOMAIN_NAME, NULL, &response) !=
+ NSS_STATUS_SUCCESS) {
+ printf("could not obtain winbind domain name!\n");
+
+ /* HACK: (this module should not call lp_ funtions) */
+ return lp_workgroup();
+ }
+
+ fstrcpy(winbind_domain, response.data.domain_name);
+
+ return winbind_domain;
+
+}
+
+/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
+ form DOMAIN/user into a domain and a user */
+
+static BOOL parse_wbinfo_domain_user(const char *domuser, fstring domain,
+ fstring user)
+{
+
+ char *p = strchr(domuser,winbind_separator());
+
+ if (!p) {
+ fstrcpy(user, domuser);
+ fstrcpy(domain, get_winbind_domain());
+ return True;
+ }
+
+ fstrcpy(user, p+1);
+ fstrcpy(domain, domuser);
+ domain[PTR_DIFF(p, domuser)] = 0;
+ strupper(domain);
+
+ return True;
+}
+
/* List groups a user is a member of */
static BOOL wbinfo_get_usergroups(char *user)
@@ -48,13 +126,13 @@ static BOOL wbinfo_get_usergroups(char *user)
result = winbindd_request(WINBINDD_GETGROUPS, &request, &response);
- if (result != NSS_STATUS_SUCCESS) {
+ if (result != NSS_STATUS_SUCCESS)
return False;
- }
- for (i = 0; i < response.data.num_entries; i++) {
+ for (i = 0; i < response.data.num_entries; i++)
printf("%d\n", (int)((gid_t *)response.extra_data)[i]);
- }
+
+ SAFE_FREE(response.extra_data);
return True;
}
@@ -71,7 +149,8 @@ static BOOL wbinfo_wins_byname(char *name)
/* Send request */
- fstrcpy(request.data.name, name);
+ fstrcpy(request.data.winsreq, name);
+
if (winbindd_request(WINBINDD_WINS_BYNAME, &request, &response) !=
NSS_STATUS_SUCCESS) {
return False;
@@ -79,7 +158,7 @@ static BOOL wbinfo_wins_byname(char *name)
/* Display response */
- printf("%s\n", response.data.name.name);
+ printf("%s\n", response.data.winsresp);
return True;
}
@@ -96,7 +175,8 @@ static BOOL wbinfo_wins_byip(char *ip)
/* Send request */
- fstrcpy(request.data.name, ip);
+ fstrcpy(request.data.winsreq, ip);
+
if (winbindd_request(WINBINDD_WINS_BYIP, &request, &response) !=
NSS_STATUS_SUCCESS) {
return False;
@@ -104,7 +184,7 @@ static BOOL wbinfo_wins_byip(char *ip)
/* Display response */
- printf("%s\n", response.data.name.name);
+ printf("%s\n", response.data.winsresp);
return True;
}
@@ -121,17 +201,43 @@ static BOOL wbinfo_list_domains(void)
/* Send request */
if (winbindd_request(WINBINDD_LIST_TRUSTDOM, NULL, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
if (response.extra_data) {
- while(next_token((char **)&response.extra_data, name, ",",
- sizeof(fstring))) {
+ char *extra_data = (char *)response.extra_data;
+
+ while(next_token(&extra_data, name, ",", sizeof(fstring)))
printf("%s\n", name);
- }
+
+ SAFE_FREE(response.extra_data);
+ }
+
+ return True;
+}
+
+
+/* show sequence numbers */
+static BOOL wbinfo_show_sequence(void)
+{
+ struct winbindd_response response;
+
+ ZERO_STRUCT(response);
+
+ /* Send request */
+
+ if (winbindd_request(WINBINDD_SHOW_SEQUENCE, NULL, &response) !=
+ NSS_STATUS_SUCCESS)
+ return False;
+
+ /* Display response */
+
+ if (response.extra_data) {
+ char *extra_data = (char *)response.extra_data;
+ printf("%s", extra_data);
+ SAFE_FREE(response.extra_data);
}
return True;
@@ -151,12 +257,11 @@ static BOOL wbinfo_check_secret(void)
if (result) {
- if (response.data.num_entries == 0) {
+ if (response.data.num_entries == 0)
printf("Secret is good\n");
- } else {
+ else
printf("Secret is bad\n0x%08x\n",
response.data.num_entries);
- }
return True;
}
@@ -177,10 +282,10 @@ static BOOL wbinfo_uid_to_sid(uid_t uid)
/* Send request */
request.data.uid = uid;
+
if (winbindd_request(WINBINDD_UID_TO_SID, &request, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
@@ -202,10 +307,10 @@ static BOOL wbinfo_gid_to_sid(gid_t gid)
/* Send request */
request.data.gid = gid;
+
if (winbindd_request(WINBINDD_GID_TO_SID, &request, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
@@ -227,10 +332,10 @@ static BOOL wbinfo_sid_to_uid(char *sid)
/* Send request */
fstrcpy(request.data.sid, sid);
+
if (winbindd_request(WINBINDD_SID_TO_UID, &request, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
@@ -250,10 +355,10 @@ static BOOL wbinfo_sid_to_gid(char *sid)
/* Send request */
fstrcpy(request.data.sid, sid);
+
if (winbindd_request(WINBINDD_SID_TO_GID, &request, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
@@ -275,14 +380,16 @@ static BOOL wbinfo_lookupsid(char *sid)
/* Send off request */
fstrcpy(request.data.sid, sid);
+
if (winbindd_request(WINBINDD_LOOKUPSID, &request, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
- printf("%s %d\n", response.data.name.name, response.data.name.type);
+ printf("%s%c%s %d\n", response.data.name.dom_name,
+ winbind_separator(), response.data.name.name,
+ response.data.name.type);
return True;
}
@@ -294,23 +401,17 @@ static BOOL wbinfo_lookupname(char *name)
struct winbindd_request request;
struct winbindd_response response;
- /*
- * Don't do the lookup if the name has no separator.
- */
-
- if (!strchr(name, *lp_winbind_separator()))
- return False;
-
/* Send off request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- fstrcpy(request.data.name, name);
+ parse_wbinfo_domain_user(name, request.data.name.dom_name,
+ request.data.name.name);
+
if (winbindd_request(WINBINDD_LOOKUPNAME, &request, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Display response */
@@ -328,13 +429,6 @@ static BOOL wbinfo_auth(char *username)
NSS_STATUS result;
char *p;
- /*
- * Don't do the lookup if the name has no separator.
- */
-
- if (!strchr(username, *lp_winbind_separator()))
- return False;
-
/* Send off request */
ZERO_STRUCT(request);
@@ -357,6 +451,10 @@ static BOOL wbinfo_auth(char *username)
printf("plaintext password authentication %s\n",
(result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed");
+ printf("error code was %s (0x%x)\n",
+ response.data.auth.nt_status_string,
+ response.data.auth.nt_status);
+
return result == NSS_STATUS_SUCCESS;
}
@@ -367,16 +465,11 @@ static BOOL wbinfo_auth_crap(char *username)
struct winbindd_request request;
struct winbindd_response response;
NSS_STATUS result;
+ fstring name_user;
+ fstring name_domain;
fstring pass;
char *p;
- /*
- * Don't do the lookup if the name has no separator.
- */
-
- if (!strchr(username, *lp_winbind_separator()))
- return False;
-
/* Send off request */
ZERO_STRUCT(request);
@@ -386,11 +479,14 @@ static BOOL wbinfo_auth_crap(char *username)
if (p) {
*p = 0;
- fstrcpy(request.data.auth_crap.user, username);
fstrcpy(pass, p + 1);
- *p = '%';
- } else
- fstrcpy(request.data.auth_crap.user, username);
+ }
+
+ parse_wbinfo_domain_user(username, name_domain, name_user);
+
+ fstrcpy(request.data.auth_crap.user, name_user);
+
+ fstrcpy(request.data.auth_crap.domain, name_domain);
generate_random_buffer(request.data.auth_crap.chal, 8, False);
@@ -409,6 +505,10 @@ static BOOL wbinfo_auth_crap(char *username)
printf("challenge/response password authentication %s\n",
(result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed");
+ printf("error code was %s (0x%x)\n",
+ response.data.auth.nt_status_string,
+ response.data.auth.nt_status);
+
return result == NSS_STATUS_SUCCESS;
}
@@ -417,6 +517,7 @@ static BOOL wbinfo_auth_crap(char *username)
static BOOL print_domain_users(void)
{
struct winbindd_response response;
+ char *extra_data;
fstring name;
/* Send request to winbind daemon */
@@ -424,21 +525,21 @@ static BOOL print_domain_users(void)
ZERO_STRUCT(response);
if (winbindd_request(WINBINDD_LIST_USERS, NULL, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Look through extra data */
- if (!response.extra_data) {
+ if (!response.extra_data)
return False;
- }
- while(next_token((char **)&response.extra_data, name, ",",
- sizeof(fstring))) {
+ extra_data = (char *)response.extra_data;
+
+ while(next_token(&extra_data, name, ",", sizeof(fstring)))
printf("%s\n", name);
- }
+ SAFE_FREE(response.extra_data);
+
return True;
}
@@ -447,25 +548,26 @@ static BOOL print_domain_users(void)
static BOOL print_domain_groups(void)
{
struct winbindd_response response;
+ char *extra_data;
fstring name;
ZERO_STRUCT(response);
if (winbindd_request(WINBINDD_LIST_GROUPS, NULL, &response) !=
- NSS_STATUS_SUCCESS) {
+ NSS_STATUS_SUCCESS)
return False;
- }
/* Look through extra data */
- if (!response.extra_data) {
+ if (!response.extra_data)
return False;
- }
- while(next_token((char **)&response.extra_data, name, ",",
- sizeof(fstring))) {
+ extra_data = (char *)response.extra_data;
+
+ while(next_token(&extra_data, name, ",", sizeof(fstring)))
printf("%s\n", name);
- }
+
+ SAFE_FREE(response.extra_data);
return True;
}
@@ -475,10 +577,13 @@ static BOOL print_domain_groups(void)
static BOOL wbinfo_set_auth_user(char *username)
{
char *password;
+ fstring user, domain;
/* Separate into user and password */
- password = strchr(username, '%');
+ parse_wbinfo_domain_user(username, domain, user);
+
+ password = strchr(user, '%');
if (password) {
*password = 0;
@@ -488,9 +593,12 @@ static BOOL wbinfo_set_auth_user(char *username)
/* Store in secrets.tdb */
- if (!secrets_init() ||
- !secrets_store(SECRETS_AUTH_USER, username, strlen(username) + 1) ||
- !secrets_store(SECRETS_AUTH_PASSWORD, password, strlen(password) + 1)) {
+ if (!secrets_store(SECRETS_AUTH_USER, username,
+ strlen(username) + 1) ||
+ !secrets_store(SECRETS_AUTH_DOMAIN, domain,
+ strlen(domain) + 1) ||
+ !secrets_store(SECRETS_AUTH_PASSWORD, password,
+ strlen(password) + 1)) {
fprintf(stderr, "error storing authenticated user info\n");
return False;
}
@@ -498,18 +606,32 @@ static BOOL wbinfo_set_auth_user(char *username)
return True;
}
+static BOOL wbinfo_ping(void)
+{
+ NSS_STATUS result;
+
+ result = winbindd_request(WINBINDD_PING, NULL, NULL);
+
+ /* Display response */
+
+ printf("'ping' to winbindd %s\n",
+ (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed");
+
+ return result == NSS_STATUS_SUCCESS;
+}
+
/* Print program usage */
static void usage(void)
{
printf("Usage: wbinfo -ug | -n name | -sSY sid | -UG uid/gid | -tm "
- "| -aA user%%password\n");
+ "| -a user%%password\n");
printf("\t-u\t\t\tlists all domain users\n");
printf("\t-g\t\t\tlists all domain groups\n");
- printf("\t-h name\t\t\tconverts NetBIOS hostname to IP\n");
- printf("\t-i ip\t\t\tconverts IP address to NetBIOS name\n");
printf("\t-n name\t\t\tconverts name to sid\n");
printf("\t-s sid\t\t\tconverts sid to name\n");
+ printf("\t-N name\t\t\tconverts NetBIOS name to IP (WINS)\n");
+ printf("\t-I IP\t\t\tconverts IP address to NetBIOS name (WINS)\n");
printf("\t-U uid\t\t\tconverts uid to sid\n");
printf("\t-G gid\t\t\tconverts gid to sid\n");
printf("\t-S sid\t\t\tconverts sid to uid\n");
@@ -518,16 +640,54 @@ static void usage(void)
printf("\t-m\t\t\tlist trusted domains\n");
printf("\t-r user\t\t\tget user groups\n");
printf("\t-a user%%password\tauthenticate user\n");
- printf("\t-A user%%password\tstore session setup auth password\n");
+ printf("\t-p 'ping' winbindd to see if it is alive\n");
+ printf("\t--sequence\t\tshow sequence numbers of all domains\n");
}
/* Main program */
+enum {
+ OPT_SET_AUTH_USER = 1000,
+ OPT_SEQUENCE,
+};
+
int main(int argc, char **argv)
{
extern pstring global_myname;
int opt;
+ poptContext pc;
+ static char *string_arg;
+ static int int_arg;
+ BOOL got_command = False;
+ int result = 1;
+
+ struct poptOption long_options[] = {
+
+ /* longName, shortName, argInfo, argPtr, value, descrip,
+ argDesc */
+
+ { "help", 'h', POPT_ARG_NONE, 0, 'h' },
+ { "domain-users", 'u', POPT_ARG_NONE, 0, 'u' },
+ { "domain-groups", 'g', POPT_ARG_NONE, 0, 'g' },
+ { "WINS-by-name", 'N', POPT_ARG_STRING, &string_arg, 'N' },
+ { "WINS-by-ip", 'I', POPT_ARG_STRING, &string_arg, 'I' },
+ { "name-to-sid", 'n', POPT_ARG_STRING, &string_arg, 'n' },
+ { "sid-to-name", 's', POPT_ARG_STRING, &string_arg, 's' },
+ { "uid-to-sid", 'U', POPT_ARG_INT, &int_arg, 'U' },
+ { "gid-to-sid", 'G', POPT_ARG_INT, &int_arg, 'G' },
+ { "sid-to-uid", 'S', POPT_ARG_STRING, &string_arg, 'S' },
+ { "sid-to-gid", 'Y', POPT_ARG_STRING, &string_arg, 'Y' },
+ { "check-secret", 't', POPT_ARG_NONE, 0, 't' },
+ { "trusted-domains", 'm', POPT_ARG_NONE, 0, 'm' },
+ { "sequence", 0, POPT_ARG_NONE, 0, OPT_SEQUENCE },
+ { "user-groups", 'r', POPT_ARG_STRING, &string_arg, 'r' },
+ { "authenticate", 'a', POPT_ARG_STRING, &string_arg, 'a' },
+ { "set-auth-user", 0, POPT_ARG_STRING, &string_arg, OPT_SET_AUTH_USER },
+ { "ping", 'p', POPT_ARG_NONE, 0, 'p' },
+ { 0, 0, 0, 0 }
+ };
+
/* Samba client initialisation */
if (!*global_myname) {
@@ -535,9 +695,8 @@ int main(int argc, char **argv)
fstrcpy(global_myname, myhostname());
p = strchr(global_myname, '.');
- if (p) {
+ if (p)
*p = 0;
- }
}
TimeInit();
@@ -550,7 +709,7 @@ int main(int argc, char **argv)
CONFIGFILE, strerror(errno));
exit(1);
}
-
+
load_interfaces();
/* Parse command line options */
@@ -560,126 +719,160 @@ int main(int argc, char **argv)
return 1;
}
- while ((opt = getopt(argc, argv, "h:i:ugs:n:U:G:S:Y:tmr:a:A:")) != EOF) {
+ /* Parse options */
+
+ pc = poptGetContext("wbinfo", argc, (const char **)argv, long_options, 0);
+
+ while((opt = poptGetNextOpt(pc)) != -1) {
+ if (got_command) {
+ fprintf(stderr, "No more than one command may be specified at once.\n");
+ exit(1);
+ }
+ got_command = True;
+ }
+
+ poptFreeContext(pc);
+
+ pc = poptGetContext(NULL, argc, (const char **)argv, long_options,
+ POPT_CONTEXT_KEEP_FIRST);
+
+ while((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
+ case 'h':
+ usage();
+ result = 0;
+ goto done;
case 'u':
if (!print_domain_users()) {
printf("Error looking up domain users\n");
- return 1;
+ goto done;
}
break;
case 'g':
if (!print_domain_groups()) {
printf("Error looking up domain groups\n");
- return 1;
+ goto done;
}
break;
- case 'h':
- if (!wbinfo_wins_byname(optarg)) {
- printf("Could not lookup WINS by hostname %s\n", optarg);
- return 1;
+ case 's':
+ if (!wbinfo_lookupsid(string_arg)) {
+ printf("Could not lookup sid %s\n", string_arg);
+ goto done;
}
break;
- case 'i':
- if (!wbinfo_wins_byip(optarg)) {
- printf("Could not lookup WINS by IP %s\n", optarg);
- return 1;
+ case 'n':
+ if (!wbinfo_lookupname(string_arg)) {
+ printf("Could not lookup name %s\n", string_arg);
+ goto done;
}
break;
- case 's':
- if (!wbinfo_lookupsid(optarg)) {
- printf("Could not lookup sid %s\n", optarg);
- return 1;
+ case 'N':
+ if (!wbinfo_wins_byname(string_arg)) {
+ printf("Could not lookup WINS by name %s\n", string_arg);
+ goto done;
}
break;
- case 'n':
- if (!wbinfo_lookupname(optarg)) {
- printf("Could not lookup name %s\n", optarg);
- return 1;
+ case 'I':
+ if (!wbinfo_wins_byip(string_arg)) {
+ printf("Could not lookup WINS by IP %s\n", string_arg);
+ goto done;
}
break;
case 'U':
- if (!wbinfo_uid_to_sid(atoi(optarg))) {
- printf("Could not convert uid %s to sid\n",
- optarg);
- return 1;
+ if (!wbinfo_uid_to_sid(int_arg)) {
+ printf("Could not convert uid %d to sid\n", int_arg);
+ goto done;
}
break;
case 'G':
- if (!wbinfo_gid_to_sid(atoi(optarg))) {
- printf("Could not convert gid %s to sid\n",
- optarg);
- return 1;
+ if (!wbinfo_gid_to_sid(int_arg)) {
+ printf("Could not convert gid %d to sid\n",
+ int_arg);
+ goto done;
}
break;
case 'S':
- if (!wbinfo_sid_to_uid(optarg)) {
+ if (!wbinfo_sid_to_uid(string_arg)) {
printf("Could not convert sid %s to uid\n",
- optarg);
- return 1;
+ string_arg);
+ goto done;
}
break;
case 'Y':
- if (!wbinfo_sid_to_gid(optarg)) {
+ if (!wbinfo_sid_to_gid(string_arg)) {
printf("Could not convert sid %s to gid\n",
- optarg);
- return 1;
+ string_arg);
+ goto done;
}
break;
case 't':
if (!wbinfo_check_secret()) {
printf("Could not check secret\n");
- return 1;
+ goto done;
}
break;
case 'm':
if (!wbinfo_list_domains()) {
printf("Could not list trusted domains\n");
- return 1;
+ goto done;
+ }
+ break;
+ case OPT_SEQUENCE:
+ if (!wbinfo_show_sequence()) {
+ printf("Could not show sequence numbers\n");
+ goto done;
}
break;
case 'r':
- if (!wbinfo_get_usergroups(optarg)) {
+ if (!wbinfo_get_usergroups(string_arg)) {
printf("Could not get groups for user %s\n",
- optarg);
- return 1;
+ string_arg);
+ goto done;
}
break;
case 'a': {
BOOL got_error = False;
- if (!wbinfo_auth(optarg)) {
+ if (!wbinfo_auth(string_arg)) {
printf("Could not authenticate user %s with "
- "plaintext password\n", optarg);
+ "plaintext password\n", string_arg);
got_error = True;
}
- if (!wbinfo_auth_crap(optarg)) {
+ if (!wbinfo_auth_crap(string_arg)) {
printf("Could not authenticate user %s with "
- "challenge/response\n", optarg);
+ "challenge/response\n", string_arg);
got_error = True;
}
-
+
if (got_error)
- return 1;
+ goto done;
break;
-
- }
- case 'A': {
- if (!(wbinfo_set_auth_user(optarg))) {
- return 1;
- }
- break;
}
- /* Invalid option */
+ case 'p': {
+ if (!wbinfo_ping()) {
+ printf("could not ping winbindd!\n");
+ goto done;
+ }
+ break;
+ }
+ case OPT_SET_AUTH_USER:
+ if (!(wbinfo_set_auth_user(string_arg)))
+ goto done;
+ break;
default:
+ fprintf(stderr, "Invalid option\n");
usage();
- return 1;
+ goto done;
}
}
-
- /* Clean exit */
- return 0;
+ result = 0;
+
+ /* Exit code */
+
+ done:
+ poptFreeContext(pc);
+ return result;
}
diff --git a/source/nsswitch/winbind_nss.c b/source/nsswitch/winbind_nss.c
index cbfea3b1027..0a49f5ec968 100644
--- a/source/nsswitch/winbind_nss.c
+++ b/source/nsswitch/winbind_nss.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Windows NT Domain nsswitch module
@@ -179,9 +178,9 @@ winbind_callback(nsd_file_t **rqp, int fd)
struct winbindd_gr *gr = &response.data.gr;
nsd_file_t *rq;
NSS_STATUS status;
- char result[1024];
+ fstring result;
char *members;
- int i;
+ int i, maxlen;
dequeue_request();
@@ -205,14 +204,17 @@ winbind_callback(nsd_file_t **rqp, int fd)
rq->f_status = NS_NOTFOUND;
return NSD_NEXT;
}
+
+ maxlen = sizeof(result) - 1;
+
switch ((int)rq->f_cmd_data) {
case WINBINDD_WINS_BYNAME:
case WINBINDD_WINS_BYIP:
- snprintf(result,1023,"%s\n",response.data.name.name);
+ snprintf(result,maxlen,"%s\n",response.data.winsresp);
break;
- case WINBINDD_GETPWNAM_FROM_UID:
- case WINBINDD_GETPWNAM_FROM_USER:
- snprintf(result,1023,"%s:%s:%d:%d:%s:%s:%s\n",
+ case WINBINDD_GETPWUID:
+ case WINBINDD_GETPWNAM:
+ snprintf(result,maxlen,"%s:%s:%d:%d:%s:%s:%s\n",
pw->pw_name,
pw->pw_passwd,
pw->pw_uid,
@@ -221,13 +223,13 @@ winbind_callback(nsd_file_t **rqp, int fd)
pw->pw_dir,
pw->pw_shell);
break;
- case WINBINDD_GETGRNAM_FROM_GROUP:
- case WINBINDD_GETGRNAM_FROM_GID:
+ case WINBINDD_GETGRNAM:
+ case WINBINDD_GETGRGID:
if (gr->num_gr_mem && response.extra_data)
members = response.extra_data;
else
members = "";
- snprintf(result,1023,"%s:%s:%d:%s\n",
+ snprintf(result,maxlen,"%s:%s:%d:%s\n",
gr->gr_name, gr->gr_passwd, gr->gr_gid, members);
break;
case WINBINDD_SETGRENT:
@@ -249,7 +251,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
members = (char *)response.extra_data +
(response.data.num_entries * sizeof(struct winbindd_gr));
for (i = 0; i < response.data.num_entries; i++) {
- snprintf(result,1023,"%s:%s:%d:%s\n",
+ snprintf(result,maxlen,"%s:%s:%d:%s\n",
gr->gr_name, gr->gr_passwd, gr->gr_gid,
&members[gr->gr_mem_ofs]);
nsd_logprintf(NSD_LOG_MIN, " GETGRENT %s\n",result);
@@ -275,7 +277,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
return NSD_ERROR;
}
for (i = 0; i < response.data.num_entries; i++) {
- snprintf(result,1023,"%s:%s:%d:%d:%s:%s:%s",
+ snprintf(result,maxlen,"%s:%s:%d:%d:%s:%s:%s",
pw->pw_name,
pw->pw_passwd,
pw->pw_uid,
@@ -398,25 +400,27 @@ int lookup(nsd_file_t *rq)
if (strcasecmp(map,"passwd.byuid") == 0) {
request->data.uid = atoi(key);
- rq->f_cmd_data = (void *)WINBINDD_GETPWNAM_FROM_UID;
+ rq->f_cmd_data = (void *)WINBINDD_GETPWUID;
} else if (strcasecmp(map,"passwd.byname") == 0) {
strncpy(request->data.username, key,
sizeof(request->data.username) - 1);
request->data.username[sizeof(request->data.username) - 1] = '\0';
- rq->f_cmd_data = (void *)WINBINDD_GETPWNAM_FROM_USER;
+ rq->f_cmd_data = (void *)WINBINDD_GETPWNAM;
} else if (strcasecmp(map,"group.byname") == 0) {
strncpy(request->data.groupname, key,
sizeof(request->data.groupname) - 1);
request->data.groupname[sizeof(request->data.groupname) - 1] = '\0';
- rq->f_cmd_data = (void *)WINBINDD_GETGRNAM_FROM_GROUP;
+ rq->f_cmd_data = (void *)WINBINDD_GETGRNAM;
} else if (strcasecmp(map,"group.bygid") == 0) {
request->data.gid = atoi(key);
- rq->f_cmd_data = (void *)WINBINDD_GETGRNAM_FROM_GID;
+ rq->f_cmd_data = (void *)WINBINDD_GETGRGID;
} else if (strcasecmp(map,"hosts.byname") == 0) {
- strncpy(request->data.name, key, sizeof(request->data.name) - 1);
+ strncpy(request->data.winsreq, key, sizeof(request->data.winsreq) - 1);
+ request->data.winsreq[sizeof(request->data.winsreq) - 1] = '\0';
rq->f_cmd_data = (void *)WINBINDD_WINS_BYNAME;
} else if (strcasecmp(map,"hosts.byaddr") == 0) {
- strncpy(request->data.name, key, sizeof(request->data.name) - 1);
+ strncpy(request->data.winsreq, key, sizeof(request->data.winsreq) - 1);
+ request->data.winsreq[sizeof(request->data.winsreq) - 1] = '\0';
rq->f_cmd_data = (void *)WINBINDD_WINS_BYIP;
} else {
/*
@@ -898,8 +902,7 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
request.data.uid = uid;
- ret = winbindd_request(WINBINDD_GETPWNAM_FROM_UID, &request,
- &response);
+ ret = winbindd_request(WINBINDD_GETPWUID, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_pwent(result, &response.data.pw,
@@ -961,8 +964,7 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer,
request.data.username
[sizeof(request.data.username) - 1] = '\0';
- ret = winbindd_request(WINBINDD_GETPWNAM_FROM_USER, &request,
- &response);
+ ret = winbindd_request(WINBINDD_GETPWNAM, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_pwent(result, &response.data.pw, &buffer,
@@ -1158,8 +1160,7 @@ _nss_winbind_getgrnam_r(const char *name,
request.data.groupname
[sizeof(request.data.groupname) - 1] = '\0';
- ret = winbindd_request(WINBINDD_GETGRNAM_FROM_GROUP,
- &request, &response);
+ ret = winbindd_request(WINBINDD_GETGRNAM, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_grent(result, &response.data.gr,
@@ -1221,8 +1222,7 @@ _nss_winbind_getgrgid_r(gid_t gid,
request.data.gid = gid;
- ret = winbindd_request(WINBINDD_GETGRNAM_FROM_GID, &request,
- &response);
+ ret = winbindd_request(WINBINDD_GETGRGID, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
diff --git a/source/nsswitch/winbind_nss_config.h b/source/nsswitch/winbind_nss_config.h
index 5612f207774..0de63878be5 100644
--- a/source/nsswitch/winbind_nss_config.h
+++ b/source/nsswitch/winbind_nss_config.h
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon for ntdom nss module
@@ -88,7 +87,6 @@ NSS_STATUS _nss_winbind_getgrgid_r(gid_t gid,
struct group *result, char *buffer,
size_t buflen, int *errnop);
-#ifndef _SMB_MACROS_H
/* I'm trying really hard not to include anything from smb.h with the
result of some silly looking redeclaration of structures. */
@@ -135,7 +133,7 @@ typedef int BOOL;
/* zero a structure given a pointer to the structure */
#define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
-
+
/* Some systems (SCO) treat UNIX domain sockets as FIFOs */
#ifndef S_IFSOCK
@@ -146,5 +144,4 @@ typedef int BOOL;
#define S_ISSOCK(mode) ((mode & S_IFSOCK) == S_IFSOCK)
#endif
-#endif /* _SMB_MACROS_H */
#endif
diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c
index e349acc2131..b54dec33cb9 100644
--- a/source/nsswitch/winbind_nss_solaris.c
+++ b/source/nsswitch/winbind_nss_solaris.c
@@ -10,8 +10,13 @@
#include <sys/param.h>
#include <string.h>
#include <pwd.h>
-#include <syslog.h>
#include "includes.h"
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+#ifdef HAVE_SYS_SYSLOG_H
+#include <sys/syslog.h>
+#endif
#include "winbind_nss_config.h"
#if defined(HAVE_NSS_COMMON_H) || defined(HPUX)
@@ -273,4 +278,6 @@ _nss_winbind_group_constr (const char* db_name,
return be;
}
-#endif /* defined(HAVE_NSS_COMMON_H) || defined(HPUX) */
+#endif /* SUN_NSS */
+
+
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 5dc28a43695..666472eddbe 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Winbind daemon for ntdom nss module
@@ -23,12 +22,13 @@
#include "winbindd.h"
-pstring servicesf = CONFIGFILE;
-
/* List of all connected clients */
struct winbindd_cli_state *client_list;
static int num_clients;
+BOOL opt_nocache;
+
+pstring servicesf = CONFIGFILE;
/* Reload configuration */
@@ -49,12 +49,14 @@ static BOOL reload_services_file(BOOL test)
snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE);
lp_set_logfile(logfile);
+
reopen_logs();
ret = lp_load(servicesf,False,False,True);
snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE);
lp_set_logfile(logfile);
+
reopen_logs();
load_interfaces();
@@ -138,7 +140,6 @@ static void print_winbindd_status(void)
{
winbindd_status();
winbindd_idmap_status();
- winbindd_cache_status();
winbindd_cm_status();
}
@@ -146,9 +147,8 @@ static void print_winbindd_status(void)
static void flush_caches(void)
{
- /* Clear cached user and group enumation info */
-
- winbindd_flush_cache();
+ /* Clear cached user and group enumation info */
+ wcache_flush_cache();
}
/* Handle the signal by unlinking socket and exiting */
@@ -156,10 +156,9 @@ static void flush_caches(void)
static void terminate(void)
{
pstring path;
-
- /* Close idmap. */
- winbindd_idmap_close();
+ winbindd_idmap_close();
+
/* Remove socket file */
snprintf(path, sizeof(path), "%s/%s",
WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
@@ -175,11 +174,11 @@ static void termination_handler(int signum)
sys_select_signal();
}
-static BOOL do_sigusr1;
+static BOOL do_sigusr2;
-static void sigusr1_handler(int signum)
+static void sigusr2_handler(int signum)
{
- do_sigusr1 = True;
+ do_sigusr2 = True;
sys_select_signal();
}
@@ -195,92 +194,8 @@ static void sighup_handler(int signum)
static int create_sock(void)
{
- struct sockaddr_un sunaddr;
- struct stat st;
- int sock;
- mode_t old_umask;
- pstring path;
-
- /* Create the socket directory or reuse the existing one */
-
- if (lstat(WINBINDD_SOCKET_DIR, &st) == -1) {
-
- if (errno == ENOENT) {
-
- /* Create directory */
-
- if (mkdir(WINBINDD_SOCKET_DIR, 0755) == -1) {
- DEBUG(0, ("error creating socket directory "
- "%s: %s\n", WINBINDD_SOCKET_DIR,
- strerror(errno)));
- return -1;
- }
-
- } else {
-
- DEBUG(0, ("lstat failed on socket directory %s: %s\n",
- WINBINDD_SOCKET_DIR, strerror(errno)));
- return -1;
- }
-
- } else {
-
- /* Check ownership and permission on existing directory */
-
- if (!S_ISDIR(st.st_mode)) {
- DEBUG(0, ("socket directory %s isn't a directory\n",
- WINBINDD_SOCKET_DIR));
- return -1;
- }
-
- if ((st.st_uid != sec_initial_uid()) ||
- ((st.st_mode & 0777) != 0755)) {
- DEBUG(0, ("invalid permissions on socket directory "
- "%s\n", WINBINDD_SOCKET_DIR));
- return -1;
- }
- }
-
- /* Create the socket file */
-
- old_umask = umask(0);
-
- sock = socket(AF_UNIX, SOCK_STREAM, 0);
-
- if (sock == -1) {
- perror("socket");
- return -1;
- }
-
- snprintf(path, sizeof(path), "%s/%s",
- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
-
- unlink(path);
- memset(&sunaddr, 0, sizeof(sunaddr));
- sunaddr.sun_family = AF_UNIX;
- safe_strcpy(sunaddr.sun_path, path, sizeof(sunaddr.sun_path)-1);
-
- if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) {
- DEBUG(0, ("bind failed on winbind socket %s: %s\n",
- path,
- strerror(errno)));
- close(sock);
- return -1;
- }
-
- if (listen(sock, 5) == -1) {
- DEBUG(0, ("listen failed on winbind socket %s: %s\n",
- path,
- strerror(errno)));
- close(sock);
- return -1;
- }
-
- umask(old_umask);
-
- /* Success! */
-
- return sock;
+ return create_pipe_sock( WINBINDD_SOCKET_DIR,
+ WINBINDD_SOCKET_NAME, 0755);
}
struct dispatch_table {
@@ -293,8 +208,8 @@ static struct dispatch_table dispatch_table[] = {
/* User functions */
- { WINBINDD_GETPWNAM_FROM_USER, winbindd_getpwnam_from_user, "GETPWNAM_FROM_USER" },
- { WINBINDD_GETPWNAM_FROM_UID, winbindd_getpwnam_from_uid, "GETPWNAM_FROM_UID" },
+ { WINBINDD_GETPWNAM, winbindd_getpwnam, "GETPWNAM" },
+ { WINBINDD_GETPWUID, winbindd_getpwuid, "GETPWUID" },
{ WINBINDD_SETPWENT, winbindd_setpwent, "SETPWENT" },
{ WINBINDD_ENDPWENT, winbindd_endpwent, "ENDPWENT" },
@@ -304,8 +219,8 @@ static struct dispatch_table dispatch_table[] = {
/* Group functions */
- { WINBINDD_GETGRNAM_FROM_GROUP, winbindd_getgrnam_from_group, "GETGRNAM_FROM_GROUP" },
- { WINBINDD_GETGRNAM_FROM_GID, winbindd_getgrnam_from_gid, "GETGRNAM_FROM_GID" },
+ { WINBINDD_GETGRNAM, winbindd_getgrnam, "GETGRNAM" },
+ { WINBINDD_GETGRGID, winbindd_getgrgid, "GETGRGID" },
{ WINBINDD_SETGRENT, winbindd_setgrent, "SETGRENT" },
{ WINBINDD_ENDGRENT, winbindd_endgrent, "ENDGRENT" },
{ WINBINDD_GETGRENT, winbindd_getgrent, "GETGRENT" },
@@ -313,9 +228,7 @@ static struct dispatch_table dispatch_table[] = {
/* PAM auth functions */
{ WINBINDD_PAM_AUTH, winbindd_pam_auth, "PAM_AUTH" },
-#if ALLOW_WINBIND_AUTH_CRAP
{ WINBINDD_PAM_AUTH_CRAP, winbindd_pam_auth_crap, "AUTH_CRAP" },
-#endif
{ WINBINDD_PAM_CHAUTHTOK, winbindd_pam_chauthtok, "CHAUTHTOK" },
/* Enumeration functions */
@@ -323,6 +236,7 @@ static struct dispatch_table dispatch_table[] = {
{ WINBINDD_LIST_USERS, winbindd_list_users, "LIST_USERS" },
{ WINBINDD_LIST_GROUPS, winbindd_list_groups, "LIST_GROUPS" },
{ WINBINDD_LIST_TRUSTDOM, winbindd_list_trusted_domains, "LIST_TRUSTDOM" },
+ { WINBINDD_SHOW_SEQUENCE, winbindd_show_sequence, "SHOW_SEQUENCE" },
/* SID related functions */
@@ -339,11 +253,15 @@ static struct dispatch_table dispatch_table[] = {
/* Miscellaneous */
{ WINBINDD_CHECK_MACHACC, winbindd_check_machine_acct, "CHECK_MACHACC" },
+ { WINBINDD_PING, winbindd_ping, "PING" },
+ { WINBINDD_INFO, winbindd_info, "INFO" },
+ { WINBINDD_INTERFACE_VERSION, winbindd_interface_version, "INTERFACE_VERSION" },
+ { WINBINDD_DOMAIN_NAME, winbindd_domain_name, "DOMAIN_NAME" },
/* WINS functions */
- { WINBINDD_WINS_BYNAME, winbindd_wins_byname, "WINS_BYNAME" },
- { WINBINDD_WINS_BYIP, winbindd_wins_byip, "WINS_BYIP" },
+ { WINBINDD_WINS_BYNAME, winbindd_wins_byname, "WINS_BYNAME" },
+ { WINBINDD_WINS_BYIP, winbindd_wins_byip, "WINS_BYIP" },
/* End of list */
@@ -475,16 +393,15 @@ static void client_read(struct winbindd_cli_state *state)
/* Read data */
do {
- n = read(state->sock, state->read_buf_len + (char *)&state->request,
- sizeof(state->request) - state->read_buf_len);
- } while (n == -1 && errno == EINTR);
-
- DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n,
- sizeof(state->request) - n - state->read_buf_len ));
- /* Read failed, kill client */
+ n = read(state->sock, state->read_buf_len +
+ (char *)&state->request,
+ sizeof(state->request) - state->read_buf_len);
+
+ } while (n == -1 && errno == EINTR);
if (n == -1 || n == 0) {
+ /* Read failed, kill client */
DEBUG(5,("read failed on sock %d, pid %d: %s\n",
state->sock, state->pid,
(n == -1) ? strerror(errno) : "EOF"));
@@ -493,6 +410,8 @@ static void client_read(struct winbindd_cli_state *state)
return;
}
+ DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len ));
+
/* Update client state */
state->read_buf_len += n;
@@ -594,9 +513,14 @@ static void process_loop(int accept_sock)
int maxfd = accept_sock, selret;
struct timeval timeout;
+ /* Handle messages */
+
+ message_dispatch();
+
/* Free up temporary memory */
lp_talloc_free();
+ main_loop_talloc_free();
/* Initialise fd lists for select() */
@@ -676,8 +600,6 @@ static void process_loop(int accept_sock)
client_read(state);
-#if 0
- /* JRA - currently there's no length field in the request... */
/*
* If we have the start of a
* packet, then check the
@@ -686,19 +608,14 @@ static void process_loop(int accept_sock)
* Mock Swedish.
*/
- if (state->read_buf_len >= sizeof(int)
- && *(int *) state->buf != sizeof(state->request)) {
-
- struct winbindd_cli_state *rem_state = state;
-
+ if (state->read_buf_len >= sizeof(uint32)
+ && *(uint32 *) &state->request != sizeof(state->request)) {
DEBUG(0,("process_loop: Invalid request size (%d) send, should be (%d)\n",
- *(int *) rem_state->buf, sizeof(rem_state->request) ));
+ *(uint32 *) &state->request, sizeof(state->request)));
- state = state_next;
- remove_client(rem_state);
- continue;
+ remove_client(state);
+ break;
}
-#endif
/* A request packet might be
complete */
@@ -716,6 +633,10 @@ static void process_loop(int accept_sock)
}
}
+#if 0
+ winbindd_check_cache_size(time(NULL));
+#endif
+
/* Check signal handling things */
if (do_sigterm)
@@ -730,9 +651,9 @@ static void process_loop(int accept_sock)
do_sighup = False;
}
- if (do_sigusr1) {
+ if (do_sigusr2) {
print_winbindd_status();
- do_sigusr1 = False;
+ do_sigusr2 = False;
}
}
}
@@ -741,20 +662,33 @@ static void process_loop(int accept_sock)
struct winbindd_state server_state; /* Server state information */
+
+static void usage(void)
+{
+ printf("Usage: winbindd [options]\n");
+ printf("\t-i interactive mode\n");
+ printf("\t-n disable cacheing\n");
+ printf("\t-d level set debug level\n");
+ printf("\t-s configfile choose smb.conf location\n");
+ printf("\t-h show this help message\n");
+}
+
int main(int argc, char **argv)
{
+ extern BOOL AllowDebugChange;
extern pstring global_myname;
extern fstring global_myworkgroup;
extern BOOL append_log;
pstring logfile;
int accept_sock;
BOOL interactive = False;
- int opt, new_debuglevel = -1;
+ int opt;
/* glibc (?) likes to print "User defined signal 1" and exit if a
- SIGUSR1 is received before a handler is installed */
+ SIGUSR[12] is received before a handler is installed */
CatchSignal(SIGUSR1, SIG_IGN);
+ CatchSignal(SIGUSR2, SIG_IGN);
TimeInit();
@@ -773,34 +707,40 @@ int main(int argc, char **argv)
/* Initialise samba/rpc client stuff */
- while ((opt = getopt(argc, argv, "id:s:")) != EOF) {
+ while ((opt = getopt(argc, argv, "id:s:nh")) != EOF) {
switch (opt) {
- /* Don't become a daemon */
-
+ /* Don't become a daemon */
case 'i':
interactive = True;
break;
- /* Run with specified debug level */
+ /* disable cacheing */
+ case 'n':
+ opt_nocache = True;
+ break;
+ /* Run with specified debug level */
case 'd':
- new_debuglevel = atoi(optarg);
+ DEBUGLEVEL = atoi(optarg);
+ AllowDebugChange = False;
break;
/* Load a different smb.conf file */
-
case 's':
pstrcpy(servicesf,optarg);
break;
+ case 'h':
+ usage();
+ exit(0);
+
default:
printf("Unknown option %c\n", (char)opt);
exit(1);
}
}
-
/* Append to log file by default as we are a single process daemon
program. */
@@ -808,6 +748,7 @@ int main(int argc, char **argv)
snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE);
lp_set_logfile(logfile);
+
setup_logging("winbindd", interactive);
reopen_logs();
@@ -819,9 +760,12 @@ int main(int argc, char **argv)
exit(1);
}
+ pidfile_create("winbindd");
+
codepage_initialise(lp_client_code_page());
/* Setup names. */
+
if (!*global_myname) {
char *p;
@@ -831,10 +775,7 @@ int main(int argc, char **argv)
*p = 0;
}
- fstrcpy(global_myworkgroup, lp_workgroup());
-
- if (new_debuglevel != -1)
- DEBUGLEVEL = new_debuglevel;
+ fstrcpy(global_myworkgroup, lp_workgroup());
if (!interactive)
become_daemon();
@@ -853,10 +794,10 @@ int main(int argc, char **argv)
secrets_init();
/* Get list of domains we look up requests for. This includes the
- domain which we are a member of as well as any trusted
- domains. */
+ domain which we are a member of as well as any trusted
+ domains. */
- get_domain_info();
+ init_domain_list();
ZERO_STRUCT(server_state);
@@ -868,8 +809,6 @@ int main(int argc, char **argv)
if (!winbindd_idmap_init())
return 1;
- winbindd_cache_init();
-
/* Unblock all signals we are interested in as they may have been
blocked by the parent process. */
@@ -877,6 +816,7 @@ int main(int argc, char **argv)
BlockSignals(False, SIGQUIT);
BlockSignals(False, SIGTERM);
BlockSignals(False, SIGUSR1);
+ BlockSignals(False, SIGUSR2);
BlockSignals(False, SIGHUP);
/* Setup signal handlers */
@@ -887,9 +827,16 @@ int main(int argc, char **argv)
CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */
- CatchSignal(SIGUSR1, sigusr1_handler); /* Debugging sigs */
+ CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */
CatchSignal(SIGHUP, sighup_handler);
+ /* Initialise messaging system */
+
+ if (!message_init()) {
+ DEBUG(0, ("unable to initialise messaging system\n"));
+ exit(1);
+ }
+
/* Create UNIX domain socket */
if ((accept_sock = create_sock()) == -1) {
@@ -901,5 +848,9 @@ int main(int argc, char **argv)
process_loop(accept_sock);
+#if 0
+ uni_group_cache_shutdown();
+#endif
+
return 0;
}
diff --git a/source/nsswitch/winbindd.h b/source/nsswitch/winbindd.h
index 5d1b43527bd..4d35c27c213 100644
--- a/source/nsswitch/winbindd.h
+++ b/source/nsswitch/winbindd.h
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon for ntdom nss module
@@ -51,11 +50,8 @@ struct getent_state {
struct getent_state *prev, *next;
void *sam_entries;
uint32 sam_entry_index, num_sam_entries;
- uint32 dispinfo_ndx;
- uint32 grp_query_start_ndx;
- BOOL got_all_sam_entries, got_sam_entries;
- struct winbindd_domain *domain;
- POLICY_HND dom_pol; /* Cached SAMR domain handle. */
+ BOOL got_sam_entries;
+ fstring domain_name;
};
/* Storage for cached getpwent() user entries */
@@ -78,15 +74,105 @@ struct winbindd_state {
extern struct winbindd_state server_state; /* Server information */
+typedef struct {
+ char *acct_name;
+ char *full_name;
+ uint32 user_rid;
+ uint32 group_rid; /* primary group */
+} WINBIND_USERINFO;
+
/* Structures to hold per domain information */
struct winbindd_domain {
fstring name; /* Domain name */
+ fstring full_name; /* full Domain name (realm) */
DOM_SID sid; /* SID for this domain */
- struct winbindd_domain *prev, *next; /* Linked list info */
+
+ /* Lookup methods for this domain (LDAP or RPC) */
+
+ struct winbindd_methods *methods;
+
+ /* Private data for the backends (used for connection cache) */
+
+ void *private;
+
+ /* Sequence number stuff */
+
+ time_t last_seq_check;
+ uint32 sequence_number;
+
+ /* Linked list info */
+
+ struct winbindd_domain *prev, *next;
};
-extern struct winbindd_domain *domain_list; /* List of domains we know */
+/* per-domain methods. This is how LDAP vs RPC is selected
+ */
+struct winbindd_methods {
+ /* does this backend provide a consistent view of the data? (ie. is the primary group
+ always correct) */
+ BOOL consistent;
+
+ /* get a list of users, returning a WINBIND_USERINFO for each one */
+ NTSTATUS (*query_user_list)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_entries,
+ WINBIND_USERINFO **info);
+
+ /* get a list of groups */
+ NTSTATUS (*enum_dom_groups)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_entries,
+ struct acct_info **info);
+
+ /* convert one user or group name to a sid */
+ NTSTATUS (*name_to_sid)(struct winbindd_domain *domain,
+ const char *name,
+ DOM_SID *sid,
+ enum SID_NAME_USE *type);
+
+ /* convert a sid to a user or group name */
+ NTSTATUS (*sid_to_name)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ DOM_SID *sid,
+ char **name,
+ enum SID_NAME_USE *type);
+
+ /* lookup user info for a given rid */
+ NTSTATUS (*query_user)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 user_rid,
+ WINBIND_USERINFO *user_info);
+
+ /* lookup all groups that a user is a member of. The backend
+ can also choose to lookup by username or rid for this
+ function */
+ NTSTATUS (*lookup_usergroups)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 user_rid,
+ uint32 *num_groups, uint32 **user_gids);
+
+ /* find all members of the group with the specified group_rid */
+ NTSTATUS (*lookup_groupmem)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 group_rid, uint32 *num_names,
+ uint32 **rid_mem, char ***names,
+ uint32 **name_types);
+
+ /* return the current global sequence number */
+ NTSTATUS (*sequence_number)(struct winbindd_domain *domain, uint32 *seq);
+
+ /* enumerate trusted domains */
+ NTSTATUS (*trusted_domains)(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_domains,
+ char ***names,
+ DOM_SID **dom_sids);
+
+ /* find the domain sid */
+ NTSTATUS (*domain_sid)(struct winbindd_domain *domain,
+ DOM_SID *sid);
+};
/* Used to glue a policy handle and cli_state together */
@@ -117,9 +203,4 @@ typedef struct {
#define SETENV(name, value, overwrite) ;
#endif
-/* Authenticated user info is stored in secrets.tdb under these keys */
-
-#define SECRETS_AUTH_USER "SECRETS/AUTH_USER"
-#define SECRETS_AUTH_PASSWORD "SECRETS/AUTH_PASSWORD"
-
#endif /* _WINBINDD_H */
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c
index 8ad5bc2e7d8..3a76ba97fae 100644
--- a/source/nsswitch/winbindd_cache.c
+++ b/source/nsswitch/winbindd_cache.c
@@ -1,10 +1,9 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
- Winbind daemon - caching related functions
+ Winbind cache backend functions
- Copyright (C) Tim Potter 2000
+ Copyright (C) Andrew Tridgell 2001
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
@@ -23,642 +22,859 @@
#include "winbindd.h"
-#define CACHE_TYPE_USER "USR"
-#define CACHE_TYPE_GROUP "GRP"
-#define CACHE_TYPE_NAME "NAM" /* Stores mapping from SID to name. */
-#define CACHE_TYPE_SID "SID" /* Stores mapping from name to SID. */
-
-/* Initialise caching system */
-
-static TDB_CONTEXT *cache_tdb;
-
-struct cache_rec {
- uint32 seq_num;
- time_t mod_time;
+struct winbind_cache {
+ struct winbindd_methods *backend;
+ TDB_CONTEXT *tdb;
};
-void winbindd_cache_init(void)
-{
- /* Open tdb cache */
+struct cache_entry {
+ NTSTATUS status;
+ uint32 sequence_number;
+ uint8 *data;
+ uint32 len, ofs;
+};
- if (!(cache_tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0,
- TDB_NOLOCK, O_RDWR | O_CREAT | O_TRUNC,
- 0600)))
- DEBUG(0, ("Unable to open tdb cache - user and group caching disabled\n"));
-}
+#define WINBINDD_MAX_CACHE_SIZE (50*1024*1024)
-/* find the sequence number for a domain */
+static struct winbind_cache *wcache;
-static uint32 domain_sequence_number(struct winbindd_domain *domain)
+/* flush the cache */
+void wcache_flush_cache(void)
{
- TALLOC_CTX *mem_ctx;
- CLI_POLICY_HND *hnd;
- SAM_UNK_CTR ctr;
- uint16 switch_value = 2;
- NTSTATUS result;
- uint32 seqnum = DOM_SEQUENCE_NONE;
- POLICY_HND dom_pol;
- BOOL got_dom_pol = False;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
+ extern BOOL opt_nocache;
- if (!(mem_ctx = talloc_init()))
- return DOM_SEQUENCE_NONE;
-
- /* Get sam handle */
-
- if (!(hnd = cm_get_sam_handle(domain->name)))
- goto done;
-
- /* Get domain handle */
+ if (!wcache) return;
+ if (wcache->tdb) {
+ tdb_close(wcache->tdb);
+ wcache->tdb = NULL;
+ }
+ if (opt_nocache) return;
- result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol,
- des_access, &domain->sid, &dom_pol);
+ wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000,
+ TDB_DEFAULT, O_RDWR | O_CREAT | O_TRUNC, 0600);
- if (!NT_STATUS_IS_OK(result))
- goto done;
+ if (!wcache->tdb) {
+ DEBUG(0,("Failed to open winbindd_cache.tdb!\n"));
+ }
+}
- got_dom_pol = True;
+void winbindd_check_cache_size(time_t t)
+{
+ static time_t last_check_time;
+ struct stat st;
- /* Query domain info */
+ if (last_check_time == (time_t)0)
+ last_check_time = t;
- result = cli_samr_query_dom_info(hnd->cli, mem_ctx, &dom_pol,
- switch_value, &ctr);
+ if (t - last_check_time < 60 && t - last_check_time > 0)
+ return;
- if (NT_STATUS_IS_OK(result)) {
- seqnum = ctr.info.inf2.seq_num;
- DEBUG(10,("domain_sequence_number: for domain %s is %u\n", domain->name, (unsigned)seqnum ));
- } else {
- DEBUG(10,("domain_sequence_number: failed to get sequence number (%u) for domain %s\n",
- (unsigned)seqnum, domain->name ));
+ if (wcache == NULL || wcache->tdb == NULL) {
+ DEBUG(0, ("Unable to check size of tdb cache - cache not open !\n"));
+ return;
}
- done:
-
- if (got_dom_pol)
- cli_samr_close(hnd->cli, mem_ctx, &dom_pol);
-
- talloc_destroy(mem_ctx);
+ if (fstat(wcache->tdb->fd, &st) == -1) {
+ DEBUG(0, ("Unable to check size of tdb cache %s!\n", strerror(errno) ));
+ return;
+ }
- return seqnum;
+ if (st.st_size > WINBINDD_MAX_CACHE_SIZE) {
+ DEBUG(10,("flushing cache due to size (%lu) > (%lu)\n",
+ (unsigned long)st.st_size,
+ (unsigned long)WINBINDD_MAX_CACHE_SIZE));
+ wcache_flush_cache();
+ }
}
-/* get the domain sequence number, possibly re-fetching */
-
-static uint32 cached_sequence_number(struct winbindd_domain *domain)
+/* get the winbind_cache structure */
+static struct winbind_cache *get_cache(struct winbindd_domain *domain)
{
- fstring keystr;
- TDB_DATA dbuf;
- struct cache_rec rec;
- time_t t = time(NULL);
-
- snprintf(keystr, sizeof(keystr), "CACHESEQ/%s", domain->name);
- dbuf = tdb_fetch_by_string(cache_tdb, keystr);
+ extern struct winbindd_methods msrpc_methods;
+ struct winbind_cache *ret = wcache;
- if (!dbuf.dptr || dbuf.dsize != sizeof(rec))
- goto refetch;
-
- memcpy(&rec, dbuf.dptr, sizeof(rec));
- SAFE_FREE(dbuf.dptr);
-
- if (t < (rec.mod_time + lp_winbind_cache_time())) {
- DEBUG(3,("cached sequence number for %s is %u\n",
- domain->name, (unsigned)rec.seq_num));
- return rec.seq_num;
+ if (ret) return ret;
+
+ ret = smb_xmalloc(sizeof(*ret));
+ ZERO_STRUCTP(ret);
+ switch (lp_security()) {
+#ifdef HAVE_ADS
+ case SEC_ADS: {
+ extern struct winbindd_methods ads_methods;
+ ret->backend = &ads_methods;
+ break;
+ }
+#endif
+ default:
+ ret->backend = &msrpc_methods;
}
- refetch:
- rec.seq_num = domain_sequence_number(domain);
- rec.mod_time = t;
+ wcache = ret;
+ wcache_flush_cache();
- tdb_store_by_string(cache_tdb, keystr, &rec, sizeof(rec));
+ return ret;
+}
- return rec.seq_num;
+/*
+ free a centry structure
+*/
+static void centry_free(struct cache_entry *centry)
+{
+ if (!centry) return;
+ SAFE_FREE(centry->data);
+ free(centry);
}
-/* Check whether a seq_num for a cached item has expired */
-static BOOL cache_domain_expired(struct winbindd_domain *domain,
- uint32 seq_num)
+
+/*
+ pull a uint32 from a cache entry
+*/
+static uint32 centry_uint32(struct cache_entry *centry)
{
- uint32 cache_seq = cached_sequence_number(domain);
- if (cache_seq != seq_num) {
- DEBUG(3,("seq %u for %s has expired (not == %u)\n", (unsigned)seq_num,
- domain->name, (unsigned)cache_seq ));
- return True;
+ uint32 ret;
+ if (centry->len - centry->ofs < 4) {
+ DEBUG(0,("centry corruption? needed 4 bytes, have %d\n",
+ centry->len - centry->ofs));
+ smb_panic("centry_uint32");
}
-
- return False;
+ ret = IVAL(centry->data, centry->ofs);
+ centry->ofs += 4;
+ return ret;
}
-static void set_cache_sequence_number(struct winbindd_domain *domain,
- char *cache_type, char *subkey)
+/*
+ pull a uint8 from a cache entry
+*/
+static uint8 centry_uint8(struct cache_entry *centry)
{
- fstring keystr;
-
- snprintf(keystr, sizeof(keystr),"CACHESEQ %s/%s/%s",
- domain->name, cache_type, subkey?subkey:"");
-
- tdb_store_int(cache_tdb, keystr, cached_sequence_number(domain));
+ uint8 ret;
+ if (centry->len - centry->ofs < 1) {
+ DEBUG(0,("centry corruption? needed 1 bytes, have %d\n",
+ centry->len - centry->ofs));
+ smb_panic("centry_uint32");
+ }
+ ret = CVAL(centry->data, centry->ofs);
+ centry->ofs += 1;
+ return ret;
}
-static uint32 get_cache_sequence_number(struct winbindd_domain *domain,
- char *cache_type, char *subkey)
+/* pull a string from a cache entry, using the supplied
+ talloc context
+*/
+static char *centry_string(struct cache_entry *centry, TALLOC_CTX *mem_ctx)
{
- fstring keystr;
- uint32 seq_num;
+ uint32 len;
+ char *ret;
- snprintf(keystr, sizeof(keystr), "CACHESEQ %s/%s/%s",
- domain->name, cache_type, subkey ? subkey : "");
+ len = centry_uint8(centry);
- seq_num = (uint32)tdb_fetch_int(cache_tdb, keystr);
+ if (len == 0xFF) {
+ /* a deliberate NULL string */
+ return NULL;
+ }
- DEBUG(3,("%s is %u\n", keystr, (unsigned)seq_num));
+ if (centry->len - centry->ofs < len) {
+ DEBUG(0,("centry corruption? needed %d bytes, have %d\n",
+ len, centry->len - centry->ofs));
+ smb_panic("centry_string");
+ }
- return seq_num;
+ ret = talloc(mem_ctx, len+1);
+ if (!ret) {
+ smb_panic("centry_string out of memory\n");
+ }
+ memcpy(ret,centry->data + centry->ofs, len);
+ ret[len] = 0;
+ centry->ofs += len;
+ return ret;
}
-/* Fill the user or group cache with supplied data */
-
-static void store_cache(struct winbindd_domain *domain, char *cache_type,
- void *sam_entries, int buflen)
+/* the server is considered down if it can't give us a sequence number */
+static BOOL wcache_server_down(struct winbindd_domain *domain)
{
- fstring keystr;
-
- if (lp_winbind_cache_time() == 0)
- return;
+ if (!wcache->tdb) return False;
+ return (domain->sequence_number == DOM_SEQUENCE_NONE);
+}
- /* Error check */
- if (!sam_entries || buflen == 0)
- return;
+/*
+ refresh the domain sequence number. If force is True
+ then always refresh it, no matter how recently we fetched it
+*/
+static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
+{
+ NTSTATUS status;
+ unsigned time_diff;
- /* Store data as a mega-huge chunk in the tdb */
+ time_diff = time(NULL) - domain->last_seq_check;
- snprintf(keystr, sizeof(keystr), "%s CACHE DATA/%s", cache_type,
- domain->name);
+ /* see if we have to refetch the domain sequence number */
+ if (!force && (time_diff < lp_winbind_cache_time())) {
+ return;
+ }
- tdb_store_by_string(cache_tdb, keystr, sam_entries, buflen);
+ status = wcache->backend->sequence_number(domain, &domain->sequence_number);
- /* Stamp cache with current seq number */
+ if (!NT_STATUS_IS_OK(status)) {
+ domain->sequence_number = DOM_SEQUENCE_NONE;
+ }
- set_cache_sequence_number(domain, cache_type, NULL);
+ domain->last_seq_check = time(NULL);
}
-/* Fill the user cache with supplied data */
-
-void winbindd_store_user_cache(struct winbindd_domain *domain,
- struct getpwent_user *sam_entries,
- int num_sam_entries)
+/*
+ decide if a cache entry has expired
+*/
+static BOOL centry_expired(struct winbindd_domain *domain, struct cache_entry *centry)
{
- DEBUG(3, ("storing user cache %s/%d entries\n", domain->name,
- num_sam_entries));
+ /* if the server is OK and our cache entry came from when it was down then
+ the entry is invalid */
+ if (domain->sequence_number != DOM_SEQUENCE_NONE &&
+ centry->sequence_number == DOM_SEQUENCE_NONE) {
+ return True;
+ }
- store_cache(domain, CACHE_TYPE_USER, sam_entries,
- num_sam_entries * sizeof(struct getpwent_user));
-}
+ /* if the server is down or the cache entry is not older than the
+ current sequence number then it is OK */
+ if (wcache_server_down(domain) ||
+ centry->sequence_number == domain->sequence_number) {
+ return False;
+ }
-/* Fill the group cache with supplied data */
+ /* it's expired */
+ return True;
+}
-void winbindd_store_group_cache(struct winbindd_domain *domain,
- struct acct_info *sam_entries,
- int num_sam_entries)
+/*
+ fetch an entry from the cache, with a varargs key. auto-fetch the sequence
+ number and return status
+*/
+static struct cache_entry *wcache_fetch(struct winbind_cache *cache,
+ struct winbindd_domain *domain,
+ const char *format, ...)
{
- DEBUG(0, ("storing group cache %s/%d entries\n", domain->name,
- num_sam_entries));
+ va_list ap;
+ char *kstr;
+ TDB_DATA data;
+ struct cache_entry *centry;
+ TDB_DATA key;
- store_cache(domain, CACHE_TYPE_GROUP, sam_entries,
- num_sam_entries * sizeof(struct acct_info));
-}
+ refresh_sequence_number(domain, False);
-static void store_cache_entry(struct winbindd_domain *domain, char *cache_type,
- char *name, void *buf, int len)
-{
- fstring keystr;
+ va_start(ap, format);
+ smb_xvasprintf(&kstr, format, ap);
+ va_end(ap);
+
+ key.dptr = kstr;
+ key.dsize = strlen(kstr);
+ data = tdb_fetch(wcache->tdb, key);
+ free(kstr);
+ if (!data.dptr) {
+ /* a cache miss */
+ return NULL;
+ }
- /* Create key for store */
+ centry = smb_xmalloc(sizeof(*centry));
+ centry->data = data.dptr;
+ centry->len = data.dsize;
+ centry->ofs = 0;
- snprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type,
- domain->name, name);
+ if (centry->len < 8) {
+ /* huh? corrupt cache? */
+ centry_free(centry);
+ return NULL;
+ }
+
+ centry->status = NT_STATUS(centry_uint32(centry));
+ centry->sequence_number = centry_uint32(centry);
- /* Store it */
+ if (centry_expired(domain, centry)) {
+ centry_free(centry);
+ return NULL;
+ }
- tdb_store_by_string(cache_tdb, keystr, buf, len);
+ return centry;
}
-/* Fill a name cache entry */
-
-void winbindd_store_name_cache_entry(struct winbindd_domain *domain,
- char *sid, struct winbindd_name *name)
+/*
+ make sure we have at least len bytes available in a centry
+*/
+static void centry_expand(struct cache_entry *centry, uint32 len)
{
- if (lp_winbind_cache_time() == 0)
- return;
-
- store_cache_entry(domain, CACHE_TYPE_NAME, sid, name,
- sizeof(struct winbindd_name));
-
- set_cache_sequence_number(domain, CACHE_TYPE_NAME, sid);
+ uint8 *p;
+ if (centry->len - centry->ofs >= len) return;
+ centry->len *= 2;
+ p = realloc(centry->data, centry->len);
+ if (!p) {
+ DEBUG(0,("out of memory: needed %d bytes in centry_expand\n", centry->len));
+ smb_panic("out of memory in centry_expand");
+ }
+ centry->data = p;
}
-/* Fill a SID cache entry */
-
-void winbindd_store_sid_cache_entry(struct winbindd_domain *domain,
- char *name, struct winbindd_sid *sid)
+/*
+ push a uint32 into a centry
+*/
+static void centry_put_uint32(struct cache_entry *centry, uint32 v)
{
- if (lp_winbind_cache_time() == 0)
- return;
-
- store_cache_entry(domain, CACHE_TYPE_SID, name, sid,
- sizeof(struct winbindd_sid));
-
- set_cache_sequence_number(domain, CACHE_TYPE_SID, name);
+ centry_expand(centry, 4);
+ SIVAL(centry->data, centry->ofs, v);
+ centry->ofs += 4;
}
-/* Fill a user info cache entry */
-
-void winbindd_store_user_cache_entry(struct winbindd_domain *domain,
- char *user_name, struct winbindd_pw *pw)
+/*
+ push a uint8 into a centry
+*/
+static void centry_put_uint8(struct cache_entry *centry, uint8 v)
{
- if (lp_winbind_cache_time() == 0)
- return;
-
- store_cache_entry(domain, CACHE_TYPE_USER, user_name, pw,
- sizeof(struct winbindd_pw));
-
- set_cache_sequence_number(domain, CACHE_TYPE_USER, user_name);
+ centry_expand(centry, 1);
+ SCVAL(centry->data, centry->ofs, v);
+ centry->ofs += 1;
}
-/* Fill a user uid cache entry */
-
-void winbindd_store_uid_cache_entry(struct winbindd_domain *domain, uid_t uid,
- struct winbindd_pw *pw)
+/*
+ push a string into a centry
+ */
+static void centry_put_string(struct cache_entry *centry, const char *s)
{
- fstring uidstr;
+ int len;
- if (lp_winbind_cache_time() == 0)
+ if (!s) {
+ /* null strings are marked as len 0xFFFF */
+ centry_put_uint8(centry, 0xFF);
return;
+ }
- snprintf(uidstr, sizeof(uidstr), "#%u", (unsigned)uid);
-
- DEBUG(3, ("storing uid cache entry %s/%s\n", domain->name, uidstr));
-
- store_cache_entry(domain, CACHE_TYPE_USER, uidstr, pw,
- sizeof(struct winbindd_pw));
-
- set_cache_sequence_number(domain, CACHE_TYPE_USER, uidstr);
+ len = strlen(s);
+ /* can't handle more than 254 char strings. Truncating is probably best */
+ if (len > 254) len = 254;
+ centry_put_uint8(centry, len);
+ centry_expand(centry, len);
+ memcpy(centry->data + centry->ofs, s, len);
+ centry->ofs += len;
}
-/* Fill a group info cache entry */
-
-void winbindd_store_group_cache_entry(struct winbindd_domain *domain,
- char *group_name, struct winbindd_gr *gr,
- void *extra_data, int extra_data_len)
+/*
+ start a centry for output. When finished, call centry_end()
+*/
+struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status)
{
- fstring keystr;
-
- if (lp_winbind_cache_time() == 0)
- return;
-
- DEBUG(3, ("storing group cache entry %s/%s\n", domain->name,
- group_name));
-
- /* Fill group data */
+ struct cache_entry *centry;
- store_cache_entry(domain, CACHE_TYPE_GROUP, group_name, gr,
- sizeof(struct winbindd_gr));
+ if (!wcache->tdb) return NULL;
- /* Fill extra data */
+ centry = smb_xmalloc(sizeof(*centry));
- snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP,
- domain->name, group_name);
-
- tdb_store_by_string(cache_tdb, keystr, extra_data, extra_data_len);
-
- set_cache_sequence_number(domain, CACHE_TYPE_GROUP, group_name);
+ centry->len = 8192; /* reasonable default */
+ centry->data = smb_xmalloc(centry->len);
+ centry->ofs = 0;
+ centry->sequence_number = domain->sequence_number;
+ centry_put_uint32(centry, NT_STATUS_V(status));
+ centry_put_uint32(centry, centry->sequence_number);
+ return centry;
}
-/* Fill a group info cache entry */
-
-void winbindd_store_gid_cache_entry(struct winbindd_domain *domain, gid_t gid,
- struct winbindd_gr *gr, void *extra_data,
- int extra_data_len)
+/*
+ finish a centry and write it to the tdb
+*/
+static void centry_end(struct cache_entry *centry, const char *format, ...)
{
- fstring keystr;
- fstring gidstr;
-
- snprintf(gidstr, sizeof(gidstr), "#%u", (unsigned)gid);
-
- if (lp_winbind_cache_time() == 0)
- return;
+ va_list ap;
+ char *kstr;
+ TDB_DATA key, data;
- DEBUG(3, ("storing gid cache entry %s/%s\n", domain->name, gidstr));
+ va_start(ap, format);
+ smb_xvasprintf(&kstr, format, ap);
+ va_end(ap);
- /* Fill group data */
+ key.dptr = kstr;
+ key.dsize = strlen(kstr);
+ data.dptr = centry->data;
+ data.dsize = centry->ofs;
- store_cache_entry(domain, CACHE_TYPE_GROUP, gidstr, gr,
- sizeof(struct winbindd_gr));
+ tdb_store(wcache->tdb, key, data, TDB_REPLACE);
+ free(kstr);
+}
- /* Fill extra data */
+/* form a sid from the domain plus rid */
+static DOM_SID *form_sid(struct winbindd_domain *domain, uint32 rid)
+{
+ static DOM_SID sid;
+ sid_copy(&sid, &domain->sid);
+ sid_append_rid(&sid, rid);
+ return &sid;
+}
- snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP,
- domain->name, gidstr);
+static void wcache_save_name_to_sid(struct winbindd_domain *domain, NTSTATUS status,
+ const char *name, DOM_SID *sid, enum SID_NAME_USE type)
+{
+ struct cache_entry *centry;
+ uint32 len;
+
+ centry = centry_start(domain, status);
+ if (!centry) return;
+ len = sid_size(sid);
+ centry_expand(centry, len);
+ centry_put_uint32(centry, type);
+ sid_linearize(centry->data + centry->ofs, len, sid);
+ centry->ofs += len;
+ centry_end(centry, "NS/%s/%s", domain->name, name);
+ centry_free(centry);
+}
- tdb_store_by_string(cache_tdb, keystr, extra_data, extra_data_len);
+static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS status,
+ DOM_SID *sid, const char *name, enum SID_NAME_USE type, uint32 rid)
+{
+ struct cache_entry *centry;
- set_cache_sequence_number(domain, CACHE_TYPE_GROUP, gidstr);
+ centry = centry_start(domain, status);
+ if (!centry) return;
+ if (NT_STATUS_IS_OK(status)) {
+ centry_put_uint32(centry, type);
+ centry_put_string(centry, name);
+ }
+ centry_end(centry, "SN/%s/%d", domain->name, rid);
+ centry_free(centry);
}
-/* Fetch some cached user or group data */
-static BOOL fetch_cache(struct winbindd_domain *domain, char *cache_type,
- void **sam_entries, int *buflen)
+static void wcache_save_user(struct winbindd_domain *domain, NTSTATUS status, WINBIND_USERINFO *info)
{
- TDB_DATA data;
- fstring keystr;
+ struct cache_entry *centry;
+
+ centry = centry_start(domain, status);
+ if (!centry) return;
+ centry_put_string(centry, info->acct_name);
+ centry_put_string(centry, info->full_name);
+ centry_put_uint32(centry, info->user_rid);
+ centry_put_uint32(centry, info->group_rid);
+ centry_end(centry, "U/%s/%x", domain->name, info->user_rid);
+ centry_free(centry);
+}
- if (lp_winbind_cache_time() == 0)
- return False;
- /* Parameter check */
+/* Query display info. This is the basic user list fn */
+static NTSTATUS query_user_list(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_entries,
+ WINBIND_USERINFO **info)
+{
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
+ int i;
- if (!sam_entries || !buflen)
- return False;
+ if (!cache->tdb) goto do_query;
- /* Check cache data is current */
+ centry = wcache_fetch(cache, domain, "UL/%s", domain->name);
+ if (!centry) goto do_query;
- if (cache_domain_expired(domain, get_cache_sequence_number(domain, cache_type, NULL)))
- return False;
+ *num_entries = centry_uint32(centry);
- /* Create key */
+ if (*num_entries == 0) goto do_cached;
+
+ (*info) = talloc(mem_ctx, sizeof(**info) * (*num_entries));
+ if (! (*info)) smb_panic("query_user_list out of memory");
+ for (i=0; i<(*num_entries); i++) {
+ (*info)[i].acct_name = centry_string(centry, mem_ctx);
+ (*info)[i].full_name = centry_string(centry, mem_ctx);
+ (*info)[i].user_rid = centry_uint32(centry);
+ (*info)[i].group_rid = centry_uint32(centry);
+ }
- snprintf(keystr, sizeof(keystr), "%s CACHE DATA/%s", cache_type, domain->name);
-
- /* Fetch cache information */
+do_cached:
+ status = centry->status;
+ centry_free(centry);
+ return status;
- data = tdb_fetch_by_string(cache_tdb, keystr);
-
- if (!data.dptr)
- return False;
+do_query:
+ *num_entries = 0;
+ *info = NULL;
- /* Copy across cached data. We can save a memcpy() by directly
- assigning the data.dptr to the sam_entries pointer. It will
- be freed by the end{pw,gr}ent() function. */
-
- *sam_entries = (struct acct_info *)data.dptr;
- *buflen = data.dsize;
-
- return True;
-}
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
-/* Return cached entries for a domain. Return false if there are no cached
- entries, or the cached information has expired for the domain. */
+ status = cache->backend->query_user_list(domain, mem_ctx, num_entries, info);
+
+ /* and save it */
+ refresh_sequence_number(domain, True);
+ centry = centry_start(domain, status);
+ if (!centry) goto skip_save;
+ centry_put_uint32(centry, *num_entries);
+ for (i=0; i<(*num_entries); i++) {
+ centry_put_string(centry, (*info)[i].acct_name);
+ centry_put_string(centry, (*info)[i].full_name);
+ centry_put_uint32(centry, (*info)[i].user_rid);
+ centry_put_uint32(centry, (*info)[i].group_rid);
+ if (cache->backend->consistent) {
+ /* when the backend is consistent we can pre-prime some mappings */
+ wcache_save_name_to_sid(domain, NT_STATUS_OK,
+ (*info)[i].acct_name,
+ form_sid(domain, (*info)[i].user_rid),
+ SID_NAME_USER);
+ wcache_save_sid_to_name(domain, NT_STATUS_OK,
+ form_sid(domain, (*info)[i].user_rid),
+ (*info)[i].acct_name,
+ SID_NAME_USER, (*info)[i].user_rid);
+ wcache_save_user(domain, NT_STATUS_OK, &(*info)[i]);
+ }
+ }
+ centry_end(centry, "UL/%s", domain->name);
+ centry_free(centry);
+
+skip_save:
+ return status;
+}
-BOOL winbindd_fetch_user_cache(struct winbindd_domain *domain,
- struct getpwent_user **sam_entries,
- int *num_entries)
+/* list all domain groups */
+static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_entries,
+ struct acct_info **info)
{
- BOOL result;
- int buflen;
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
+ int i;
- result = fetch_cache(domain, CACHE_TYPE_USER,
- (void **)sam_entries, &buflen);
+ if (!cache->tdb) goto do_query;
- *num_entries = buflen / sizeof(struct getpwent_user);
+ centry = wcache_fetch(cache, domain, "GL/%s", domain->name);
+ if (!centry) goto do_query;
- DEBUG(3, ("fetched %d cache entries for %s\n", *num_entries,
- domain->name));
+ *num_entries = centry_uint32(centry);
+
+ if (*num_entries == 0) goto do_cached;
+
+ (*info) = talloc(mem_ctx, sizeof(**info) * (*num_entries));
+ if (! (*info)) smb_panic("enum_dom_groups out of memory");
+ for (i=0; i<(*num_entries); i++) {
+ fstrcpy((*info)[i].acct_name, centry_string(centry, mem_ctx));
+ fstrcpy((*info)[i].acct_desc, centry_string(centry, mem_ctx));
+ (*info)[i].rid = centry_uint32(centry);
+ }
- return result;
-}
+do_cached:
+ status = centry->status;
+ centry_free(centry);
+ return status;
-/* Return cached entries for a domain. Return false if there are no cached
- entries, or the cached information has expired for the domain. */
+do_query:
+ *num_entries = 0;
+ *info = NULL;
-BOOL winbindd_fetch_group_cache(struct winbindd_domain *domain,
- struct acct_info **sam_entries,
- int *num_entries)
-{
- BOOL result;
- int buflen;
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
- result = fetch_cache(domain, CACHE_TYPE_GROUP,
- (void **)sam_entries, &buflen);
+ status = cache->backend->enum_dom_groups(domain, mem_ctx, num_entries, info);
+
+ /* and save it */
+ refresh_sequence_number(domain, True);
+ centry = centry_start(domain, status);
+ if (!centry) goto skip_save;
+ centry_put_uint32(centry, *num_entries);
+ for (i=0; i<(*num_entries); i++) {
+ centry_put_string(centry, (*info)[i].acct_name);
+ centry_put_string(centry, (*info)[i].acct_desc);
+ centry_put_uint32(centry, (*info)[i].rid);
+ }
+ centry_end(centry, "GL/%s", domain->name);
+ centry_free(centry);
+
+skip_save:
+ return status;
+}
- *num_entries = buflen / sizeof(struct acct_info);
- DEBUG(3, ("fetched %d cache entries for %s\n", *num_entries,
- domain->name));
+/* convert a single name to a sid in a domain */
+static NTSTATUS name_to_sid(struct winbindd_domain *domain,
+ const char *name,
+ DOM_SID *sid,
+ enum SID_NAME_USE *type)
+{
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
- return result;
-}
+ if (!cache->tdb) goto do_query;
-static BOOL fetch_cache_entry(struct winbindd_domain *domain,
- char *cache_type, char *name, void *buf, int len)
-{
- TDB_DATA data;
- fstring keystr;
-
- /* Create key for lookup */
+ centry = wcache_fetch(cache, domain, "NS/%s/%s", domain->name, name);
+ if (!centry) goto do_query;
+ *type = centry_uint32(centry);
+ sid_parse(centry->data + centry->ofs, centry->len - centry->ofs, sid);
- snprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type, domain->name, name);
-
- /* Look up cache entry */
+ status = centry->status;
+ centry_free(centry);
+ return status;
- data = tdb_fetch_by_string(cache_tdb, keystr);
+do_query:
+ ZERO_STRUCTP(sid);
- if (!data.dptr)
- return False;
-
- /* Copy found entry into buffer */
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
+ status = cache->backend->name_to_sid(domain, name, sid, type);
- memcpy((char *)buf, data.dptr, len < data.dsize ? len : data.dsize);
- SAFE_FREE(data.dptr);
+ /* and save it */
+ wcache_save_name_to_sid(domain, status, name, sid, *type);
- return True;
+ return status;
}
-/* Fetch an individual SID cache entry */
-
-BOOL winbindd_fetch_sid_cache_entry(struct winbindd_domain *domain,
- char *name, struct winbindd_sid *sid)
+/* convert a sid to a user or group name. The sid is guaranteed to be in the domain
+ given */
+static NTSTATUS sid_to_name(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ DOM_SID *sid,
+ char **name,
+ enum SID_NAME_USE *type)
{
- uint32 seq_num;
-
- if (lp_winbind_cache_time() == 0)
- return False;
-
- seq_num = get_cache_sequence_number(domain, CACHE_TYPE_SID, name);
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
+ uint32 rid = 0;
- if (cache_domain_expired(domain, seq_num))
- return False;
-
- return fetch_cache_entry(domain, CACHE_TYPE_SID, name, sid,
- sizeof(struct winbindd_sid));
-}
+ sid_peek_rid(sid, &rid);
-/* Fetch an individual name cache entry */
+ if (!cache->tdb) goto do_query;
-BOOL winbindd_fetch_name_cache_entry(struct winbindd_domain *domain,
- char *sid, struct winbindd_name *name)
-{
- uint32 seq_num;
+ centry = wcache_fetch(cache, domain, "SN/%s/%d", domain->name, rid);
+ if (!centry) goto do_query;
+ if (NT_STATUS_IS_OK(centry->status)) {
+ *type = centry_uint32(centry);
+ *name = centry_string(centry, mem_ctx);
+ }
+ status = centry->status;
+ centry_free(centry);
+ return status;
- if (lp_winbind_cache_time() == 0)
- return False;
+do_query:
+ *name = NULL;
- seq_num = get_cache_sequence_number(domain, CACHE_TYPE_NAME, sid);
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
+ status = cache->backend->sid_to_name(domain, mem_ctx, sid, name, type);
- if (cache_domain_expired(domain, seq_num))
- return False;
+ /* and save it */
+ refresh_sequence_number(domain, True);
+ wcache_save_sid_to_name(domain, status, sid, *name, *type, rid);
- return fetch_cache_entry(domain, CACHE_TYPE_NAME, sid, name,
- sizeof(struct winbindd_name));
+ return status;
}
-/* Fetch an individual user cache entry */
-BOOL winbindd_fetch_user_cache_entry(struct winbindd_domain *domain,
- char *user, struct winbindd_pw *pw)
+/* Lookup user information from a rid */
+static NTSTATUS query_user(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 user_rid,
+ WINBIND_USERINFO *info)
{
- uint32 seq_num;
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
- if (lp_winbind_cache_time() == 0)
- return False;
+ if (!cache->tdb) goto do_query;
- seq_num = get_cache_sequence_number(domain, CACHE_TYPE_USER, user);
+ centry = wcache_fetch(cache, domain, "U/%s/%x", domain->name, user_rid);
+ if (!centry) goto do_query;
- if (cache_domain_expired(domain, seq_num))
- return False;
+ info->acct_name = centry_string(centry, mem_ctx);
+ info->full_name = centry_string(centry, mem_ctx);
+ info->user_rid = centry_uint32(centry);
+ info->group_rid = centry_uint32(centry);
+ status = centry->status;
+ centry_free(centry);
+ return status;
- return fetch_cache_entry(domain, CACHE_TYPE_USER, user, pw,
- sizeof(struct winbindd_pw));
-}
-
-/* Fetch an individual uid cache entry */
+do_query:
+ ZERO_STRUCTP(info);
-BOOL winbindd_fetch_uid_cache_entry(struct winbindd_domain *domain, uid_t uid,
- struct winbindd_pw *pw)
-{
- fstring uidstr;
- uint32 seq_num;
-
- if (lp_winbind_cache_time() == 0)
- return False;
-
- snprintf(uidstr, sizeof(uidstr), "#%u", (unsigned)uid);
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
+
+ status = cache->backend->query_user(domain, mem_ctx, user_rid, info);
- seq_num = get_cache_sequence_number(domain, CACHE_TYPE_USER, uidstr);
+ /* and save it */
+ refresh_sequence_number(domain, True);
+ wcache_save_user(domain, status, info);
- if (cache_domain_expired(domain, seq_num))
- return False;
-
- return fetch_cache_entry(domain, CACHE_TYPE_USER, uidstr, pw,
- sizeof(struct winbindd_pw));
+ return status;
}
-/* Fetch an individual group cache entry. This function differs from the
- user cache code as we need to store the group membership data. */
-BOOL winbindd_fetch_group_cache_entry(struct winbindd_domain *domain,
- char *group, struct winbindd_gr *gr,
- void **extra_data, int *extra_data_len)
+/* Lookup groups a user is a member of. */
+static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 user_rid,
+ uint32 *num_groups, uint32 **user_gids)
{
- TDB_DATA data;
- fstring keystr;
- uint32 seq_num;
-
- if (lp_winbind_cache_time() == 0)
- return False;
-
- seq_num = get_cache_sequence_number(domain, CACHE_TYPE_GROUP, group);
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
+ int i;
- if (cache_domain_expired(domain, seq_num))
- return False;
+ if (!cache->tdb) goto do_query;
- /* Fetch group data */
+ centry = wcache_fetch(cache, domain, "UG/%s/%x", domain->name, user_rid);
+ if (!centry) goto do_query;
- if (!fetch_cache_entry(domain, CACHE_TYPE_GROUP, group, gr, sizeof(struct winbindd_gr)))
- return False;
+ *num_groups = centry_uint32(centry);
- /* Fetch extra data */
-
- snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP,
- domain->name, group);
-
- data = tdb_fetch_by_string(cache_tdb, keystr);
+ if (*num_groups == 0) goto do_cached;
- if (!data.dptr)
- return False;
+ (*user_gids) = talloc(mem_ctx, sizeof(**user_gids) * (*num_groups));
+ if (! (*user_gids)) smb_panic("lookup_usergroups out of memory");
+ for (i=0; i<(*num_groups); i++) {
+ (*user_gids)[i] = centry_uint32(centry);
+ }
- /* Extra data freed when data has been sent */
+do_cached:
+ status = centry->status;
+ centry_free(centry);
+ return status;
- if (extra_data)
- *extra_data = data.dptr;
+do_query:
+ (*num_groups) = 0;
+ (*user_gids) = NULL;
- if (extra_data_len)
- *extra_data_len = data.dsize;
-
- return True;
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
+ status = cache->backend->lookup_usergroups(domain, mem_ctx, user_rid, num_groups, user_gids);
+
+ /* and save it */
+ refresh_sequence_number(domain, True);
+ centry = centry_start(domain, status);
+ if (!centry) goto skip_save;
+ centry_put_uint32(centry, *num_groups);
+ for (i=0; i<(*num_groups); i++) {
+ centry_put_uint32(centry, (*user_gids)[i]);
+ }
+ centry_end(centry, "UG/%s/%x", domain->name, user_rid);
+ centry_free(centry);
+
+skip_save:
+ return status;
}
-/* Fetch an individual gid cache entry. This function differs from the
- user cache code as we need to store the group membership data. */
-
-BOOL winbindd_fetch_gid_cache_entry(struct winbindd_domain *domain, gid_t gid,
- struct winbindd_gr *gr,
- void **extra_data, int *extra_data_len)
+static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 group_rid, uint32 *num_names,
+ uint32 **rid_mem, char ***names,
+ uint32 **name_types)
{
- TDB_DATA data;
- fstring keystr;
- fstring gidstr;
- uint32 seq_num;
+ struct winbind_cache *cache = get_cache(domain);
+ struct cache_entry *centry = NULL;
+ NTSTATUS status;
+ int i;
- snprintf(gidstr, sizeof(gidstr), "#%u", (unsigned)gid);
-
- if (lp_winbind_cache_time() == 0)
- return False;
+ if (!cache->tdb) goto do_query;
- seq_num = get_cache_sequence_number(domain, CACHE_TYPE_GROUP, gidstr);
+ centry = wcache_fetch(cache, domain, "GM/%s/%x", domain->name, group_rid);
+ if (!centry) goto do_query;
- if (cache_domain_expired(domain, seq_num))
- return False;
-
- /* Fetch group data */
+ *num_names = centry_uint32(centry);
+
+ if (*num_names == 0) goto do_cached;
- if (!fetch_cache_entry(domain, CACHE_TYPE_GROUP,
- gidstr, gr, sizeof(struct winbindd_gr)))
- return False;
+ (*rid_mem) = talloc(mem_ctx, sizeof(**rid_mem) * (*num_names));
+ (*names) = talloc(mem_ctx, sizeof(**names) * (*num_names));
+ (*name_types) = talloc(mem_ctx, sizeof(**name_types) * (*num_names));
- /* Fetch extra data */
+ if (! (*rid_mem) || ! (*names) || ! (*name_types)) {
+ smb_panic("lookup_groupmem out of memory");
+ }
- snprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP,
- domain->name, gidstr);
+ for (i=0; i<(*num_names); i++) {
+ (*rid_mem)[i] = centry_uint32(centry);
+ (*names)[i] = centry_string(centry, mem_ctx);
+ (*name_types)[i] = centry_uint32(centry);
+ }
- data = tdb_fetch_by_string(cache_tdb, keystr);
+do_cached:
+ status = centry->status;
+ centry_free(centry);
+ return status;
- if (!data.dptr)
- return False;
+do_query:
+ (*num_names) = 0;
+ (*rid_mem) = NULL;
+ (*names) = NULL;
+ (*name_types) = NULL;
+
- /* Extra data freed when data has been sent */
+ if (wcache_server_down(domain)) {
+ return NT_STATUS_SERVER_DISABLED;
+ }
+ status = cache->backend->lookup_groupmem(domain, mem_ctx, group_rid, num_names,
+ rid_mem, names, name_types);
+
+ /* and save it */
+ refresh_sequence_number(domain, True);
+ centry = centry_start(domain, status);
+ if (!centry) goto skip_save;
+ centry_put_uint32(centry, *num_names);
+ for (i=0; i<(*num_names); i++) {
+ centry_put_uint32(centry, (*rid_mem)[i]);
+ centry_put_string(centry, (*names)[i]);
+ centry_put_uint32(centry, (*name_types)[i]);
+ }
+ centry_end(centry, "GM/%s/%x", domain->name, group_rid);
+ centry_free(centry);
+
+skip_save:
+ return status;
+}
- if (extra_data)
- *extra_data = data.dptr;
+/* find the sequence number for a domain */
+static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
+{
+ refresh_sequence_number(domain, False);
- if (extra_data_len)
- *extra_data_len = data.dsize;
+ *seq = domain->sequence_number;
- return True;
+ return NT_STATUS_OK;
}
-/* Flush cache data - easiest to just reopen the tdb */
-
-void winbindd_flush_cache(void)
+/* enumerate trusted domains */
+static NTSTATUS trusted_domains(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_domains,
+ char ***names,
+ DOM_SID **dom_sids)
{
- tdb_close(cache_tdb);
- winbindd_cache_init();
-}
+ struct winbind_cache *cache = get_cache(domain);
-/* Print cache status information */
+ /* we don't cache this call */
+ return cache->backend->trusted_domains(domain, mem_ctx, num_domains,
+ names, dom_sids);
+}
-void winbindd_cache_status(void)
+/* find the domain sid */
+static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
{
+ struct winbind_cache *cache = get_cache(domain);
+
+ /* we don't cache this call */
+ return cache->backend->domain_sid(domain, sid);
}
+
+/* the ADS backend methods are exposed via this structure */
+struct winbindd_methods cache_methods = {
+ True,
+ query_user_list,
+ enum_dom_groups,
+ name_to_sid,
+ sid_to_name,
+ query_user,
+ lookup_usergroups,
+ lookup_groupmem,
+ sequence_number,
+ trusted_domains,
+ domain_sid
+};
diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c
index af03826ad07..7024592f5b7 100644
--- a/source/nsswitch/winbindd_cm.c
+++ b/source/nsswitch/winbindd_cm.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Winbind daemon connection manager
@@ -73,7 +72,7 @@ struct winbindd_cm_conn {
POLICY_HND pol;
};
-struct winbindd_cm_conn *cm_conns = NULL;
+static struct winbindd_cm_conn *cm_conns = NULL;
/* Get a domain controller name. Cache positive and negative lookups so we
don't go to the network too often when something is badly broken. */
@@ -87,7 +86,7 @@ struct get_dc_name_cache {
struct get_dc_name_cache *prev, *next;
};
-static BOOL cm_get_dc_name(char *domain, fstring srv_name)
+static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out)
{
static struct get_dc_name_cache *get_dc_name_cache;
struct get_dc_name_cache *dcc;
@@ -141,129 +140,191 @@ static BOOL cm_get_dc_name(char *domain, fstring srv_name)
DLIST_ADD(get_dc_name_cache, dcc);
- /* Lookup domain controller name */
-
- if (!get_dc_list(False, domain, &ip_list, &count)) {
- DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
- return False;
+ /* Lookup domain controller name. Try the real PDC first to avoid
+ SAM sync delays */
+ if (!get_dc_list(True, domain, &ip_list, &count)) {
+ if (!get_dc_list(False, domain, &ip_list, &count)) {
+ DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
+ return False;
+ }
}
-
- /* Firstly choose a PDC/BDC who has the same network address as any
- of our interfaces. */
-
+
+ /* Pick a nice close server */
+ /* Look for DC on local net */
+
for (i = 0; i < count; i++) {
- if(is_local_net(ip_list[i]))
- goto got_ip;
+ if (!is_local_net(ip_list[i]))
+ continue;
+
+ if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) {
+ dc_ip = ip_list[i];
+ goto done;
+ }
+ zero_ip(&ip_list[i]);
}
- if (count == 0) {
- DEBUG(3, ("No domain controllers for domain %s\n", domain));
- return False;
- }
-
+ /*
+ * Secondly try and contact a random PDC/BDC.
+ */
+
i = (sys_random() % count);
-
- got_ip:
- dc_ip = ip_list[i];
- SAFE_FREE(ip_list);
-
- /* We really should be doing a GETDC call here rather than a node
- status lookup. */
- if (!name_status_find(domain, 0x1c, 0x20, dc_ip, srv_name)) {
- DEBUG(3, ("Error looking up DC name for %s in domain %s\n", inet_ntoa(dc_ip), domain));
- return False;
+ if (!is_zero_ip(ip_list[i]) &&
+ name_status_find(domain, 0x1c, 0x20,
+ ip_list[i], srv_name)) {
+ dc_ip = ip_list[i];
+ goto done;
}
+ zero_ip(&ip_list[i]); /* Tried and failed. */
+
+ /* Finally return first DC that we can contact */
+
+ for (i = 0; i < count; i++) {
+ if (is_zero_ip(ip_list[i]))
+ continue;
+
+ if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) {
+ dc_ip = ip_list[i];
+ goto done;
+ }
+ }
+
+ /* No-one to talk to )-: */
+ return False; /* Boo-hoo */
+
+ done:
+ /* We have the netbios name and IP address of a domain controller.
+ Ideally we should sent a SAMLOGON request to determine whether
+ the DC is alive and kicking. If we can catch a dead DC before
+ performing a cli_connect() we can avoid a 30-second timeout. */
/* We have a name so make the cache entry positive now */
fstrcpy(dcc->srv_name, srv_name);
+ DEBUG(3, ("cm_get_dc_name: Returning DC %s (%s) for domain %s\n", srv_name,
+ inet_ntoa(dc_ip), domain));
+
+ *ip_out = dc_ip;
+
+ SAFE_FREE(ip_list);
+
return True;
}
/* Choose between anonymous or authenticated connections. We need to use
an authenticated connection if DCs have the RestrictAnonymous registry
entry set > 0, or the "Additional restrictions for anonymous
- connections" set in the win2k Local Security Policy. */
+ connections" set in the win2k Local Security Policy.
+
+ Caller to free() result in domain, username, password
+*/
-void cm_init_creds(struct ntuser_creds *creds)
+static void cm_get_ipc_userpass(char **username, char **domain, char **password)
{
- char *username, *password;
-
- ZERO_STRUCTP(creds);
-
- creds->pwd.null_pwd = True; /* anonymoose */
-
- username = secrets_fetch(SECRETS_AUTH_USER, NULL);
- password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL);
-
- if (username && *username) {
- pwd_set_cleartext(&creds->pwd, password);
- pwd_make_lm_nt_16(&creds->pwd, password);
-
- fstrcpy(creds->user_name, username);
- fstrcpy(creds->domain, lp_workgroup());
-
- DEBUG(3, ("IPC$ connections done %s\\%s\n", creds->domain,
- creds->user_name));
- } else
+ *username = secrets_fetch(SECRETS_AUTH_USER, NULL);
+ *domain = secrets_fetch(SECRETS_AUTH_DOMAIN, NULL);
+ *password = secrets_fetch(SECRETS_AUTH_PASSWORD, NULL);
+
+ if (*username && **username) {
+ if (!*domain || !**domain) {
+ *domain = smb_xstrdup(lp_workgroup());
+ }
+
+ DEBUG(3, ("IPC$ connections done by user %s\\%s\n", *domain, *username));
+ } else {
DEBUG(3, ("IPC$ connections done anonymously\n"));
+ *username = smb_xstrdup("");
+ *domain = smb_xstrdup("");
+ *password = smb_xstrdup("");
+ }
}
/* Open a new smb pipe connection to a DC on a given domain. Cache
negative creation attempts so we don't try and connect to broken
machines too often. */
-#define OPEN_CONNECTION_CACHE_TIMEOUT 30 /* Seconds between attempts */
+#define FAILED_CONNECTION_CACHE_TIMEOUT 30 /* Seconds between attempts */
-struct open_connection_cache {
+struct failed_connection_cache {
fstring domain_name;
fstring controller;
time_t lookup_time;
- struct open_connection_cache *prev, *next;
+ NTSTATUS nt_status;
+ struct failed_connection_cache *prev, *next;
};
-static BOOL cm_open_connection(char *domain, char *pipe_name,
+static struct failed_connection_cache *failed_connection_cache;
+
+/* Add an entry to the failed conneciton cache */
+
+static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, NTSTATUS result) {
+ struct failed_connection_cache *fcc;
+
+ SMB_ASSERT(!NT_STATUS_IS_OK(result));
+
+ /* Create negative lookup cache entry for this domain and controller */
+
+ if (!(fcc = (struct failed_connection_cache *)
+ malloc(sizeof(struct failed_connection_cache)))) {
+ DEBUG(0, ("malloc failed in add_failed_connection_entry!\n"));
+ return;
+ }
+
+ ZERO_STRUCTP(fcc);
+
+ fstrcpy(fcc->domain_name, new_conn->domain);
+ fstrcpy(fcc->controller, new_conn->controller);
+ fcc->lookup_time = time(NULL);
+ fcc->nt_status = result;
+
+ DLIST_ADD(failed_connection_cache, fcc);
+}
+
+/* Open a connction to the remote server, cache failures for 30 seconds */
+
+static NTSTATUS cm_open_connection(const char *domain,const char *pipe_name,
struct winbindd_cm_conn *new_conn)
{
- static struct open_connection_cache *open_connection_cache;
- struct open_connection_cache *occ;
- struct nmb_name calling, called;
+ struct failed_connection_cache *fcc;
extern pstring global_myname;
- fstring dest_host;
- struct in_addr dest_ip;
- BOOL result = False;
- struct ntuser_creds creds;
+ NTSTATUS result;
+ char *ipc_username, *ipc_domain, *ipc_password;
+ struct in_addr dc_ip;
+
+ ZERO_STRUCT(dc_ip);
fstrcpy(new_conn->domain, domain);
fstrcpy(new_conn->pipe_name, pipe_name);
/* Look for a domain controller for this domain. Negative results
- are cached so don't bother applying the caching for this
- function just yet. */
-
- if (!cm_get_dc_name(domain, new_conn->controller))
- goto done;
+ are cached so don't bother applying the caching for this
+ function just yet. */
+ if (!cm_get_dc_name(domain, new_conn->controller, &dc_ip)) {
+ result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
+ add_failed_connection_entry(new_conn, result);
+ return result;
+ }
+
/* Return false if we have tried to look up this domain and netbios
- name before and failed. */
+ name before and failed. */
- for (occ = open_connection_cache; occ; occ = occ->next) {
+ for (fcc = failed_connection_cache; fcc; fcc = fcc->next) {
- if (!(strequal(domain, occ->domain_name) &&
- strequal(new_conn->controller, occ->controller)))
+ if (!(strequal(domain, fcc->domain_name) &&
+ strequal(new_conn->controller, fcc->controller)))
continue; /* Not our domain */
- if ((time(NULL) - occ->lookup_time) >
- OPEN_CONNECTION_CACHE_TIMEOUT) {
+ if ((time(NULL) - fcc->lookup_time) >
+ FAILED_CONNECTION_CACHE_TIMEOUT) {
/* Cache entry has expired, delete it */
DEBUG(10, ("cm_open_connection cache entry expired for %s, %s\n", domain, new_conn->controller));
- DLIST_REMOVE(open_connection_cache, occ);
- SAFE_FREE(occ);
+ DLIST_REMOVE(failed_connection_cache, fcc);
+ free(fcc);
break;
}
@@ -272,118 +333,161 @@ static BOOL cm_open_connection(char *domain, char *pipe_name,
DEBUG(10, ("returning negative open_connection_cache entry for %s, %s\n", domain, new_conn->controller));
- goto done;
+ result = fcc->nt_status;
+ SMB_ASSERT(!NT_STATUS_IS_OK(result));
+ return result;
}
/* Initialise SMB connection */
- if (!(new_conn->cli = cli_initialise(NULL)))
- goto done;
+ cm_get_ipc_userpass(&ipc_username, &ipc_domain, &ipc_password);
- if (!resolve_srv_name(new_conn->controller, dest_host, &dest_ip))
- goto done;
+ DEBUG(5, ("connecting to %s from %s with username [%s]\\[%s]\n",
+ new_conn->controller, global_myname, ipc_domain, ipc_username));
- make_nmb_name(&called, dns_to_netbios_name(new_conn->controller), 0x20);
- make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
+ result = cli_full_connection(&(new_conn->cli), global_myname, new_conn->controller,
+ &dc_ip, 0, "IPC$",
+ "IPC", ipc_username, ipc_domain,
+ ipc_password, strlen(ipc_password));
- cm_init_creds(&creds);
+ SAFE_FREE(ipc_username);
+ SAFE_FREE(ipc_domain);
+ SAFE_FREE(ipc_password);
- cli_init_creds(new_conn->cli, &creds);
-
- if (!cli_establish_connection(new_conn->cli, new_conn->controller,
- &dest_ip, &calling, &called, "IPC$",
- "IPC", False, True))
- goto done;
-
- if (!cli_nt_session_open (new_conn->cli, pipe_name))
- goto done;
-
- result = True;
-
- done:
-
- /* Create negative lookup cache entry for this domain and controller */
-
- if (!result) {
- if (!(occ = (struct open_connection_cache *)
- malloc(sizeof(struct open_connection_cache))))
- return False;
-
- ZERO_STRUCTP(occ);
-
- fstrcpy(occ->domain_name, domain);
- fstrcpy(occ->controller, new_conn->controller);
- occ->lookup_time = time(NULL);
-
- DLIST_ADD(open_connection_cache, occ);
+ if (!NT_STATUS_IS_OK(result)) {
+ add_failed_connection_entry(new_conn, result);
+ return result;
}
-
- if (!result && new_conn->cli)
+
+ if (!cli_nt_session_open (new_conn->cli, pipe_name)) {
+ result = NT_STATUS_PIPE_NOT_AVAILABLE;
+ add_failed_connection_entry(new_conn, result);
cli_shutdown(new_conn->cli);
+ return result;
+ }
- return result;
+ return NT_STATUS_OK;
}
/* Return true if a connection is still alive */
static BOOL connection_ok(struct winbindd_cm_conn *conn)
{
- if (!conn->cli->initialised)
+ if (!conn) {
+ smb_panic("Invalid paramater passed to conneciton_ok(): conn was NULL!\n");
+ return False;
+ }
+
+ if (!conn->cli) {
+ DEBUG(0, ("Connection to %s for domain %s (pipe %s) has NULL conn->cli!\n",
+ conn->controller, conn->domain, conn->pipe_name));
+ smb_panic("connection_ok: conn->cli was null!");
+ return False;
+ }
+
+ if (!conn->cli->initialised) {
+ DEBUG(0, ("Connection to %s for domain %s (pipe %s) was never initialised!\n",
+ conn->controller, conn->domain, conn->pipe_name));
+ smb_panic("connection_ok: conn->cli->initialised is False!");
return False;
+ }
- if (conn->cli->fd == -1)
+ if (conn->cli->fd == -1) {
+ DEBUG(3, ("Connection to %s for domain %s (pipe %s) has died or was never started (fd == -1)\n",
+ conn->controller, conn->domain, conn->pipe_name));
return False;
+ }
return True;
}
-/* Return a LSA policy handle on a domain */
+/* Get a connection to the remote DC and open the pipe. If there is already a connection, use that */
-CLI_POLICY_HND *cm_get_lsa_handle(char *domain)
+static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_name, struct winbindd_cm_conn **conn_out)
{
- struct winbindd_cm_conn *conn;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
+ struct winbindd_cm_conn *conn, conn_temp;
NTSTATUS result;
- static CLI_POLICY_HND hnd;
-
- /* Look for existing connections */
for (conn = cm_conns; conn; conn = conn->next) {
if (strequal(conn->domain, domain) &&
- strequal(conn->pipe_name, PIPE_LSARPC)) {
-
+ strequal(conn->pipe_name, pipe_name)) {
if (!connection_ok(conn)) {
+ if (conn->cli) {
+ cli_shutdown(conn->cli);
+ }
+ conn_temp.next = conn->next;
DLIST_REMOVE(cm_conns, conn);
- return NULL;
+ SAFE_FREE(conn);
+ conn = &conn_temp; /* Just to keep the loop moving */
+ } else {
+ break;
}
-
- goto ok;
}
}
+
+ if (!conn) {
+ if (!(conn = (struct winbindd_cm_conn *) malloc(sizeof(struct winbindd_cm_conn))))
+ return NT_STATUS_NO_MEMORY;
+
+ ZERO_STRUCTP(conn);
+
+ if (!NT_STATUS_IS_OK(result = cm_open_connection(domain, pipe_name, conn))) {
+ DEBUG(3, ("Could not open a connection to %s for %s (%s)\n",
+ domain, pipe_name, nt_errstr(result)));
+ SAFE_FREE(conn);
+ return result;
+ }
+ DLIST_ADD(cm_conns, conn);
+ }
+
+ *conn_out = conn;
+ return NT_STATUS_OK;
+}
- /* Create a new one */
+/* Return a LSA policy handle on a domain */
- if (!(conn = (struct winbindd_cm_conn *) malloc(sizeof(struct winbindd_cm_conn))))
- return NULL;
+CLI_POLICY_HND *cm_get_lsa_handle(char *domain)
+{
+ struct winbindd_cm_conn *conn;
+ uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
+ NTSTATUS result;
+ static CLI_POLICY_HND hnd;
- ZERO_STRUCTP(conn);
+ /* Look for existing connections */
- if (!cm_open_connection(domain, PIPE_LSARPC, conn)) {
- DEBUG(3, ("Could not connect to a dc for domain %s\n", domain));
+ if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) {
return NULL;
}
+ /* This *shitty* code needs scrapping ! JRA */
+ if (policy_handle_is_valid(&conn->pol)) {
+ hnd.pol = conn->pol;
+ hnd.cli = conn->cli;
+ return &hnd;
+ }
+
result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False,
des_access, &conn->pol);
- if (!NT_STATUS_IS_OK(result))
- return NULL;
+ if (!NT_STATUS_IS_OK(result)) {
+ /* Hit the cache code again. This cleans out the old connection and gets a new one */
+ if (conn->cli->fd == -1) { /* Try again, if the remote host disapeared */
+ if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_LSARPC, &conn))) {
+ return NULL;
+ }
- /* Add to list */
+ result = cli_lsa_open_policy(conn->cli, conn->cli->mem_ctx, False,
+ des_access, &conn->pol);
+ }
- DLIST_ADD(cm_conns, conn);
+ if (!NT_STATUS_IS_OK(result)) {
+ cli_shutdown(conn->cli);
+ DLIST_REMOVE(cm_conns, conn);
+ SAFE_FREE(conn);
+ return NULL;
+ }
+ }
- ok:
hnd.pol = conn->pol;
hnd.cli = conn->cli;
@@ -401,49 +505,45 @@ CLI_POLICY_HND *cm_get_sam_handle(char *domain)
/* Look for existing connections */
- for (conn = cm_conns; conn; conn = conn->next) {
- if (strequal(conn->domain, domain) && strequal(conn->pipe_name, PIPE_SAMR)) {
-
- if (!connection_ok(conn)) {
- DLIST_REMOVE(cm_conns, conn);
- return NULL;
- }
-
- goto ok;
- }
- }
-
- /* Create a new one */
-
- if (!(conn = (struct winbindd_cm_conn *)
- malloc(sizeof(struct winbindd_cm_conn))))
- return NULL;
-
- ZERO_STRUCTP(conn);
-
- if (!cm_open_connection(domain, PIPE_SAMR, conn)) {
- DEBUG(3, ("Could not connect to a dc for domain %s\n", domain));
+ if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn))) {
return NULL;
}
-
+
+ /* This *shitty* code needs scrapping ! JRA */
+ if (policy_handle_is_valid(&conn->pol)) {
+ hnd.pol = conn->pol;
+ hnd.cli = conn->cli;
+ return &hnd;
+ }
result = cli_samr_connect(conn->cli, conn->cli->mem_ctx,
des_access, &conn->pol);
- if (!NT_STATUS_IS_OK(result))
- return NULL;
+ if (!NT_STATUS_IS_OK(result)) {
+ /* Hit the cache code again. This cleans out the old connection and gets a new one */
+ if (conn->cli->fd == -1) { /* Try again, if the remote host disapeared */
+ if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_SAMR, &conn))) {
+ return NULL;
+ }
- /* Add to list */
+ result = cli_samr_connect(conn->cli, conn->cli->mem_ctx,
+ des_access, &conn->pol);
+ }
- DLIST_ADD(cm_conns, conn);
+ if (!NT_STATUS_IS_OK(result)) {
+ cli_shutdown(conn->cli);
+ DLIST_REMOVE(cm_conns, conn);
+ SAFE_FREE(conn);
+ return NULL;
+ }
+ }
- ok:
hnd.pol = conn->pol;
hnd.cli = conn->cli;
- return &hnd;
+ return &hnd;
}
-#if 0
+#if 0 /* This code now *well* out of date */
/* Return a SAM domain policy handle on a domain */
@@ -462,6 +562,7 @@ CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain, DOM_SID *domain_sid)
conn->pipe_data.samr.pipe_type == SAM_PIPE_DOM) {
if (!connection_ok(conn)) {
+ /* Shutdown cli? Free conn? Allow retry of DC? */
DLIST_REMOVE(cm_conns, conn);
return NULL;
}
@@ -532,6 +633,7 @@ CLI_POLICY_HND *cm_get_sam_user_handle(char *domain, DOM_SID *domain_sid,
conn->pipe_data.samr.rid == user_rid) {
if (!connection_ok(conn)) {
+ /* Shutdown cli? Free conn? Allow retry of DC? */
DLIST_REMOVE(cm_conns, conn);
return NULL;
}
@@ -608,6 +710,7 @@ CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, DOM_SID *domain_sid,
conn->pipe_data.samr.rid == group_rid) {
if (!connection_ok(conn)) {
+ /* Shutdown cli? Free conn? Allow retry of DC? */
DLIST_REMOVE(cm_conns, conn);
return NULL;
}
@@ -673,29 +776,46 @@ CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, DOM_SID *domain_sid,
NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd,
struct cli_state **cli)
{
- struct winbindd_cm_conn conn;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
+ struct winbindd_cm_conn *conn;
- /* Open an initial conection */
+ if (!cli) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
- ZERO_STRUCT(conn);
+ /* Open an initial conection */
- if (!cm_open_connection(domain, PIPE_NETLOGON, &conn)) {
- DEBUG(3, ("Could not open a connection to %s\n", domain));
+ if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_NETLOGON, &conn))) {
return result;
}
-
- result = cli_nt_setup_creds(conn.cli, trust_passwd);
+
+ result = new_cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ?
+ SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0, ("error connecting to domain password server: %s\n",
- get_nt_error_msg(result)));
- cli_shutdown(conn.cli);
+ nt_errstr(result)));
+
+ /* Hit the cache code again. This cleans out the old connection and gets a new one */
+ if (conn->cli->fd == -1) {
+ if (!NT_STATUS_IS_OK(result = get_connection_from_cache(domain, PIPE_NETLOGON, &conn))) {
+ return result;
+ }
+
+ /* Try again */
+ result = new_cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ?
+ SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd);
+ }
+
+ if (!NT_STATUS_IS_OK(result)) {
+ cli_shutdown(conn->cli);
+ DLIST_REMOVE(cm_conns, conn);
+ SAFE_FREE(conn);
return result;
+ }
}
- if (cli)
- *cli = conn.cli;
+ *cli = conn->cli;
return result;
}
diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c
index ad1abfc1f61..4ef57513bb0 100644
--- a/source/nsswitch/winbindd_group.c
+++ b/source/nsswitch/winbindd_group.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2.
+ Unix SMB/CIFS implementation.
Winbind daemon for ntdom nss module
@@ -28,20 +27,20 @@
Empty static struct for negative caching.
****************************************************************/
-static struct winbindd_gr negative_gr_cache_entry;
-
/* Fill a grent structure from various other information */
-static BOOL fill_grent(struct winbindd_gr *gr, char *gr_name,
- gid_t unix_gid)
+static BOOL fill_grent(struct winbindd_gr *gr, const char *dom_name,
+ const char *gr_name, gid_t unix_gid)
{
+ fstring full_group_name;
/* Fill in uid/gid */
+ fill_domain_username(full_group_name, dom_name, gr_name);
gr->gr_gid = unix_gid;
/* Group name and password */
- safe_strcpy(gr->gr_name, gr_name, sizeof(gr->gr_name) - 1);
+ safe_strcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name) - 1);
safe_strcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd) - 1);
return True;
@@ -60,36 +59,35 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
char **names = NULL, *buf;
BOOL result = False;
TALLOC_CTX *mem_ctx;
+ NTSTATUS status;
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("fill_grent_mem(%s)", domain->name)))
return False;
/* Initialise group membership information */
- DEBUG(10, ("fill_grent_mem(): group %s rid 0x%x\n",
- domain ? domain->name : "NULL", group_rid));
+ DEBUG(10, ("group %s rid 0x%x\n", domain ? domain->name : "NULL",
+ group_rid));
*num_gr_mem = 0;
if (group_name_type != SID_NAME_DOM_GRP) {
- DEBUG(1, ("fill_grent_mem(): rid %d in domain %s isn't a "
- "domain group\n", group_rid, domain->name));
+ DEBUG(1, ("rid %d in domain %s isn't a " "domain group\n",
+ group_rid, domain->name));
goto done;
}
/* Lookup group members */
-
- if (!winbindd_lookup_groupmem(domain, mem_ctx, group_rid, &num_names,
- &rid_mem, &names, &name_types)) {
-
- DEBUG(1, ("fill_grent_mem(): could not lookup membership "
- "for group rid %d in domain %s\n",
+ status = domain->methods->lookup_groupmem(domain, mem_ctx, group_rid, &num_names,
+ &rid_mem, &names, &name_types);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("could not lookup membership for group rid %d in domain %s\n",
group_rid, domain->name));
goto done;
}
- DEBUG(10, ("fill_grent_mem(): looked up %d names\n", num_names));
+ DEBUG(10, ("looked up %d names\n", num_names));
if (DEBUGLEVEL >= 10) {
for (i = 0; i < num_names; i++)
@@ -111,31 +109,27 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
the_name = names[i];
- DEBUG(10, ("fill_grent_mem(): processing name %s\n",
- the_name));
+ DEBUG(10, ("processing name %s\n", the_name));
/* FIXME: need to cope with groups within groups. These
occur in Universal groups on a Windows 2000 native mode
server. */
if (name_types[i] != SID_NAME_USER) {
- DEBUG(3, ("fill_grent_mem(): name %s isn't a domain "
- "user\n", the_name));
+ DEBUG(3, ("name %s isn't a domain user\n", the_name));
continue;
}
/* Don't bother with machine accounts */
if (the_name[strlen(the_name) - 1] == '$') {
- DEBUG(10, ("fill_grent_mem(): %s is machine account\n",
- the_name));
+ DEBUG(10, ("%s is machine account\n", the_name));
continue;
}
/* Append domain name */
- snprintf(name, sizeof(name), "%s%s%s", domain->name,
- lp_winbind_separator(), the_name);
+ fill_domain_username(name, domain->name, the_name);
len = strlen(name);
@@ -144,11 +138,9 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
if (!buf) {
buf_len += len + 1; /* List is comma separated */
(*num_gr_mem)++;
- DEBUG(10, ("fill_grent_mem(): buf_len + %d = %d\n", len + 1,
- buf_len));
+ DEBUG(10, ("buf_len + %d = %d\n", len + 1, buf_len));
} else {
- DEBUG(10, ("fill_grent_mem(): appending %s at index %d\n",
- name, len));
+ DEBUG(10, ("appending %s at ndx %d\n", name, len));
safe_strcpy(&buf[buf_ndx], name, len);
buf_ndx += len;
buf[buf_ndx] = ',';
@@ -158,9 +150,9 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
/* Allocate buffer */
- if (!buf) {
+ if (!buf && buf_len != 0) {
if (!(buf = malloc(buf_len))) {
- DEBUG(1, ("fill_grent_mem(): out of memory\n"));
+ DEBUG(1, ("out of memory\n"));
result = False;
goto done;
}
@@ -175,32 +167,31 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
*gr_mem = buf;
*gr_mem_len = buf_len;
- DEBUG(10, ("fill_grent_mem(): num_mem = %d, len = %d, mem = %s\n",
- *num_gr_mem, buf_len, num_gr_mem ? buf : "NULL"));
-
+ DEBUG(10, ("num_mem = %d, len = %d, mem = %s\n", *num_gr_mem,
+ buf_len, *num_gr_mem ? buf : "NULL"));
result = True;
done:
talloc_destroy(mem_ctx);
- DEBUG(10, ("fill_grent_mem(): returning %d\n", result));
+ DEBUG(10, ("fill_grent_mem returning %d\n", result));
return result;
}
/* Return a group structure from a group name */
-enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *state)
+enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state)
{
DOM_SID group_sid;
struct winbindd_domain *domain;
enum SID_NAME_USE name_type;
uint32 group_rid;
- fstring name_domain, name_group, name;
+ fstring name_domain, name_group;
char *tmp, *gr_mem;
gid_t gid;
- int extra_data_len, gr_mem_len;
+ int gr_mem_len;
DEBUG(3, ("[%5d]: getgrnam %s\n", state->pid,
state->request.data.groupname));
@@ -216,74 +207,39 @@ enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *sta
/* Get info for the domain */
if ((domain = find_domain_from_name(name_domain)) == NULL) {
- DEBUG(0, ("getgrname_from_group(): could not get domain "
- "sid for domain %s\n", name_domain));
+ DEBUG(0, ("could not get domain sid for domain %s\n",
+ name_domain));
return WINBINDD_ERROR;
}
- /* Check for cached group entry */
-
- if (winbindd_fetch_group_cache_entry(domain, name_group,
- &state->response.data.gr,
- &state->response.extra_data,
- &extra_data_len)) {
-
- /* Check if this is a negative cache entry. */
-
- if (memcmp(&negative_gr_cache_entry, &state->response.data.gr,
- sizeof(state->response.data.gr)) == 0)
- return WINBINDD_ERROR;
-
- state->response.length += extra_data_len;
- return WINBINDD_OK;
- }
-
- snprintf(name, sizeof(name), "%s\\%s", name_domain, name_group);
-
/* Get rid and name type from name */
- if (!winbindd_lookup_sid_by_name(name, &group_sid, &name_type)) {
+ if (!winbindd_lookup_sid_by_name(domain, name_group, &group_sid,
+ &name_type)) {
DEBUG(1, ("group %s in domain %s does not exist\n",
name_group, name_domain));
-
- winbindd_store_group_cache_entry(domain, name_group,
- &negative_gr_cache_entry, NULL, 0);
-
return WINBINDD_ERROR;
}
if ((name_type != SID_NAME_ALIAS) && (name_type != SID_NAME_DOM_GRP)) {
- DEBUG(1, ("from_group: name '%s' is not a local or domain "
- "group: %d\n", name_group, name_type));
-
- winbindd_store_group_cache_entry(domain, name_group,
- &negative_gr_cache_entry, NULL, 0);
-
+ DEBUG(1, ("name '%s' is not a local or domain group: %d\n",
+ name_group, name_type));
return WINBINDD_ERROR;
}
/* Fill in group structure */
+ sid_peek_rid(&group_sid, &group_rid);
- sid_split_rid(&group_sid, &group_rid);
-
- if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid, &gid)) {
- DEBUG(1, ("error sursing unix gid for sid\n"));
-
- winbindd_store_group_cache_entry(domain, name_group,
- &negative_gr_cache_entry, NULL, 0);
-
+ if (!winbindd_idmap_get_gid_from_sid(&group_sid, &gid)) {
+ DEBUG(1, ("error converting unix gid to sid\n"));
return WINBINDD_ERROR;
}
- if (!fill_grent(&state->response.data.gr,
- state->request.data.groupname, gid) ||
+ if (!fill_grent(&state->response.data.gr, name_domain,
+ name_group, gid) ||
!fill_grent_mem(domain, group_rid, name_type,
&state->response.data.gr.num_gr_mem,
&gr_mem, &gr_mem_len)) {
-
- winbindd_store_group_cache_entry(domain, name_group,
- &negative_gr_cache_entry, NULL, 0);
-
return WINBINDD_ERROR;
}
@@ -294,27 +250,20 @@ enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *sta
state->response.length += gr_mem_len;
state->response.extra_data = gr_mem;
- /* Update cached group info */
-
- winbindd_store_group_cache_entry(domain, name_group,
- &state->response.data.gr,
- state->response.extra_data,
- gr_mem_len);
-
return WINBINDD_OK;
}
/* Return a group structure from a gid number */
-enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state
- *state)
+enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state)
{
struct winbindd_domain *domain;
DOM_SID group_sid;
enum SID_NAME_USE name_type;
+ fstring dom_name;
fstring group_name;
uint32 group_rid;
- int extra_data_len, gr_mem_len;
+ int gr_mem_len;
char *gr_mem;
DEBUG(3, ("[%5d]: getgrgid %d\n", state->pid,
@@ -330,53 +279,31 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state
if (!winbindd_idmap_get_rid_from_gid(state->request.data.gid,
&group_rid, &domain)) {
- DEBUG(1, ("Could not convert gid %d to rid\n",
+ DEBUG(1, ("could not convert gid %d to rid\n",
state->request.data.gid));
return WINBINDD_ERROR;
}
- /* Try a cached entry */
-
- if (winbindd_fetch_gid_cache_entry(domain,
- state->request.data.gid,
- &state->response.data.gr,
- &state->response.extra_data,
- &extra_data_len)) {
-
- /* Check if this is a negative cache entry. */
-
- if (memcmp(&negative_gr_cache_entry, &state->response.data.gr,
- sizeof(state->response.data.gr)) == 0)
- return WINBINDD_ERROR;
-
- state->response.length += extra_data_len;
- return WINBINDD_OK;
- }
-
/* Get sid from gid */
sid_copy(&group_sid, &domain->sid);
sid_append_rid(&group_sid, group_rid);
- if (!winbindd_lookup_name_by_sid(&group_sid, group_name, &name_type)) {
- DEBUG(1, ("Could not lookup sid\n"));
+ if (!winbindd_lookup_name_by_sid(&group_sid, dom_name, group_name, &name_type)) {
+ DEBUG(1, ("could not lookup sid\n"));
return WINBINDD_ERROR;
}
- if (strcmp(lp_winbind_separator(),"\\"))
- string_sub(group_name, "\\", lp_winbind_separator(),
- sizeof(fstring));
-
if (!((name_type == SID_NAME_ALIAS) ||
(name_type == SID_NAME_DOM_GRP))) {
- DEBUG(1, ("from_gid: name '%s' is not a local or domain "
- "group: %d\n", group_name, name_type));
+ DEBUG(1, ("name '%s' is not a local or domain group: %d\n",
+ group_name, name_type));
return WINBINDD_ERROR;
}
/* Fill in group structure */
- if (!fill_grent(&state->response.data.gr, group_name,
+ if (!fill_grent(&state->response.data.gr, dom_name, group_name,
state->request.data.gid) ||
!fill_grent_mem(domain, group_rid, name_type,
&state->response.data.gr.num_gr_mem,
@@ -390,13 +317,6 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state
state->response.length += gr_mem_len;
state->response.extra_data = gr_mem;
- /* Update cached group info */
-
- winbindd_store_gid_cache_entry(domain, state->request.data.gid,
- &state->response.data.gr,
- state->response.extra_data,
- gr_mem_len);
-
return WINBINDD_OK;
}
@@ -408,7 +328,7 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state
enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state)
{
- struct winbindd_domain *tmp;
+ struct winbindd_domain *domain;
DEBUG(3, ("[%5d]: setgrent\n", state->pid));
@@ -426,28 +346,25 @@ enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state)
/* Create sam pipes for each domain we know about */
- if (domain_list == NULL)
- get_domain_info();
-
- for (tmp = domain_list; tmp != NULL; tmp = tmp->next) {
+ for (domain = domain_list(); domain != NULL; domain = domain->next) {
struct getent_state *domain_state;
/* Skip domains other than WINBINDD_DOMAIN environment
variable */
if ((strcmp(state->request.domain, "") != 0) &&
- !check_domain_env(state->request.domain, tmp->name)) {
- DEBUG(5, ("skipping domain %s because of env var\n",
- tmp->name));
+ !check_domain_env(state->request.domain, domain->name))
continue;
- }
/* Create a state record for this domain */
- if ((domain_state = create_getent_state(tmp)) == NULL) {
- DEBUG(5, ("error connecting to dc for domain %s\n",
- tmp->name));
- continue;
- }
+
+ if ((domain_state = (struct getent_state *)
+ malloc(sizeof(struct getent_state))) == NULL)
+ return WINBINDD_ERROR;
+
+ ZERO_STRUCTP(domain_state);
+
+ fstrcpy(domain_state->domain_name, domain->name);
/* Add to list of open domains */
@@ -480,93 +397,62 @@ static BOOL get_sam_group_entries(struct getent_state *ent)
{
NTSTATUS status;
uint32 num_entries;
- struct acct_info *name_list = NULL, *tnl;
+ struct acct_info *name_list = NULL;
TALLOC_CTX *mem_ctx;
BOOL result = False;
+ struct acct_info *sam_grp_entries = NULL;
+ struct winbindd_domain *domain;
- if (ent->got_all_sam_entries)
+ if (ent->got_sam_entries)
return False;
-#if 0
- if (winbindd_fetch_group_cache(ent->domain,
- &ent->sam_entries,
- &ent->num_sam_entries))
- return True;
-#endif
-
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("get_sam_group_entries(%s)",
+ ent->domain_name)))
return False;
/* Free any existing group info */
SAFE_FREE(ent->sam_entries);
ent->num_sam_entries = 0;
-
- /* Enumerate domain groups */
-
- do {
- struct acct_info *sam_grp_entries = NULL;
- CLI_POLICY_HND *hnd;
-
- num_entries = 0;
+ ent->got_sam_entries = True;
- if (!(hnd = cm_get_sam_handle(ent->domain->name)))
- break;
-
- status = cli_samr_enum_dom_groups(
- hnd->cli, mem_ctx, &ent->dom_pol,
- &ent->grp_query_start_ndx,
- 0x8000, /* buffer size? */
- (struct acct_info **) &sam_grp_entries, &num_entries);
-
- /* Copy entries into return buffer */
-
- if (num_entries) {
-
- tnl = Realloc(name_list,
- sizeof(struct acct_info) *
- (ent->num_sam_entries +
- num_entries));
+ /* Enumerate domain groups */
- if (tnl == NULL) {
- DEBUG(0,("get_sam_group_entries: unable to "
- "realloc a structure!\n"));
- SAFE_FREE(name_list);
+ num_entries = 0;
- goto done;
- } else
- name_list = tnl;
+ if (!(domain = find_domain_from_name(ent->domain_name))) {
+ DEBUG(3, ("no such domain %s in get_sam_group_entries\n", ent->domain_name));
+ goto done;
+ }
- memcpy(&name_list[ent->num_sam_entries],
- sam_grp_entries,
- num_entries * sizeof(struct acct_info));
- }
+ status = domain->methods->enum_dom_groups(domain,
+ mem_ctx,
+ &num_entries,
+ &sam_grp_entries);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ result = False;
+ goto done;
+ }
- ent->num_sam_entries += num_entries;
-
- if (NT_STATUS_V(status) != NT_STATUS_V(STATUS_MORE_ENTRIES))
- break;
+ /* Copy entries into return buffer */
- } while (ent->num_sam_entries < MAX_FETCH_SAM_ENTRIES);
+ if (num_entries) {
+ name_list = malloc(sizeof(struct acct_info) * num_entries);
+ memcpy(name_list, sam_grp_entries,
+ num_entries * sizeof(struct acct_info));
+ }
+
+ ent->num_sam_entries = num_entries;
-#if 0
- /* Fill cache with received entries */
-
- winbindd_store_group_cache(ent->domain, ent->sam_entries,
- ent->num_sam_entries);
-#endif
-
/* Fill in remaining fields */
ent->sam_entries = name_list;
ent->sam_entry_index = 0;
- ent->got_all_sam_entries = (NT_STATUS_V(status) !=
- NT_STATUS_V(STATUS_MORE_ENTRIES));
result = (ent->num_sam_entries > 0);
done:
-
talloc_destroy(mem_ctx);
return result;
@@ -617,7 +503,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
tryagain:
- DEBUG(10, ("getgrent(): entry_index = %d, num_entries = %d\n",
+ DEBUG(10, ("entry_index = %d, num_entries = %d\n",
ent->sam_entry_index, ent->num_sam_entries));
if (ent->num_sam_entries == ent->sam_entry_index) {
@@ -625,8 +511,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
while(ent && !get_sam_group_entries(ent)) {
struct getent_state *next_ent;
- DEBUG(10, ("getgrent(): freeing state info for "
- "domain %s\n", ent->domain->name));
+ DEBUG(10, ("freeing state info for domain %s\n", ent->domain_name));
/* Free state information for this domain */
@@ -650,37 +535,46 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
/* Lookup group info */
if (!winbindd_idmap_get_gid_from_rid(
- ent->domain->name,
+ ent->domain_name,
name_list[ent->sam_entry_index].rid,
&group_gid)) {
- DEBUG(1, ("getgrent(): could not look up gid for group %s\n",
+ DEBUG(1, ("could not look up gid for group %s\n",
name_list[ent->sam_entry_index].acct_name));
ent->sam_entry_index++;
goto tryagain;
}
- DEBUG(10, ("getgrent(): got gid %d for group %x\n", group_gid,
+ DEBUG(10, ("got gid %d for group %x\n", group_gid,
name_list[ent->sam_entry_index].rid));
/* Fill in group entry */
- slprintf(domain_group_name, sizeof(domain_group_name) - 1,
- "%s%s%s", ent->domain->name, lp_winbind_separator(),
+ fill_domain_username(domain_group_name, ent->domain_name,
name_list[ent->sam_entry_index].acct_name);
-
+
result = fill_grent(&group_list[group_list_ndx],
- domain_group_name, group_gid);
+ ent->domain_name,
+ name_list[ent->sam_entry_index].acct_name,
+ group_gid);
/* Fill in group membership entry */
if (result) {
+ struct winbindd_domain *domain;
- /* Get group membership */
+ if (!(domain =
+ find_domain_from_name(ent->domain_name))) {
+ DEBUG(3, ("No such domain %s in winbindd_getgrent\n", ent->domain_name));
+ result = False;
+ goto done;
+ }
+ /* Get group membership */
+
result = fill_grent_mem(
- ent->domain,
+ domain,
name_list[ent->sam_entry_index].rid,
SID_NAME_DOM_GRP,
&group_list[group_list_ndx].num_gr_mem,
@@ -689,19 +583,18 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
if (result) {
/* Append to group membership list */
-
new_gr_mem_list = Realloc(
gr_mem_list,
gr_mem_list_len + gr_mem_len);
if (!new_gr_mem_list && (group_list[group_list_ndx].num_gr_mem != 0)) {
- DEBUG(0, ("getgrent(): out of memory\n"));
+ DEBUG(0, ("out of memory\n"));
SAFE_FREE(gr_mem_list);
gr_mem_list_len = 0;
break;
}
- DEBUG(10, ("getgrent(): list_len = %d, mem_len = %d\n",
+ DEBUG(10, ("list_len = %d, mem_len = %d\n",
gr_mem_list_len, gr_mem_len));
gr_mem_list = new_gr_mem_list;
@@ -723,7 +616,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
if (result) {
- DEBUG(10, ("getgrent(): adding group num_entries = %d\n",
+ DEBUG(10, ("adding group num_entries = %d\n",
state->response.data.num_entries));
group_list_ndx++;
@@ -766,7 +659,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
state->response.length += gr_mem_list_len;
- DEBUG(10, ("getgrent(): returning %d groups, length = %d\n",
+ DEBUG(10, ("returning %d groups, length = %d\n",
group_list_ndx, gr_mem_list_len));
/* Out of domains */
@@ -781,127 +674,70 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
{
uint32 total_entries = 0;
- uint32 num_domain_entries;
struct winbindd_domain *domain;
- struct getent_state *groups;
char *extra_data = NULL;
char *ted = NULL;
int extra_data_len = 0, i;
- void *sam_entries = NULL;
DEBUG(3, ("[%5d]: list groups\n", state->pid));
/* Enumerate over trusted domains */
- ZERO_STRUCT(groups);
+ for (domain = domain_list(); domain; domain = domain->next) {
+ struct getent_state groups;
- if (domain_list == NULL)
- get_domain_info();
-
- for (domain = domain_list; domain; domain = domain->next) {
+ ZERO_STRUCT(groups);
/* Skip domains other than WINBINDD_DOMAIN environment
variable */
-
if ((strcmp(state->request.domain, "") != 0) &&
!check_domain_env(state->request.domain, domain->name))
continue;
/* Get list of sam groups */
+ ZERO_STRUCT(groups);
+ fstrcpy(groups.domain_name, domain->name);
- if ((groups = create_getent_state(domain)) == NULL)
- continue;
-
- /*
- * iterate through all groups
- * total_entries: maintains a total count over **all domains**
- * num_domain_entries: is the running count for this domain
- */
-
- num_domain_entries = 0;
-
- while (get_sam_group_entries(groups)) {
- int new_size;
- int offset;
+ get_sam_group_entries(&groups);
- offset = sizeof(struct acct_info) * num_domain_entries;
- new_size = sizeof(struct acct_info)
- * (groups->num_sam_entries + num_domain_entries);
- sam_entries = Realloc(sam_entries, new_size);
-
- if (!sam_entries) {
- free_getent_state(groups);
- return WINBINDD_ERROR;
- }
- num_domain_entries += groups->num_sam_entries;
- memcpy (((char *)sam_entries)+offset,
- groups->sam_entries,
- sizeof(struct acct_info) *
- groups->num_sam_entries);
-
- SAFE_FREE(groups->sam_entries);
- groups->num_sam_entries = 0;
- }
-
- /* skip remainder of loop if we idn;t retrieve any groups */
-
- if (num_domain_entries == 0)
+ if (groups.num_sam_entries == 0) {
+ /* this domain is empty or in an error state */
continue;
-
- /* setup the groups struct to contain all the groups
- retrieved for this domain */
-
- groups->num_sam_entries = num_domain_entries;
- groups->sam_entries = sam_entries;
-
- sam_entries = NULL;
+ }
/* keep track the of the total number of groups seen so
far over all domains */
-
- total_entries += groups->num_sam_entries;
+ total_entries += groups.num_sam_entries;
/* Allocate some memory for extra data. Note that we limit
- account names to sizeof(fstring) = 128 characters. */
-
+ account names to sizeof(fstring) = 128 characters. */
ted = Realloc(extra_data, sizeof(fstring) * total_entries);
if (!ted) {
- DEBUG(0,("winbindd_list_groups: failed to enlarge "
- "buffer!\n"));
+ DEBUG(0,("failed to enlarge buffer!\n"));
SAFE_FREE(extra_data);
- free_getent_state(groups);
return WINBINDD_ERROR;
} else
extra_data = ted;
/* Pack group list into extra data fields */
-
- for (i = 0; i < groups->num_sam_entries; i++) {
+ for (i = 0; i < groups.num_sam_entries; i++) {
char *group_name = ((struct acct_info *)
- groups->sam_entries)[i].acct_name;
+ groups.sam_entries)[i].acct_name;
fstring name;
- /* Convert unistring to ascii */
-
- snprintf(name, sizeof(name), "%s%s%s", domain->name,
- lp_winbind_separator(), group_name);
-
- /* Append to extra data */
-
+ fill_domain_username(name, domain->name, group_name);
+ /* Append to extra data */
memcpy(&extra_data[extra_data_len], name,
strlen(name));
-
extra_data_len += strlen(name);
-
extra_data[extra_data_len++] = ',';
}
- free_getent_state(groups);
+ free(groups.sam_entries);
}
/* Assign extra_data fields in response structure */
-
if (extra_data) {
extra_data[extra_data_len - 1] = '\0';
state->response.extra_data = extra_data;
@@ -919,11 +755,12 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state)
{
- fstring name_domain, name_user, name;
+ fstring name_domain, name_user;
DOM_SID user_sid;
enum SID_NAME_USE name_type;
uint32 user_rid, num_groups, num_gids;
- DOM_GID *user_groups = NULL;
+ NTSTATUS status;
+ uint32 *user_gids;
struct winbindd_domain *domain;
enum winbindd_result result = WINBINDD_ERROR;
gid_t *gid_list;
@@ -933,7 +770,8 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state)
DEBUG(3, ("[%5d]: getgroups %s\n", state->pid,
state->request.data.username));
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("winbindd_getgroups(%s)",
+ state->request.data.username)))
return WINBINDD_ERROR;
/* Parse domain and username */
@@ -950,44 +788,40 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state)
goto done;
}
- slprintf(name, sizeof(name) - 1, "%s\\%s", name_domain, name_user);
-
/* Get rid and name type from name. The following costs 1 packet */
- if (!winbindd_lookup_sid_by_name(name, &user_sid, &name_type)) {
+ if (!winbindd_lookup_sid_by_name(domain, name_user, &user_sid,
+ &name_type)) {
DEBUG(1, ("user '%s' does not exist\n", name_user));
goto done;
}
if (name_type != SID_NAME_USER) {
- DEBUG(1, ("name '%s' is not a user name: %d\n", name_user,
- name_type));
+ DEBUG(1, ("name '%s' is not a user name: %d\n",
+ name_user, name_type));
goto done;
}
sid_split_rid(&user_sid, &user_rid);
- if (!winbindd_lookup_usergroups(domain, mem_ctx, user_rid,
- &num_groups, &user_groups))
- goto done;
+ status = domain->methods->lookup_usergroups(domain, mem_ctx, user_rid, &num_groups, &user_gids);
+ if (!NT_STATUS_IS_OK(status)) goto done;
/* Copy data back to client */
num_gids = 0;
gid_list = malloc(sizeof(gid_t) * num_groups);
- if (gid_list == NULL)
- goto done;
if (state->response.extra_data)
goto done;
for (i = 0; i < num_groups; i++) {
- if (!winbindd_idmap_get_gid_from_rid(
- domain->name, user_groups[i].g_rid,
- &gid_list[num_gids])) {
+ if (!winbindd_idmap_get_gid_from_rid(domain->name,
+ user_gids[i],
+ &gid_list[num_gids])) {
DEBUG(1, ("unable to convert group rid %d to gid\n",
- user_groups[i].g_rid));
+ user_gids[i]));
continue;
}
diff --git a/source/nsswitch/winbindd_idmap.c b/source/nsswitch/winbindd_idmap.c
index 06d442c5655..0594f616801 100644
--- a/source/nsswitch/winbindd_idmap.c
+++ b/source/nsswitch/winbindd_idmap.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon - user related function
@@ -28,6 +27,9 @@
#define HWM_GROUP "GROUP HWM"
#define HWM_USER "USER HWM"
+/* idmap version determines auto-conversion */
+#define IDMAP_VERSION 2
+
/* Globals */
static TDB_CONTEXT *idmap_tdb;
@@ -40,7 +42,7 @@ static BOOL allocate_id(uid_t *id, BOOL isgroup)
/* Get current high water mark */
- if ((hwm = tdb_fetch_int(idmap_tdb,
+ if ((hwm = tdb_fetch_int32(idmap_tdb,
isgroup ? HWM_GROUP : HWM_USER)) == -1) {
return False;
}
@@ -61,23 +63,20 @@ static BOOL allocate_id(uid_t *id, BOOL isgroup)
/* Store new high water mark */
- tdb_store_int(idmap_tdb, isgroup ? HWM_GROUP : HWM_USER, hwm);
+ tdb_store_int32(idmap_tdb, isgroup ? HWM_GROUP : HWM_USER, hwm);
return True;
}
/* Get an id from a rid */
-
-static BOOL get_id_from_rid(char *domain_name, uint32 rid, uid_t *id,
- BOOL isgroup)
+static BOOL get_id_from_sid(DOM_SID *sid, uid_t *id, BOOL isgroup)
{
TDB_DATA data, key;
fstring keystr;
BOOL result = False;
- /* Check if rid is present in database */
-
- slprintf(keystr, sizeof(keystr), "%s/%d", domain_name, rid);
+ /* Check if sid is present in database */
+ sid_to_string(keystr, sid);
key.dptr = keystr;
key.dsize = strlen(keystr) + 1;
@@ -89,34 +88,29 @@ static BOOL get_id_from_rid(char *domain_name, uint32 rid, uid_t *id,
int the_id;
/* Parse and return existing uid */
-
fstrcpy(scanstr, isgroup ? "GID" : "UID");
fstrcat(scanstr, " %d");
if (sscanf(data.dptr, scanstr, &the_id) == 1) {
-
/* Store uid */
-
if (id) {
- *id = the_id;
+ *id = the_id;
}
result = True;
}
SAFE_FREE(data.dptr);
-
} else {
- /* Allocate a new id for this rid */
+ /* Allocate a new id for this sid */
if (id && allocate_id(id, isgroup)) {
fstring keystr2;
/* Store new id */
- slprintf(keystr2, sizeof(keystr2), "%s %d", isgroup ? "GID" :
- "UID", *id);
+ slprintf(keystr2, sizeof(keystr2), "%s %d", isgroup ? "GID" : "UID", *id);
data.dptr = keystr2;
data.dsize = strlen(keystr2) + 1;
@@ -131,24 +125,52 @@ static BOOL get_id_from_rid(char *domain_name, uint32 rid, uid_t *id,
return result;
}
-/* Get a uid from a user rid */
+/* Get a uid from a user sid */
+BOOL winbindd_idmap_get_uid_from_sid(DOM_SID *sid, uid_t *uid)
+{
+ return get_id_from_sid(sid, uid, False);
+}
-BOOL winbindd_idmap_get_uid_from_rid(char *domain_name, uint32 user_rid,
- uid_t *uid)
+/* Get a gid from a group sid */
+BOOL winbindd_idmap_get_gid_from_sid(DOM_SID *sid, gid_t *gid)
{
- return get_id_from_rid(domain_name, user_rid, uid, False);
+ return get_id_from_sid(sid, gid, True);
}
-/* Get a gid from a group rid */
+/* Get a uid from a user rid */
+BOOL winbindd_idmap_get_uid_from_rid(const char *dom_name, uint32 rid, uid_t *uid)
+{
+ struct winbindd_domain *domain;
+ DOM_SID sid;
+
+ if (!(domain = find_domain_from_name(dom_name))) {
+ return False;
+ }
+
+ sid_copy(&sid, &domain->sid);
+ sid_append_rid(&sid, rid);
-BOOL winbindd_idmap_get_gid_from_rid(char *domain_name, uint32 group_rid,
- gid_t *gid)
+ return get_id_from_sid(&sid, uid, False);
+}
+
+/* Get a gid from a group rid */
+BOOL winbindd_idmap_get_gid_from_rid(const char *dom_name, uint32 rid, gid_t *gid)
{
- return get_id_from_rid(domain_name, group_rid, gid, True);
+ struct winbindd_domain *domain;
+ DOM_SID sid;
+
+ if (!(domain = find_domain_from_name(dom_name))) {
+ return False;
+ }
+
+ sid_copy(&sid, &domain->sid);
+ sid_append_rid(&sid, rid);
+
+ return get_id_from_sid(&sid, gid, True);
}
-BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain,
- BOOL isgroup)
+
+BOOL get_sid_from_id(int id, DOM_SID *sid, BOOL isgroup)
{
TDB_DATA key, data;
fstring keystr;
@@ -162,43 +184,41 @@ BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain,
data = tdb_fetch(idmap_tdb, key);
if (data.dptr) {
- char *p = data.dptr;
- fstring domain_name;
- uint32 the_rid;
-
- if (next_token(&p, domain_name, "/", sizeof(fstring))) {
-
- the_rid = atoi(p);
-
- if (rid) {
- *rid = the_rid;
- }
-
- if (domain) {
- *domain = find_domain_from_name(domain_name);
- if (*domain == NULL) {
- DEBUG(1, ("unknown domain %s for rid %d\n",
- domain_name, the_rid));
- result = False;
- goto done;
- }
- }
-
- result = True;
- }
- done:
- SAFE_FREE(data.dptr);
+ result = string_to_sid(sid, data.dptr);
+ SAFE_FREE(data.dptr);
}
return result;
}
-/* Get a user rid from a uid */
+/* Get a sid from a uid */
+BOOL winbindd_idmap_get_sid_from_uid(uid_t uid, DOM_SID *sid)
+{
+ return get_sid_from_id((int)uid, sid, False);
+}
+
+/* Get a sid from a gid */
+BOOL winbindd_idmap_get_sid_from_gid(gid_t gid, DOM_SID *sid)
+{
+ return get_sid_from_id((int)gid, sid, True);
+}
+/* Get a user rid from a uid */
BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid,
struct winbindd_domain **domain)
{
- return get_rid_from_id((int)uid, user_rid, domain, False);
+ DOM_SID sid;
+
+ if (!get_sid_from_id((int)uid, &sid, False)) {
+ return False;
+ }
+
+ *domain = find_domain_from_sid(&sid);
+ if (! *domain) return False;
+
+ sid_split_rid(&sid, user_rid);
+
+ return True;
}
/* Get a group rid from a gid */
@@ -206,38 +226,236 @@ BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid,
BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid,
struct winbindd_domain **domain)
{
- return get_rid_from_id((int)gid, group_rid, domain, True);
+ DOM_SID sid;
+
+ if (!get_sid_from_id((int)gid, &sid, True)) {
+ return False;
+ }
+
+ *domain = find_domain_from_sid(&sid);
+ if (! *domain) return False;
+
+ sid_split_rid(&sid, group_rid);
+
+ return True;
+}
+
+/* convert one record to the new format */
+static int convert_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA data, void *ignored)
+{
+ struct winbindd_domain *domain;
+ char *p;
+ DOM_SID sid;
+ uint32 rid;
+ fstring keystr;
+ fstring dom_name;
+ TDB_DATA key2;
+
+ p = strchr(key.dptr, '/');
+ if (!p)
+ return 0;
+
+ *p = 0;
+ fstrcpy(dom_name, key.dptr);
+ *p++ = '/';
+
+ domain = find_domain_from_name(dom_name);
+ if (!domain) {
+ /* We must delete the old record. */
+ DEBUG(0,("winbindd: convert_fn : Unable to find domain %s\n", dom_name ));
+ DEBUG(0,("winbindd: convert_fn : deleting record %s\n", key.dptr ));
+ tdb_delete(idmap_tdb, key);
+ return 0;
+ }
+
+ rid = atoi(p);
+
+ sid_copy(&sid, &domain->sid);
+ sid_append_rid(&sid, rid);
+
+ sid_to_string(keystr, &sid);
+ key2.dptr = keystr;
+ key2.dsize = strlen(keystr) + 1;
+
+ if (tdb_store(idmap_tdb, key2, data, TDB_INSERT) != 0) {
+ /* not good! */
+ DEBUG(0,("winbindd: convert_fn : Unable to update record %s\n", key2.dptr ));
+ DEBUG(0,("winbindd: convert_fn : conversion failed - idmap corrupt ?\n"));
+ return -1;
+ }
+
+ if (tdb_store(idmap_tdb, data, key2, TDB_REPLACE) != 0) {
+ /* not good! */
+ DEBUG(0,("winbindd: convert_fn : Unable to update record %s\n", data.dptr ));
+ DEBUG(0,("winbindd: convert_fn : conversion failed - idmap corrupt ?\n"));
+ return -1;
+ }
+
+ tdb_delete(idmap_tdb, key);
+
+ return 0;
}
-/* Initialise idmap database */
+#if 0
+/*****************************************************************************
+ Make a backup copy of the old idmap just to be safe.... JRA.
+*****************************************************************************/
-BOOL winbindd_idmap_init(void)
+static BOOL backup_old_idmap(const char *idmap_name)
{
- /* Open tdb cache */
+ pstring new_name;
+ int outfd = -1;
+ SMB_OFF_T size;
+ struct stat st;
+
+ pstrcpy(new_name, idmap_name);
+ pstrcat(new_name, ".bak");
+
+ DEBUG(10,("backup_old_idmap: backing up %s to %s before upgrade.\n",
+ idmap_name, new_name ));
+
+ if (tdb_lockall(idmap_tdb) == -1) {
+ DEBUG(10,("backup_old_idmap: failed to lock %s. Error %s\n",
+ idmap_name, tdb_errorstr(idmap_tdb) ));
+ return False;
+ }
+ if ((outfd = open(new_name, O_CREAT|O_EXCL|O_RDWR, 0600)) == -1) {
+ DEBUG(10,("backup_old_idmap: failed to open %s. Error %s\n",
+ new_name, strerror(errno) ));
+ goto fail;
+ }
+
+ if (fstat(idmap_tdb->fd, &st) == -1) {
+ DEBUG(10,("backup_old_idmap: failed to fstat %s. Error %s\n",
+ idmap_name, strerror(errno) ));
+ goto fail;
+ }
+
+ size = (SMB_OFF_T)st.st_size;
+
+ if (transfer_file(idmap_tdb->fd, outfd, size) != size ) {
+ DEBUG(10,("backup_old_idmap: failed to copy %s. Error %s\n",
+ idmap_name, strerror(errno) ));
+ goto fail;
+ }
+
+ if (close(outfd) == -1) {
+ DEBUG(10,("backup_old_idmap: failed to close %s. Error %s\n",
+ idmap_name, strerror(errno) ));
+ outfd = -1;
+ goto fail;
+ }
+ tdb_unlockall(idmap_tdb);
+ return True;
- if (!(idmap_tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0,
- TDB_NOLOCK, O_RDWR | O_CREAT, 0600))) {
- DEBUG(0, ("Unable to open idmap database\n"));
- return False;
- }
+fail:
- /* Create high water marks for group and user id */
+ if (outfd != -1)
+ close(outfd);
+ tdb_unlockall(idmap_tdb);
+ return False;
+}
+#endif
- if (tdb_fetch_int(idmap_tdb, HWM_USER) == -1) {
- if (tdb_store_int(idmap_tdb, HWM_USER, server_state.uid_low) == -1) {
- DEBUG(0, ("Unable to initialise user hwm in idmap database\n"));
- return False;
- }
- }
+/*****************************************************************************
+ Convert the idmap database from an older version.
+*****************************************************************************/
- if (tdb_fetch_int(idmap_tdb, HWM_GROUP) == -1) {
- if (tdb_store_int(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) {
- DEBUG(0, ("Unable to initialise group hwm in idmap database\n"));
- return False;
- }
- }
+static BOOL idmap_convert(const char *idmap_name)
+{
+ int32 vers = tdb_fetch_int32(idmap_tdb, "IDMAP_VERSION");
+ BOOL bigendianheader = (idmap_tdb->flags & TDB_BIGENDIAN) ? True : False;
+
+ if (vers == IDMAP_VERSION)
+ return True;
+
+#if 0
+ /* Make a backup copy before doing anything else.... */
+ if (!backup_old_idmap(idmap_name))
+ return False;
+#endif
+
+ if (((vers == -1) && bigendianheader) || (IREV(vers) == IDMAP_VERSION)) {
+ /* Arrggghh ! Bytereversed or old big-endian - make order independent ! */
+ /*
+ * high and low records were created on a
+ * big endian machine and will need byte-reversing.
+ */
+
+ int32 wm;
+
+ wm = tdb_fetch_int32(idmap_tdb, HWM_USER);
+
+ if (wm != -1) {
+ wm = IREV(wm);
+ } else
+ wm = server_state.uid_low;
- return True;
+ if (tdb_store_int32(idmap_tdb, HWM_USER, wm) == -1) {
+ DEBUG(0, ("idmap_convert: Unable to byteswap user hwm in idmap database\n"));
+ return False;
+ }
+
+ wm = tdb_fetch_int32(idmap_tdb, HWM_GROUP);
+ if (wm != -1) {
+ wm = IREV(wm);
+ } else
+ wm = server_state.gid_low;
+
+ if (tdb_store_int32(idmap_tdb, HWM_GROUP, wm) == -1) {
+ DEBUG(0, ("idmap_convert: Unable to byteswap group hwm in idmap database\n"));
+ return False;
+ }
+ }
+
+ /* the old format stored as DOMAIN/rid - now we store the SID direct */
+ tdb_traverse(idmap_tdb, convert_fn, NULL);
+
+ if (tdb_store_int32(idmap_tdb, "IDMAP_VERSION", IDMAP_VERSION) == -1) {
+ DEBUG(0, ("idmap_convert: Unable to byteswap group hwm in idmap database\n"));
+ return False;
+ }
+
+ return True;
+}
+
+/*****************************************************************************
+ Initialise idmap database.
+*****************************************************************************/
+
+BOOL winbindd_idmap_init(void)
+{
+ /* Open tdb cache */
+
+ if (!(idmap_tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0,
+ TDB_DEFAULT, O_RDWR | O_CREAT, 0600))) {
+ DEBUG(0, ("winbindd_idmap_init: Unable to open idmap database\n"));
+ return False;
+ }
+
+ /* possibly convert from an earlier version */
+ if (!idmap_convert(lock_path("winbindd_idmap.tdb"))) {
+ DEBUG(0, ("winbindd_idmap_init: Unable to open idmap database\n"));
+ return False;
+ }
+
+ /* Create high water marks for group and user id */
+
+ if (tdb_fetch_int32(idmap_tdb, HWM_USER) == -1) {
+ if (tdb_store_int32(idmap_tdb, HWM_USER, server_state.uid_low) == -1) {
+ DEBUG(0, ("winbindd_idmap_init: Unable to initialise user hwm in idmap database\n"));
+ return False;
+ }
+ }
+
+ if (tdb_fetch_int32(idmap_tdb, HWM_GROUP) == -1) {
+ if (tdb_store_int32(idmap_tdb, HWM_GROUP, server_state.gid_low) == -1) {
+ DEBUG(0, ("winbindd_idmap_init: Unable to initialise group hwm in idmap database\n"));
+ return False;
+ }
+ }
+
+ return True;
}
BOOL winbindd_idmap_close(void)
@@ -260,49 +478,49 @@ BOOL winbindd_idmap_close(void)
void winbindd_idmap_status(void)
{
- int user_hwm, group_hwm;
+ int user_hwm, group_hwm;
- DEBUG(0, ("winbindd idmap status:\n"));
+ DEBUG(0, ("winbindd idmap status:\n"));
- /* Get current high water marks */
+ /* Get current high water marks */
- if ((user_hwm = tdb_fetch_int(idmap_tdb, HWM_USER)) == -1) {
- DEBUG(DUMP_INFO, ("\tCould not get userid high water mark!\n"));
- }
+ if ((user_hwm = tdb_fetch_int32(idmap_tdb, HWM_USER)) == -1) {
+ DEBUG(DUMP_INFO, ("\tCould not get userid high water mark!\n"));
+ }
- if ((group_hwm = tdb_fetch_int(idmap_tdb, HWM_GROUP)) == -1) {
- DEBUG(DUMP_INFO, ("\tCould not get groupid high water mark!\n"));
- }
+ if ((group_hwm = tdb_fetch_int32(idmap_tdb, HWM_GROUP)) == -1) {
+ DEBUG(DUMP_INFO, ("\tCould not get groupid high water mark!\n"));
+ }
- /* Display next ids to allocate */
+ /* Display next ids to allocate */
- if (user_hwm != -1) {
- DEBUG(DUMP_INFO, ("\tNext userid to allocate is %d\n", user_hwm));
- }
+ if (user_hwm != -1) {
+ DEBUG(DUMP_INFO, ("\tNext userid to allocate is %d\n", user_hwm));
+ }
- if (group_hwm != -1) {
- DEBUG(DUMP_INFO, ("\tNext groupid to allocate is %d\n", group_hwm));
- }
+ if (group_hwm != -1) {
+ DEBUG(DUMP_INFO, ("\tNext groupid to allocate is %d\n", group_hwm));
+ }
- /* Display percentage of id range already allocated. */
+ /* Display percentage of id range already allocated. */
- if (user_hwm != -1) {
- int num_users = user_hwm - server_state.uid_low;
- int total_users = server_state.uid_high - server_state.uid_low;
+ if (user_hwm != -1) {
+ int num_users = user_hwm - server_state.uid_low;
+ int total_users = server_state.uid_high - server_state.uid_low;
- DEBUG(DUMP_INFO, ("\tUser id range is %d%% full (%d of %d)\n",
- num_users * 100 / total_users, num_users,
- total_users));
- }
+ DEBUG(DUMP_INFO, ("\tUser id range is %d%% full (%d of %d)\n",
+ num_users * 100 / total_users, num_users,
+ total_users));
+ }
- if (group_hwm != -1) {
- int num_groups = group_hwm - server_state.gid_low;
- int total_groups = server_state.gid_high - server_state.gid_low;
+ if (group_hwm != -1) {
+ int num_groups = group_hwm - server_state.gid_low;
+ int total_groups = server_state.gid_high - server_state.gid_low;
- DEBUG(DUMP_INFO, ("\tGroup id range is %d%% full (%d of %d)\n",
- num_groups * 100 / total_groups, num_groups,
- total_groups));
- }
+ DEBUG(DUMP_INFO, ("\tGroup id range is %d%% full (%d of %d)\n",
+ num_groups * 100 / total_groups, num_groups,
+ total_groups));
+ }
- /* Display complete mapping of users and groups to rids */
+ /* Display complete mapping of users and groups to rids */
}
diff --git a/source/nsswitch/winbindd_misc.c b/source/nsswitch/winbindd_misc.c
index 2718a753856..5678bdaa5af 100644
--- a/source/nsswitch/winbindd_misc.c
+++ b/source/nsswitch/winbindd_misc.c
@@ -1,10 +1,10 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon - miscellaneous other functions
- Copyright (C) Tim Potter 2000
+ Copyright (C) Tim Potter 2000
+ Copyright (C) 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
@@ -31,18 +31,9 @@ extern pstring global_myname;
static BOOL _get_trust_account_password(char *domain, unsigned char *ret_pwd,
time_t *pass_last_set_time)
{
- struct machine_acct_pass *pass;
- size_t size;
-
- if (!(pass = secrets_fetch(trust_keystr(domain), &size)) ||
- size != sizeof(*pass))
+ if (!secrets_fetch_trust_account_password(domain, ret_pwd, pass_last_set_time)) {
return False;
-
- if (pass_last_set_time)
- *pass_last_set_time = pass->mod_time;
-
- memcpy(ret_pwd, pass->hash, 16);
- SAFE_FREE(pass);
+ }
return True;
}
@@ -69,6 +60,7 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat
/* This call does a cli_nt_setup_creds() which implicitly checks
the trust account password. */
+ /* Don't shut this down - it belongs to the connection cache code */
result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli);
if (!NT_STATUS_IS_OK(result)) {
@@ -76,12 +68,10 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat
goto done;
}
- cli_shutdown(cli);
-
/* There is a race condition between fetching the trust account
- password and joining the domain so it's possible that the trust
- account password has been changed on us. We are returned
- NT_STATUS_ACCESS_DENIED if this happens. */
+ password and the periodic machine password change. So it's
+ possible that the trust account password has been changed on us.
+ We are returned NT_STATUS_ACCESS_DENIED if this happens. */
#define MAX_RETRIES 8
@@ -112,10 +102,13 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state
DEBUG(3, ("[%5d]: list trusted domains\n", state->pid));
- if (domain_list == NULL)
- get_domain_info();
+ /* We need to refresh the trusted domain list as the domains may
+ have changed since we last looked. There may be a sequence
+ number or something we should use but I haven't found it yet. */
+
+ init_domain_list();
- for(domain = domain_list; domain; domain = domain->next) {
+ for(domain = domain_list(); domain; domain = domain->next) {
/* Skip own domain */
@@ -150,3 +143,82 @@ enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state
return WINBINDD_OK;
}
+
+
+enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state)
+{
+ struct winbindd_domain *domain;
+ char *extra_data = NULL;
+
+ DEBUG(3, ("[%5d]: show sequence\n", state->pid));
+
+ extra_data = strdup("");
+
+ /* this makes for a very simple data format, and is easily parsable as well
+ if that is ever needed */
+ for (domain = domain_list(); domain; domain = domain->next) {
+ char *s;
+
+ domain->methods->sequence_number(domain, &domain->sequence_number);
+
+ if (DOM_SEQUENCE_NONE == (unsigned)domain->sequence_number) {
+ asprintf(&s,"%s%s : DISCONNECTED\n", extra_data,
+ domain->name);
+ } else {
+ asprintf(&s,"%s%s : %u\n", extra_data,
+ domain->name, (unsigned)domain->sequence_number);
+ }
+ free(extra_data);
+ extra_data = s;
+ }
+
+ state->response.extra_data = extra_data;
+ state->response.length += strlen(extra_data);
+
+ return WINBINDD_OK;
+}
+
+enum winbindd_result winbindd_ping(struct winbindd_cli_state
+ *state)
+{
+ DEBUG(3, ("[%5d]: ping\n", state->pid));
+
+ return WINBINDD_OK;
+}
+
+/* List various tidbits of information */
+
+enum winbindd_result winbindd_info(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request misc info\n", state->pid));
+
+ state->response.data.info.winbind_separator = *lp_winbind_separator();
+ fstrcpy(state->response.data.info.samba_version, VERSION);
+
+ return WINBINDD_OK;
+}
+
+/* Tell the client the current interface version */
+
+enum winbindd_result winbindd_interface_version(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request interface version\n", state->pid));
+
+ state->response.data.interface_version = WINBIND_INTERFACE_VERSION;
+
+ return WINBINDD_OK;
+}
+
+/* What domain are we a member of? */
+
+enum winbindd_result winbindd_domain_name(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request domain name\n", state->pid));
+
+ fstrcpy(state->response.data.domain_name, lp_workgroup());
+
+ return WINBINDD_OK;
+}
diff --git a/source/nsswitch/winbindd_nss.h b/source/nsswitch/winbindd_nss.h
index 255a14e3d62..023d72306b7 100644
--- a/source/nsswitch/winbindd_nss.h
+++ b/source/nsswitch/winbindd_nss.h
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon for ntdom nss module
@@ -23,7 +22,7 @@
*/
#ifndef SAFE_FREE
-#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0)
+#define SAFE_FREE(x) do { if(x) {free(x); x=NULL;} } while(0)
#endif
#ifndef _WINBINDD_NTDOM_H
@@ -35,16 +34,22 @@
#define WINBINDD_DOMAIN_ENV "WINBINDD_DOMAIN" /* Environment variables */
#define WINBINDD_DONT_ENV "_NO_WINBINDD"
+/* Update this when you change the interface. */
+
+#define WINBIND_INTERFACE_VERSION 4
+
/* Socket commands */
enum winbindd_cmd {
+ WINBINDD_INTERFACE_VERSION, /* Always a well known value */
+
/* Get users and groups */
- WINBINDD_GETPWNAM_FROM_USER,
- WINBINDD_GETPWNAM_FROM_UID,
- WINBINDD_GETGRNAM_FROM_GROUP,
- WINBINDD_GETGRNAM_FROM_GID,
+ WINBINDD_GETPWNAM,
+ WINBINDD_GETPWUID,
+ WINBINDD_GETGRNAM,
+ WINBINDD_GETGRGID,
WINBINDD_GETGROUPS,
/* Enumerate users and groups */
@@ -83,6 +88,11 @@ enum winbindd_cmd {
/* Miscellaneous other stuff */
WINBINDD_CHECK_MACHACC, /* Check machine account pw works */
+ WINBINDD_PING, /* Just tell me winbind is running */
+ WINBINDD_INFO, /* Various bit of info. Currently just tidbits */
+ WINBINDD_DOMAIN_NAME, /* The domain this winbind server is a member of (lp_workgroup()) */
+
+ WINBINDD_SHOW_SEQUENCE, /* display sequence numbers of domains */
/* WINS commands */
@@ -97,10 +107,12 @@ enum winbindd_cmd {
/* Winbind request structure */
struct winbindd_request {
+ uint32 length;
enum winbindd_cmd cmd; /* Winbindd command to execute */
pid_t pid; /* pid of calling process */
union {
+ fstring winsreq; /* WINS request */
fstring username; /* getpwnam */
fstring groupname; /* getgrnam */
uid_t uid; /* getpwuid, uid_to_sid */
@@ -112,6 +124,7 @@ struct winbindd_request {
struct {
unsigned char chal[8];
fstring user;
+ fstring domain;
fstring lm_resp;
uint16 lm_resp_len;
fstring nt_resp;
@@ -123,7 +136,10 @@ struct winbindd_request {
fstring newpass;
} chauthtok; /* pam_winbind passwd module */
fstring sid; /* lookupsid, sid_to_[ug]id */
- fstring name; /* lookupname */
+ struct {
+ fstring dom_name; /* lookupname */
+ fstring name;
+ } name;
uint32 num_entries; /* getpwent, getgrent */
} data;
fstring domain; /* {set,get,end}{pw,gr}ent() */
@@ -142,13 +158,16 @@ struct winbindd_response {
/* Header information */
- int length; /* Length of response */
+ uint32 length; /* Length of response */
enum winbindd_result result; /* Result code */
/* Fixed length return data */
union {
+ int interface_version; /* Try to ensure this is always in the same spot... */
+ fstring winsresp; /* WINS response */
+
/* getpwnam, getpwuid */
struct winbindd_pw {
@@ -177,11 +196,24 @@ struct winbindd_response {
int type;
} sid;
struct winbindd_name {
- fstring name; /* lookupsid */
+ fstring dom_name; /* lookupsid */
+ fstring name;
int type;
} name;
uid_t uid; /* sid_to_uid */
gid_t gid; /* sid_to_gid */
+ struct winbindd_info {
+ char winbind_separator;
+ fstring samba_version;
+ } info;
+ fstring domain_name;
+
+ struct auth_reply {
+ uint32 nt_status;
+ fstring nt_status_string;
+ fstring error_string;
+ int pam_error;
+ } auth;
} data;
/* Variable length return data */
diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c
index 2b6a79694d2..5adbf98789f 100644
--- a/source/nsswitch/winbindd_pam.c
+++ b/source/nsswitch/winbindd_pam.c
@@ -1,10 +1,11 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
- Winbind daemon - pam auuth funcions
+ Winbind daemon - pam auth funcions
Copyright (C) Andrew Tridgell 2000
+ Copyright (C) Tim Potter 2001
+ Copyright (C) Andrew Bartlett 2001-2002
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,127 +24,207 @@
#include "winbindd.h"
-/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
- form DOMAIN\user into a domain and a user */
-
-static BOOL wb_parse_domain_user(char *domuser, fstring domain, fstring user)
-{
- char *p;
- char *sep = lp_winbind_separator();
-
- p = strchr(domuser,*sep);
-
- if (!p)
- return False;
-
- fstrcpy(user, p+1);
- fstrcpy(domain, domuser);
- domain[PTR_DIFF(p, domuser)] = 0;
- strupper(domain);
- return True;
-}
-
-/* Return a password structure from a username. Specify whether cached data
- can be returned. */
+/* Return a password structure from a username. */
enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state)
{
- BOOL result, user_exists;
+ NTSTATUS result;
fstring name_domain, name_user;
int passlen;
+ unsigned char trust_passwd[16];
+ time_t last_change_time;
+ uint32 smb_uid_low;
+ NET_USER_INFO_3 info3;
+ struct cli_state *cli = NULL;
+ uchar chal[8];
+ TALLOC_CTX *mem_ctx = NULL;
+ DATA_BLOB lm_resp;
+ DATA_BLOB nt_resp;
+
+ extern pstring global_myname;
DEBUG(3, ("[%5d]: pam auth %s\n", state->pid,
state->request.data.auth.user));
- /* Parse domain and username */
+ if (!(mem_ctx = talloc_init_named("winbind pam auth for %s", state->request.data.auth.user))) {
+ DEBUG(0, ("winbindd_pam_auth: could not talloc_init()!\n"));
+ result = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
- if (!wb_parse_domain_user(state->request.data.auth.user, name_domain,
- name_user))
- return WINBINDD_ERROR;
+ /* Parse domain and username */
+
+ if (!parse_domain_user(state->request.data.auth.user, name_domain,
+ name_user)) {
+ DEBUG(5,("no domain separator (%s) in username (%s) - failing auth\n", lp_winbind_separator(), state->request.data.auth.user));
+ result = NT_STATUS_INVALID_PARAMETER;
+ goto done;
+ }
passlen = strlen(state->request.data.auth.pass);
+
+ {
+ unsigned char local_lm_response[24];
+ unsigned char local_nt_response[24];
+
+ generate_random_buffer(chal, 8, False);
+ SMBencrypt( (const uchar *)state->request.data.auth.pass, chal, local_lm_response);
+
+ SMBNTencrypt((const uchar *)state->request.data.auth.pass, chal, local_nt_response);
+
+ lm_resp = data_blob_talloc(mem_ctx, local_lm_response, sizeof(local_lm_response));
+ nt_resp = data_blob_talloc(mem_ctx, local_nt_response, sizeof(local_nt_response));
+ }
+
+ /*
+ * Get the machine account password for our primary domain
+ */
- /* So domain_client_validate() actually opens a new connection
- for each authentication performed. This can theoretically
- be optimised to use an already open IPC$ connection. */
+ if (!secrets_fetch_trust_account_password(
+ lp_workgroup(), trust_passwd, &last_change_time)) {
+ DEBUG(0, ("winbindd_pam_auth: could not fetch trust account "
+ "password for domain %s\n", lp_workgroup()));
+ result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+ goto done;
+ }
- result = domain_client_validate(name_user, name_domain,
- state->request.data.auth.pass,
- passlen,
- state->request.data.auth.pass,
- passlen, &user_exists, NULL);
+ /* We really don't care what LUID we give the user. */
- return result ? WINBINDD_OK : WINBINDD_ERROR;
-}
+ generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False);
+
+ ZERO_STRUCT(info3);
+
+ /* Don't shut this down - it belongs to the connection cache code */
+ result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli);
+ if (!NT_STATUS_IS_OK(result)) {
+ DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
+ goto done;
+ }
+
+ result = cli_netlogon_sam_network_logon(cli, mem_ctx,
+ name_user, name_domain,
+ global_myname, chal,
+ lm_resp, nt_resp,
+ &info3);
+
+done:
+
+ state->response.data.auth.nt_status = NT_STATUS_V(result);
+ fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
+ fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
+ state->response.data.auth.pam_error = nt_status_to_pam(result);
+
+ DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authenticaion for user %s returned %s (PAM: %d)\n",
+ state->request.data.auth.user,
+ state->response.data.auth.nt_status_string,
+ state->response.data.auth.pam_error));
+
+ if (mem_ctx)
+ talloc_destroy(mem_ctx);
+
+ return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
+}
+
/* Challenge Response Authentication Protocol */
-#if ALLOW_WINBIND_AUTH_CRAP
enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
{
NTSTATUS result;
- fstring name_domain, name_user;
unsigned char trust_passwd[16];
time_t last_change_time;
- uint32 smb_uid_low;
NET_USER_INFO_3 info3;
- NET_ID_INFO_CTR ctr;
- struct cli_state *cli;
+ struct cli_state *cli = NULL;
+ TALLOC_CTX *mem_ctx = NULL;
+ const char *domain = NULL;
- DEBUG(3, ("[%5d]: pam auth crap %s\n", state->pid,
- state->request.data.auth_crap.user));
+ DATA_BLOB lm_resp, nt_resp;
- /* Parse domain and username */
+ extern pstring global_myname;
- if (!wb_parse_domain_user(state->request.data.auth_crap.user, name_domain,
- name_user))
- return WINBINDD_ERROR;
+ DEBUG(3, ("[%5d]: pam auth crap domain: %s user: %s\n", state->pid,
+ state->request.data.auth_crap.domain, state->request.data.auth_crap.user));
+
+ if (!(mem_ctx = talloc_init_named("winbind pam auth crap for %s", state->request.data.auth.user))) {
+ DEBUG(0, ("winbindd_pam_auth_crap: could not talloc_init()!\n"));
+ result = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+
+ if (*state->request.data.auth_crap.domain) {
+ domain = talloc_strdup(mem_ctx, state->request.data.auth_crap.domain);
+ } else if (lp_winbind_use_default_domain()) {
+ domain = talloc_strdup(mem_ctx, lp_workgroup());
+ } else {
+ DEBUG(5,("no domain specified with username (%s) - failing auth\n", state->request.data.auth.user));
+ result = NT_STATUS_INVALID_PARAMETER;
+ goto done;
+ }
+
+ if (!domain) {
+ DEBUG(0,("winbindd_pam_auth_crap: talloc_strdup failed!\n"));
+ result = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+ lm_resp = data_blob_talloc(mem_ctx, state->request.data.auth_crap.lm_resp, state->request.data.auth_crap.lm_resp_len);
+ nt_resp = data_blob_talloc(mem_ctx, state->request.data.auth_crap.nt_resp, state->request.data.auth_crap.nt_resp_len);
+
/*
* Get the machine account password for our primary domain
*/
if (!secrets_fetch_trust_account_password(
lp_workgroup(), trust_passwd, &last_change_time)) {
- DEBUG(0, ("winbindd_pam_auth_crap: could not fetch trust account "
+ DEBUG(0, ("winbindd_pam_auth: could not fetch trust account "
"password for domain %s\n", lp_workgroup()));
- return WINBINDD_ERROR;
+ result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+ goto done;
}
- /* We really don't care what LUID we give the user. */
-
- generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False);
-
ZERO_STRUCT(info3);
+ /* Don't shut this down - it belongs to the connection cache code */
result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli);
if (!NT_STATUS_IS_OK(result)) {
- DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
+ DEBUG(3, ("could not open handle to NETLOGON pipe (%s)\n", nt_errstr(result)));
goto done;
}
- result = cli_nt_login_network(cli, name_domain, name_user, smb_uid_low,
- state->request.data.auth_crap.chal,
- state->request.data.auth_crap.lm_resp,
- state->request.data.auth_crap.nt_resp,
- &ctr, &info3);
-
- cli_shutdown(cli);
-
- done:
+ result = cli_netlogon_sam_network_logon(cli, mem_ctx,
+ state->request.data.auth_crap.user, domain,
+ global_myname, state->request.data.auth_crap.chal,
+ lm_resp, nt_resp,
+ &info3);
+
+done:
+
+ state->response.data.auth.nt_status = NT_STATUS_V(result);
+ fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
+ fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
+ state->response.data.auth.pam_error = nt_status_to_pam(result);
+
+ DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n",
+ state->request.data.auth_crap.domain,
+ state->request.data.auth_crap.user,
+ state->response.data.auth.nt_status_string,
+ state->response.data.auth.pam_error));
+
+ if (mem_ctx)
+ talloc_destroy(mem_ctx);
+
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
-#endif
/* Change a user password */
enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state)
{
+ NTSTATUS result;
char *oldpass, *newpass;
fstring domain, user;
- uchar nt_oldhash[16];
- uchar lm_oldhash[16];
+ CLI_POLICY_HND *hnd;
DEBUG(3, ("[%5d]: pam chauthtok %s\n", state->pid,
state->request.data.chauthtok.user));
@@ -153,26 +234,38 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state)
if (state == NULL)
return WINBINDD_ERROR;
- if (!wb_parse_domain_user(state->request.data.chauthtok.user, domain, user))
- return WINBINDD_ERROR;
+ if (!parse_domain_user(state->request.data.chauthtok.user, domain,
+ user)) {
+ result = NT_STATUS_INVALID_PARAMETER;
+ goto done;
+ }
+
+ /* Change password */
oldpass = state->request.data.chauthtok.oldpass;
newpass = state->request.data.chauthtok.newpass;
- nt_lm_owf_gen(oldpass, nt_oldhash, lm_oldhash);
+ /* Get sam handle */
- /* Change password */
+ if (!(hnd = cm_get_sam_handle(domain))) {
+ DEBUG(1, ("could not get SAM handle on DC for %s\n", domain));
+ result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
+ goto done;
+ }
-#if 0
+ if (!cli_oem_change_password(hnd->cli, user, newpass, oldpass)) {
+ DEBUG(1, ("password change failed for user %s/%s\n", domain,
+ user));
+ result = NT_STATUS_WRONG_PASSWORD;
+ } else {
+ result = NT_STATUS_OK;
+ }
- /* XXX */
+done:
+ state->response.data.auth.nt_status = NT_STATUS_V(result);
+ fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
+ fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
+ state->response.data.auth.pam_error = nt_status_to_pam(result);
- if (!msrpc_sam_ntchange_pwd(server_state.controller, domain, user,
- lm_oldhash, nt_oldhash, newpass)) {
- DEBUG(0, ("password change failed for user %s/%s\n", domain, user));
- return WINBINDD_ERROR;
- }
-#endif
-
- return WINBINDD_OK;
+ return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
diff --git a/source/nsswitch/winbindd_proto.h b/source/nsswitch/winbindd_proto.h
index 37448bd1987..9ad8a7717cb 100644
--- a/source/nsswitch/winbindd_proto.h
+++ b/source/nsswitch/winbindd_proto.h
@@ -3,59 +3,17 @@
/* This file is automatically generated with "make proto". DO NOT EDIT */
-/*The following definitions come from nsswitch/winbindd.c */
+/* The following definitions come from nsswitch/winbindd.c */
int main(int argc, char **argv);
-/*The following definitions come from nsswitch/winbindd_cache.c */
-
-void winbindd_cache_init(void);
-void winbindd_store_user_cache(struct winbindd_domain *domain,
- struct getpwent_user *sam_entries,
- int num_sam_entries);
-void winbindd_store_group_cache(struct winbindd_domain *domain,
- struct acct_info *sam_entries,
- int num_sam_entries);
-void winbindd_store_name_cache_entry(struct winbindd_domain *domain,
- char *sid, struct winbindd_name *name);
-void winbindd_store_sid_cache_entry(struct winbindd_domain *domain,
- char *name, struct winbindd_sid *sid);
-void winbindd_store_user_cache_entry(struct winbindd_domain *domain,
- char *user_name, struct winbindd_pw *pw);
-void winbindd_store_uid_cache_entry(struct winbindd_domain *domain, uid_t uid,
- struct winbindd_pw *pw);
-void winbindd_store_group_cache_entry(struct winbindd_domain *domain,
- char *group_name, struct winbindd_gr *gr,
- void *extra_data, int extra_data_len);
-void winbindd_store_gid_cache_entry(struct winbindd_domain *domain, gid_t gid,
- struct winbindd_gr *gr, void *extra_data,
- int extra_data_len);
-BOOL winbindd_fetch_user_cache(struct winbindd_domain *domain,
- struct getpwent_user **sam_entries,
- int *num_entries);
-BOOL winbindd_fetch_group_cache(struct winbindd_domain *domain,
- struct acct_info **sam_entries,
- int *num_entries);
-BOOL winbindd_fetch_sid_cache_entry(struct winbindd_domain *domain,
- char *name, struct winbindd_sid *sid);
-BOOL winbindd_fetch_name_cache_entry(struct winbindd_domain *domain,
- char *sid, struct winbindd_name *name);
-BOOL winbindd_fetch_user_cache_entry(struct winbindd_domain *domain,
- char *user, struct winbindd_pw *pw);
-BOOL winbindd_fetch_uid_cache_entry(struct winbindd_domain *domain, uid_t uid,
- struct winbindd_pw *pw);
-BOOL winbindd_fetch_group_cache_entry(struct winbindd_domain *domain,
- char *group, struct winbindd_gr *gr,
- void **extra_data, int *extra_data_len);
-BOOL winbindd_fetch_gid_cache_entry(struct winbindd_domain *domain, gid_t gid,
- struct winbindd_gr *gr,
- void **extra_data, int *extra_data_len);
-void winbindd_flush_cache(void);
-void winbindd_cache_status(void);
-
-/*The following definitions come from nsswitch/winbindd_cm.c */
-
-void cm_init_creds(struct ntuser_creds *creds);
+/* The following definitions come from nsswitch/winbindd_cache.c */
+
+void wcache_flush_cache(void);
+struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
+
+/* The following definitions come from nsswitch/winbindd_cm.c */
+
CLI_POLICY_HND *cm_get_lsa_handle(char *domain);
CLI_POLICY_HND *cm_get_sam_handle(char *domain);
CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain, DOM_SID *domain_sid);
@@ -67,25 +25,25 @@ NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd,
struct cli_state **cli);
void winbindd_cm_status(void);
-/*The following definitions come from nsswitch/winbindd_group.c */
+/* The following definitions come from nsswitch/winbindd_group.c */
-enum winbindd_result winbindd_getgrnam_from_group(struct winbindd_cli_state *state);
-enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state
- *state);
+enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state);
+enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state);
enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state);
enum winbindd_result winbindd_endgrent(struct winbindd_cli_state *state);
enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state);
enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state);
enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state);
-/*The following definitions come from nsswitch/winbindd_idmap.c */
+/* The following definitions come from nsswitch/winbindd_idmap.c */
-BOOL winbindd_idmap_get_uid_from_rid(char *domain_name, uint32 user_rid,
- uid_t *uid);
-BOOL winbindd_idmap_get_gid_from_rid(char *domain_name, uint32 group_rid,
- gid_t *gid);
-BOOL get_rid_from_id(int id, uint32 *rid, struct winbindd_domain **domain,
- BOOL isgroup);
+BOOL winbindd_idmap_get_uid_from_sid(DOM_SID *sid, uid_t *uid);
+BOOL winbindd_idmap_get_gid_from_sid(DOM_SID *sid, gid_t *gid);
+BOOL winbindd_idmap_get_uid_from_rid(const char *dom_name, uint32 rid, uid_t *uid);
+BOOL winbindd_idmap_get_gid_from_rid(const char *dom_name, uint32 rid, gid_t *gid);
+BOOL get_sid_from_id(int id, DOM_SID *sid, BOOL isgroup);
+BOOL winbindd_idmap_get_sid_from_uid(uid_t uid, DOM_SID *sid);
+BOOL winbindd_idmap_get_sid_from_gid(gid_t gid, DOM_SID *sid);
BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid,
struct winbindd_domain **domain);
BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid,
@@ -94,19 +52,28 @@ BOOL winbindd_idmap_init(void);
BOOL winbindd_idmap_close(void);
void winbindd_idmap_status(void);
-/*The following definitions come from nsswitch/winbindd_misc.c */
+/* The following definitions come from nsswitch/winbindd_misc.c */
enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state);
enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state
*state);
+enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state);
+enum winbindd_result winbindd_ping(struct winbindd_cli_state
+ *state);
+enum winbindd_result winbindd_info(struct winbindd_cli_state *state);
+enum winbindd_result winbindd_interface_version(struct winbindd_cli_state *state);
+enum winbindd_result winbindd_domain_name(struct winbindd_cli_state *state);
-/*The following definitions come from nsswitch/winbindd_pam.c */
+/* The following definitions come from nsswitch/winbindd_pam.c */
enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) ;
enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ;
enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state);
-/*The following definitions come from nsswitch/winbindd_sid.c */
+/* The following definitions come from nsswitch/winbindd_rpc.c */
+
+
+/* The following definitions come from nsswitch/winbindd_sid.c */
enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state);
enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state);
@@ -115,51 +82,36 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state);
enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state);
enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state);
-/*The following definitions come from nsswitch/winbindd_user.c */
+/* The following definitions come from nsswitch/winbindd_user.c */
-enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *state) ;
-enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state);
+enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state) ;
+enum winbindd_result winbindd_getpwuid(struct winbindd_cli_state *state);
enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state);
enum winbindd_result winbindd_endpwent(struct winbindd_cli_state *state);
enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state);
enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state);
-/*The following definitions come from nsswitch/winbindd_util.c */
+/* The following definitions come from nsswitch/winbindd_util.c */
-struct winbindd_domain *find_domain_from_name(char *domain_name);
+struct winbindd_domain *domain_list(void);
+void free_domain_list(void);
+BOOL init_domain_list(void);
+struct winbindd_domain *find_domain_from_name(const char *domain_name);
struct winbindd_domain *find_domain_from_sid(DOM_SID *sid);
-BOOL get_domain_info(void);
-void free_domain_info(void);
-BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain);
-BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *type);
+BOOL winbindd_lookup_sid_by_name(struct winbindd_domain *domain,
+ const char *name, DOM_SID *sid,
+ enum SID_NAME_USE *type);
BOOL winbindd_lookup_name_by_sid(DOM_SID *sid,
+ fstring dom_name,
fstring name,
enum SID_NAME_USE *type);
-BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx, uint32 user_rid,
- SAM_USERINFO_CTR **user_info);
-BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx,
- uint32 user_rid, uint32 *num_groups,
- DOM_GID **user_groups);
-BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx,
- uint32 group_rid, uint32 *num_names,
- uint32 **rid_mem, char ***names,
- uint32 **name_types);
-BOOL create_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol);
-void close_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol);
void free_getent_state(struct getent_state *state);
-struct getent_state *create_getent_state(struct winbindd_domain *domain);
BOOL winbindd_param_init(void);
-NTSTATUS winbindd_query_dispinfo(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx, POLICY_HND *pdom_pol,
- uint32 *start_ndx, uint16 info_level,
- uint32 *num_entries, SAM_DISPINFO_CTR *ctr);
BOOL check_domain_env(char *domain_env, char *domain);
-BOOL parse_domain_user(char *domuser, fstring domain, fstring user);
+BOOL parse_domain_user(const char *domuser, fstring domain, fstring user);
+void fill_domain_username(fstring name, const char *domain, const char *user);
-/*The following definitions come from nsswitch/winbindd_wins.c */
+/* The following definitions come from nsswitch/winbindd_wins.c */
enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state);
enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state);
diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c
index 689ad34c4e0..a41bf759160 100644
--- a/source/nsswitch/winbindd_sid.c
+++ b/source/nsswitch/winbindd_sid.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon - sid related functions
@@ -33,13 +32,17 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state)
DOM_SID sid, tmp_sid;
uint32 rid;
fstring name;
+ fstring dom_name;
DEBUG(3, ("[%5d]: lookupsid %s\n", state->pid,
state->request.data.sid));
/* Lookup sid from PDC using lsa_lookup_sids() */
- string_to_sid(&sid, state->request.data.sid);
+ if (!string_to_sid(&sid, state->request.data.sid)) {
+ DEBUG(5, ("%s not a SID\n", state->request.data.sid));
+ return WINBINDD_ERROR;
+ }
/* Don't look up BUILTIN sids */
@@ -52,12 +55,13 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state)
/* Lookup the sid */
- if (!winbindd_lookup_name_by_sid(&sid, name, &type)) {
+ if (!winbindd_lookup_name_by_sid(&sid, dom_name, name, &type)) {
return WINBINDD_ERROR;
}
- string_sub(name, "\\", lp_winbind_separator(), sizeof(fstring));
+ fstrcpy(state->response.data.name.dom_name, dom_name);
fstrcpy(state->response.data.name.name, name);
+
state->response.data.name.type = type;
return WINBINDD_OK;
@@ -68,20 +72,27 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state)
enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state)
{
enum SID_NAME_USE type;
- fstring sid_str, name_domain, name_user, name;
+ fstring sid_str;
+ char *name_domain, *name_user;
DOM_SID sid;
-
- DEBUG(3, ("[%5d]: lookupname %s\n", state->pid,
- state->request.data.name));
+ struct winbindd_domain *domain;
- if (!parse_domain_user(state->request.data.name, name_domain, name_user))
- return WINBINDD_ERROR;
+ DEBUG(3, ("[%5d]: lookupname %s%s%s\n", state->pid,
+ state->request.data.name.dom_name,
+ lp_winbind_separator(),
+ state->request.data.name.name));
- snprintf(name, sizeof(name), "%s\\%s", name_domain, name_user);
+ name_domain = state->request.data.name.dom_name;
+ name_user = state->request.data.name.name;
- /* Lookup name from PDC using lsa_lookup_names() */
+ if ((domain = find_domain_from_name(name_domain)) == NULL) {
+ DEBUG(0, ("could not find domain entry for domain %s\n",
+ name_domain));
+ return WINBINDD_ERROR;
+ }
- if (!winbindd_lookup_sid_by_name(name, &sid, &type)) {
+ /* Lookup name from PDC using lsa_lookup_names() */
+ if (!winbindd_lookup_sid_by_name(domain, name_user, &sid, &type)) {
return WINBINDD_ERROR;
}
@@ -98,31 +109,19 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state)
enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state)
{
DOM_SID sid;
- uint32 user_rid;
- struct winbindd_domain *domain;
DEBUG(3, ("[%5d]: sid to uid %s\n", state->pid,
state->request.data.sid));
/* Split sid into domain sid and user rid */
-
- string_to_sid(&sid, state->request.data.sid);
- sid_split_rid(&sid, &user_rid);
-
- /* Find domain this sid belongs to */
-
- if ((domain = find_domain_from_sid(&sid)) == NULL) {
- fstring sid_str;
-
- sid_to_string(sid_str, &sid);
- DEBUG(1, ("Could not find domain for sid %s\n", sid_str));
+ if (!string_to_sid(&sid, state->request.data.sid)) {
+ DEBUG(1, ("Could not get convert sid %s from string\n",
+ state->request.data.sid));
return WINBINDD_ERROR;
}
/* Find uid for this sid and return it */
-
- if (!winbindd_idmap_get_uid_from_rid(domain->name, user_rid,
- &state->response.data.uid)) {
+ if (!winbindd_idmap_get_uid_from_sid(&sid, &state->response.data.uid)) {
DEBUG(1, ("Could not get uid for sid %s\n",
state->request.data.sid));
return WINBINDD_ERROR;
@@ -137,31 +136,18 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state)
enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state)
{
DOM_SID sid;
- uint32 group_rid;
- struct winbindd_domain *domain;
DEBUG(3, ("[%5d]: sid to gid %s\n", state->pid,
state->request.data.sid));
- /* Split sid into domain sid and user rid */
-
- string_to_sid(&sid, state->request.data.sid);
- sid_split_rid(&sid, &group_rid);
-
- /* Find domain this sid belongs to */
-
- if ((domain = find_domain_from_sid(&sid)) == NULL) {
- fstring sid_str;
-
- sid_to_string(sid_str, &sid);
- DEBUG(1, ("Could not find domain for sid %s\n", sid_str));
+ if (!string_to_sid(&sid, state->request.data.sid)) {
+ DEBUG(1, ("Could not cvt string to sid %s\n",
+ state->request.data.sid));
return WINBINDD_ERROR;
}
- /* Find uid for this sid and return it */
-
- if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid,
- &state->response.data.gid)) {
+ /* Find gid for this sid and return it */
+ if (!winbindd_idmap_get_gid_from_sid(&sid, &state->response.data.gid)) {
DEBUG(1, ("Could not get gid for sid %s\n",
state->request.data.sid));
return WINBINDD_ERROR;
@@ -174,8 +160,6 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state)
enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state)
{
- struct winbindd_domain *domain;
- uint32 user_rid;
DOM_SID sid;
/* Bug out if the uid isn't in the winbind range */
@@ -189,18 +173,12 @@ enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state)
state->request.data.uid));
/* Lookup rid for this uid */
-
- if (!winbindd_idmap_get_rid_from_uid(state->request.data.uid,
- &user_rid, &domain)) {
+ if (!winbindd_idmap_get_sid_from_uid(state->request.data.uid, &sid)) {
DEBUG(1, ("Could not convert uid %d to rid\n",
state->request.data.uid));
return WINBINDD_ERROR;
}
- /* Construct sid and return it */
-
- sid_copy(&sid, &domain->sid);
- sid_append_rid(&sid, user_rid);
sid_to_string(state->response.data.sid.sid, &sid);
state->response.data.sid.type = SID_NAME_USER;
@@ -211,8 +189,6 @@ enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state)
enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state)
{
- struct winbindd_domain *domain;
- uint32 group_rid;
DOM_SID sid;
/* Bug out if the gid isn't in the winbind range */
@@ -225,19 +201,14 @@ enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state)
DEBUG(3, ("[%5d]: gid to sid %d\n", state->pid,
state->request.data.gid));
- /* Lookup rid for this uid */
-
- if (!winbindd_idmap_get_rid_from_gid(state->request.data.gid,
- &group_rid, &domain)) {
- DEBUG(1, ("Could not convert gid %d to rid\n",
+ /* Lookup sid for this uid */
+ if (!winbindd_idmap_get_sid_from_gid(state->request.data.gid, &sid)) {
+ DEBUG(1, ("Could not convert gid %d to sid\n",
state->request.data.gid));
return WINBINDD_ERROR;
}
/* Construct sid and return it */
-
- sid_copy(&sid, &domain->sid);
- sid_append_rid(&sid, group_rid);
sid_to_string(state->response.data.sid.sid, &sid);
state->response.data.sid.type = SID_NAME_DOM_GRP;
diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c
index 3185e261cd4..d89717ad47c 100644
--- a/source/nsswitch/winbindd_user.c
+++ b/source/nsswitch/winbindd_user.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
Winbind daemon - user related functions
@@ -26,20 +25,20 @@
/* Fill a pwent structure with information we have obtained */
-static BOOL winbindd_fill_pwent(char *domain_name, char *name,
+static BOOL winbindd_fill_pwent(char *dom_name, char *user_name,
uint32 user_rid, uint32 group_rid,
char *full_name, struct winbindd_pw *pw)
{
extern userdom_struct current_user_info;
- fstring name_domain, name_user;
+ fstring output_username;
pstring homedir;
- if (!pw || !name)
+ if (!pw || !dom_name || !user_name)
return False;
/* Resolve the uid number */
- if (!winbindd_idmap_get_uid_from_rid(domain_name, user_rid,
+ if (!winbindd_idmap_get_uid_from_rid(dom_name, user_rid,
&pw->pw_uid)) {
DEBUG(1, ("error getting user id for rid %d\n", user_rid));
return False;
@@ -47,15 +46,17 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name,
/* Resolve the gid number */
- if (!winbindd_idmap_get_gid_from_rid(domain_name, group_rid,
+ if (!winbindd_idmap_get_gid_from_rid(dom_name, group_rid,
&pw->pw_gid)) {
DEBUG(1, ("error getting group id for rid %d\n", group_rid));
return False;
}
/* Username */
-
- safe_strcpy(pw->pw_name, name, sizeof(pw->pw_name) - 1);
+
+ fill_domain_username(output_username, dom_name, user_name);
+
+ safe_strcpy(pw->pw_name, output_username, sizeof(pw->pw_name) - 1);
/* Full name (gecos) */
@@ -65,16 +66,11 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name,
defaults are /tmp for the home directory and /bin/false for
shell. */
- if (!parse_domain_user(name, name_domain, name_user)) {
- DEBUG(1, ("error parsing domain user for %s\n", name_user ));
- return False;
- }
-
/* The substitution of %U and %D in the 'template homedir' is done
by lp_string() calling standard_sub_basic(). */
- fstrcpy(current_user_info.smb_name, name_user);
- fstrcpy(current_user_info.domain, name_domain);
+ fstrcpy(current_user_info.smb_name, user_name);
+ fstrcpy(current_user_info.domain, dom_name);
pstrcpy(homedir, lp_template_homedir());
@@ -84,28 +80,22 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name,
sizeof(pw->pw_shell) - 1);
/* Password - set to "x" as we can't generate anything useful here.
- Authentication can be done using the pam_ntdom module. */
+ Authentication can be done using the pam_winbind module. */
safe_strcpy(pw->pw_passwd, "x", sizeof(pw->pw_passwd) - 1);
return True;
}
-/************************************************************************
- Empty static struct for negative caching.
-*************************************************************************/
+/* Return a password structure from a username. */
-static struct winbindd_pw negative_pw_cache_entry;
-
-/* Return a password structure from a username. Specify whether cached data
- can be returned. */
-
-enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *state)
+enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state)
{
- uint32 user_rid, group_rid;
- SAM_USERINFO_CTR *user_info;
+ uint32 user_rid;
+ WINBIND_USERINFO user_info;
DOM_SID user_sid;
- fstring name_domain, name_user, name, gecos_name;
+ NTSTATUS status;
+ fstring name_domain, name_user;
enum SID_NAME_USE name_type;
struct winbindd_domain *domain;
TALLOC_CTX *mem_ctx;
@@ -116,38 +106,24 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *stat
/* Parse domain and username */
if (!parse_domain_user(state->request.data.username, name_domain,
- name_user))
+ name_user))
return WINBINDD_ERROR;
if ((domain = find_domain_from_name(name_domain)) == NULL) {
- DEBUG(5, ("No such domain: %s\n", name_domain));
+ DEBUG(5, ("no such domain: %s\n", name_domain));
return WINBINDD_ERROR;
}
-
- /* Check for cached user entry */
-
- if (winbindd_fetch_user_cache_entry(domain, name_user, &state->response.data.pw)) {
- /* Check if this is a negative cache entry. */
- if (memcmp(&negative_pw_cache_entry, &state->response.data.pw,
- sizeof(state->response.data.pw)) == 0)
- return WINBINDD_ERROR;
- return WINBINDD_OK;
- }
-
- slprintf(name, sizeof(name) - 1, "%s\\%s", name_domain, name_user);
/* Get rid and name type from name */
- if (!winbindd_lookup_sid_by_name(name, &user_sid, &name_type)) {
+ if (!winbindd_lookup_sid_by_name(domain, name_user, &user_sid, &name_type)) {
DEBUG(1, ("user '%s' does not exist\n", name_user));
- winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry);
return WINBINDD_ERROR;
}
if (name_type != SID_NAME_USER) {
DEBUG(1, ("name '%s' is not a user name: %d\n", name_user,
name_type));
- winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry);
return WINBINDD_ERROR;
}
@@ -155,56 +131,52 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *stat
from the winbind_lookup_by_name() call and use it in a
winbind_lookup_userinfo() */
- if (!(mem_ctx = talloc_init())) {
+ if (!(mem_ctx = talloc_init_named("winbindd_getpwnam([%s]\\[%s])",
+ name_domain, name_user))) {
DEBUG(1, ("out of memory\n"));
return WINBINDD_ERROR;
}
sid_split_rid(&user_sid, &user_rid);
-
- if (!winbindd_lookup_userinfo(domain, mem_ctx, user_rid, &user_info)) {
- DEBUG(1, ("pwnam_from_user(): error getting user info for "
- "user '%s'\n", name_user));
- winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry);
+
+ status = domain->methods->query_user(domain, mem_ctx, user_rid,
+ &user_info);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("error getting user info for user '[%s]\\[%s]'\n",
+ name_domain, name_user));
talloc_destroy(mem_ctx);
return WINBINDD_ERROR;
}
- group_rid = user_info->info.id21->group_rid;
-
- unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name,
- sizeof(gecos_name) - 1);
-
- talloc_destroy(mem_ctx);
- user_info = NULL;
-
- /* Now take all this information and fill in a passwd structure */
-
- if (!winbindd_fill_pwent(name_domain, state->request.data.username,
- user_rid, group_rid, gecos_name,
+ /* Now take all this information and fill in a passwd structure */
+ if (!winbindd_fill_pwent(name_domain, name_user,
+ user_rid, user_info.group_rid,
+ user_info.full_name,
&state->response.data.pw)) {
- winbindd_store_user_cache_entry(domain, name_user, &negative_pw_cache_entry);
- /* talloc_destroy(mem_ctx); Surely this is wrong */
+ talloc_destroy(mem_ctx);
return WINBINDD_ERROR;
}
-
- winbindd_store_user_cache_entry(domain, name_user, &state->response.data.pw);
+
+ talloc_destroy(mem_ctx);
return WINBINDD_OK;
}
/* Return a password structure given a uid number */
-enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state)
+enum winbindd_result winbindd_getpwuid(struct winbindd_cli_state *state)
{
DOM_SID user_sid;
struct winbindd_domain *domain;
- uint32 user_rid, group_rid;
- fstring user_name, gecos_name;
+ uint32 user_rid;
+ fstring dom_name;
+ fstring user_name;
enum SID_NAME_USE name_type;
- SAM_USERINFO_CTR *user_info;
+ WINBIND_USERINFO user_info;
gid_t gid;
TALLOC_CTX *mem_ctx;
+ NTSTATUS status;
/* Bug out if the uid isn't in the winbind range */
@@ -219,81 +191,61 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state
if (!winbindd_idmap_get_rid_from_uid(state->request.data.uid,
&user_rid, &domain)) {
- DEBUG(1, ("Could not convert uid %d to rid\n",
+ DEBUG(1, ("could not convert uid %d to rid\n",
state->request.data.uid));
return WINBINDD_ERROR;
}
- /* Check for cached uid entry */
-
- if (winbindd_fetch_uid_cache_entry(domain,
- state->request.data.uid,
- &state->response.data.pw)) {
- /* Check if this is a negative cache entry. */
- if (memcmp(&negative_pw_cache_entry, &state->response.data.pw,
- sizeof(state->response.data.pw)) == 0)
- return WINBINDD_ERROR;
- return WINBINDD_OK;
- }
-
/* Get name and name type from rid */
sid_copy(&user_sid, &domain->sid);
sid_append_rid(&user_sid, user_rid);
- if (!winbindd_lookup_name_by_sid(&user_sid, user_name, &name_type)) {
+ if (!winbindd_lookup_name_by_sid(&user_sid, dom_name, user_name, &name_type)) {
fstring temp;
sid_to_string(temp, &user_sid);
- DEBUG(1, ("Could not lookup sid %s\n", temp));
-
- winbindd_store_uid_cache_entry(domain, state->request.data.uid, &negative_pw_cache_entry);
+ DEBUG(1, ("could not lookup sid %s\n", temp));
return WINBINDD_ERROR;
}
- if (strcmp("\\", lp_winbind_separator()))
- string_sub(user_name, "\\", lp_winbind_separator(),
- sizeof(fstring));
-
/* Get some user info */
- if (!(mem_ctx = talloc_init())) {
+ if (!(mem_ctx = talloc_init_named("winbind_getpwuid(%d)",
+ state->request.data.uid))) {
+
DEBUG(1, ("out of memory\n"));
return WINBINDD_ERROR;
}
- if (!winbindd_lookup_userinfo(domain, mem_ctx, user_rid, &user_info)) {
- DEBUG(1, ("pwnam_from_uid(): error getting user info for "
- "user '%s'\n", user_name));
- winbindd_store_uid_cache_entry(domain, state->request.data.uid, &negative_pw_cache_entry);
+ status = domain->methods->query_user(domain, mem_ctx, user_rid,
+ &user_info);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("error getting user info for user '%s'\n",
+ user_name));
talloc_destroy(mem_ctx);
return WINBINDD_ERROR;
}
- group_rid = user_info->info.id21->group_rid;
- unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name,
- sizeof(gecos_name) - 1);
-
- talloc_destroy(mem_ctx);
- user_info = NULL;
-
/* Resolve gid number */
- if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid, &gid)) {
+ if (!winbindd_idmap_get_gid_from_rid(domain->name, user_info.group_rid, &gid)) {
DEBUG(1, ("error getting group id for user %s\n", user_name));
+ talloc_destroy(mem_ctx);
return WINBINDD_ERROR;
}
/* Fill in password structure */
- if (!winbindd_fill_pwent(domain->name, user_name, user_rid, group_rid,
- gecos_name, &state->response.data.pw)) {
- winbindd_store_uid_cache_entry(domain, state->request.data.uid, &negative_pw_cache_entry);
+ if (!winbindd_fill_pwent(domain->name, user_name, user_rid, user_info.group_rid,
+ user_info.full_name, &state->response.data.pw)) {
+ talloc_destroy(mem_ctx);
return WINBINDD_ERROR;
}
- winbindd_store_uid_cache_entry(domain, state->request.data.uid, &state->response.data.pw);
-
+ talloc_destroy(mem_ctx);
+
return WINBINDD_OK;
}
@@ -305,7 +257,7 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state *state
enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state)
{
- struct winbindd_domain *tmp;
+ struct winbindd_domain *domain;
DEBUG(3, ("[%5d]: setpwent\n", state->pid));
@@ -323,10 +275,7 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state)
/* Create sam pipes for each domain we know about */
- if (domain_list == NULL)
- get_domain_info();
-
- for(tmp = domain_list; tmp != NULL; tmp = tmp->next) {
+ for(domain = domain_list(); domain != NULL; domain = domain->next) {
struct getent_state *domain_state;
/*
@@ -335,20 +284,20 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state)
*/
if ((strcmp(state->request.domain, "") != 0) &&
- !check_domain_env(state->request.domain, tmp->name)) {
- DEBUG(5, ("skipping domain %s because of env var\n",
- tmp->name));
+ !check_domain_env(state->request.domain,
+ domain->name))
continue;
- }
/* Create a state record for this domain */
- if ((domain_state = create_getent_state(tmp)) == NULL) {
- DEBUG(5, ("error connecting to dc for domain %s\n",
- tmp->name));
- continue;
- }
+ if ((domain_state = (struct getent_state *)
+ malloc(sizeof(struct getent_state))) == NULL)
+ return WINBINDD_ERROR;
+ ZERO_STRUCTP(domain_state);
+
+ fstrcpy(domain_state->domain_name, domain->name);
+
/* Add to list of open domains */
DLIST_ADD(state->getpwent_state, domain_state);
@@ -380,118 +329,83 @@ static BOOL get_sam_user_entries(struct getent_state *ent)
{
NTSTATUS status;
uint32 num_entries;
- SAM_DISPINFO_1 info1;
- SAM_DISPINFO_CTR ctr;
+ WINBIND_USERINFO *info;
struct getpwent_user *name_list = NULL;
- uint32 group_rid;
BOOL result = False;
TALLOC_CTX *mem_ctx;
+ struct winbindd_domain *domain;
+ struct winbindd_methods *methods;
+ int i;
- if (ent->got_all_sam_entries)
+ if (ent->num_sam_entries)
return False;
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("get_sam_user_entries(%s)",
+ ent->domain_name)))
return False;
- ZERO_STRUCT(info1);
- ZERO_STRUCT(ctr);
-
- ctr.sam.info1 = &info1;
-
-#if 0
- /* Look in cache for entries, else get them direct */
-
- if (winbindd_fetch_user_cache(ent->domain,
- (struct getpwent_user **)
- &ent->sam_entries,
- &ent->num_sam_entries)) {
- return True;
+ if (!(domain = find_domain_from_name(ent->domain_name))) {
+ DEBUG(3, ("no such domain %s in get_sam_user_entries\n",
+ ent->domain_name));
+ return False;
}
-#endif
- /* For the moment we set the primary group for every user to be the
- Domain Users group. There are serious problems with determining
- the actual primary group for large domains. This should really
- be made into a 'winbind force group' smb.conf parameter or
- something like that. */
-
- group_rid = DOMAIN_GROUP_RID_USERS;
+ methods = domain->methods;
/* Free any existing user info */
SAFE_FREE(ent->sam_entries);
ent->num_sam_entries = 0;
- /* Call query_dispinfo to get a list of usernames and user rids */
+ /* Call query_user_list to get a list of usernames and user rids */
- do {
- int i;
-
- num_entries = 0;
+ num_entries = 0;
- status = winbindd_query_dispinfo(ent->domain, mem_ctx, &ent->dom_pol,
- &ent->dispinfo_ndx, 1,
- &num_entries, &ctr);
+ status = methods->query_user_list(domain, mem_ctx, &num_entries,
+ &info);
- if (num_entries) {
- struct getpwent_user *tnl;
-
- tnl = (struct getpwent_user *)Realloc(name_list,
- sizeof(struct getpwent_user) *
- (ent->num_sam_entries +
- num_entries));
-
- if (!tnl) {
- DEBUG(0,("get_sam_user_entries: Realloc failed.\n"));
- SAFE_FREE(name_list);
- goto done;
- } else
- name_list = tnl;
- }
-
- for (i = 0; i < num_entries; i++) {
-
- /* Store account name and gecos */
-
- unistr2_to_ascii(
- name_list[ent->num_sam_entries + i].name,
- &info1.str[i].uni_acct_name,
- sizeof(fstring));
-
- unistr2_to_ascii(
- name_list[ent->num_sam_entries + i].gecos,
- &info1.str[i].uni_full_name,
- sizeof(fstring));
-
- /* User and group ids */
-
- name_list[ent->num_sam_entries + i].user_rid =
- info1.sam[i].rid_user;
+ if (num_entries) {
+ struct getpwent_user *tnl;
+
+ tnl = (struct getpwent_user *)Realloc(name_list,
+ sizeof(struct getpwent_user) *
+ (ent->num_sam_entries +
+ num_entries));
+
+ if (!tnl) {
+ DEBUG(0,("get_sam_user_entries realloc failed.\n"));
+ SAFE_FREE(name_list);
+ goto done;
+ } else
+ name_list = tnl;
+ }
- name_list[ent->num_sam_entries + i].
- group_rid = group_rid;
+ for (i = 0; i < num_entries; i++) {
+ /* Store account name and gecos */
+ if (!info[i].acct_name) {
+ fstrcpy(name_list[ent->num_sam_entries + i].name, "");
+ } else {
+ fstrcpy(name_list[ent->num_sam_entries + i].name,
+ info[i].acct_name);
+ }
+ if (!info[i].full_name) {
+ fstrcpy(name_list[ent->num_sam_entries + i].gecos, "");
+ } else {
+ fstrcpy(name_list[ent->num_sam_entries + i].gecos,
+ info[i].full_name);
}
- ent->num_sam_entries += num_entries;
-
- if (NT_STATUS_V(status) != NT_STATUS_V(STATUS_MORE_ENTRIES))
- break;
-
- } while (ent->num_sam_entries < MAX_FETCH_SAM_ENTRIES);
-
-#if 0
- /* Fill cache with received entries */
+ /* User and group ids */
+ name_list[ent->num_sam_entries+i].user_rid = info[i].user_rid;
+ name_list[ent->num_sam_entries+i].group_rid = info[i].group_rid;
+ }
+
+ ent->num_sam_entries += num_entries;
- winbindd_store_user_cache(ent->domain, ent->sam_entries,
- ent->num_sam_entries);
-#endif
-
/* Fill in remaining fields */
ent->sam_entries = name_list;
ent->sam_entry_index = 0;
- ent->got_all_sam_entries = (NT_STATUS_V(status) != NT_STATUS_V(STATUS_MORE_ENTRIES));
-
result = ent->num_sam_entries > 0;
done:
@@ -510,7 +424,6 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state)
struct getent_state *ent;
struct winbindd_pw *user_list;
int num_users, user_list_ndx = 0, i;
- char *sep;
DEBUG(3, ("[%5d]: getpwent\n", state->pid));
@@ -531,7 +444,6 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state)
sizeof(struct winbindd_pw));
user_list = (struct winbindd_pw *)state->response.extra_data;
- sep = lp_winbind_separator();
if (!(ent = state->getpwent_state))
return WINBINDD_ERROR;
@@ -580,13 +492,9 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state)
/* Lookup user info */
- slprintf(domain_user_name, sizeof(domain_user_name) - 1,
- "%s%s%s", ent->domain->name, sep,
- name_list[ent->sam_entry_index].name);
-
result = winbindd_fill_pwent(
- ent->domain->name,
- domain_user_name,
+ ent->domain_name,
+ name_list[ent->sam_entry_index].name,
name_list[ent->sam_entry_index].user_rid,
name_list[ent->sam_entry_index].group_rid,
name_list[ent->sam_entry_index].gecos,
@@ -618,8 +526,7 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state)
enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
{
struct winbindd_domain *domain;
- SAM_DISPINFO_CTR ctr;
- SAM_DISPINFO_1 info1;
+ WINBIND_USERINFO *info;
uint32 num_entries = 0, total_entries = 0;
char *ted, *extra_data = NULL;
int extra_data_len = 0;
@@ -628,20 +535,15 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
DEBUG(3, ("[%5d]: list users\n", state->pid));
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("winbindd_list_users")))
return WINBINDD_ERROR;
/* Enumerate over trusted domains */
- ctr.sam.info1 = &info1;
-
- if (domain_list == NULL)
- get_domain_info();
-
- for (domain = domain_list; domain; domain = domain->next) {
+ for (domain = domain_list(); domain; domain = domain->next) {
NTSTATUS status;
- uint32 start_ndx = 0;
- POLICY_HND dom_pol;
+ struct winbindd_methods *methods;
+ int i;
/* Skip domains other than WINBINDD_DOMAIN environment
variable */
@@ -650,63 +552,46 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state)
!check_domain_env(state->request.domain, domain->name))
continue;
- if (!create_samr_domain_handle(domain, &dom_pol))
- continue;
+ methods = domain->methods;
/* Query display info */
+ status = methods->query_user_list(domain, mem_ctx,
+ &num_entries, &info);
- do {
- int i;
-
- status = winbindd_query_dispinfo(
- domain, mem_ctx, &dom_pol, &start_ndx,
- 1, &num_entries, &ctr);
-
- if (num_entries == 0)
- continue;
-
- /* Allocate some memory for extra data */
+ if (num_entries == 0)
+ continue;
- total_entries += num_entries;
+ /* Allocate some memory for extra data */
+ total_entries += num_entries;
- ted = Realloc(extra_data, sizeof(fstring) *
- total_entries);
+ ted = Realloc(extra_data, sizeof(fstring) * total_entries);
- if (!ted) {
- DEBUG(0,("winbindd_list_users: failed to enlarge buffer!\n"));
- SAFE_FREE(extra_data);
- goto done;
- } else
- extra_data = ted;
+ if (!ted) {
+ DEBUG(0,("failed to enlarge buffer!\n"));
+ SAFE_FREE(extra_data);
+ goto done;
+ } else
+ extra_data = ted;
- /* Pack user list into extra data fields */
+ /* Pack user list into extra data fields */
- for (i = 0; i < num_entries; i++) {
- UNISTR2 *uni_acct_name;
- fstring acct_name, name;
-
- /* Convert unistring to ascii */
-
- uni_acct_name = &ctr.sam.info1->str[i].
- uni_acct_name;
- unistr2_to_ascii(acct_name, uni_acct_name,
- sizeof(acct_name) - 1);
-
- slprintf(name, sizeof(name) - 1, "%s%s%s",
- domain->name, lp_winbind_separator(),
- acct_name);
-
- /* Append to extra data */
+ for (i = 0; i < num_entries; i++) {
+ fstring acct_name, name;
- memcpy(&extra_data[extra_data_len], name,
- strlen(name));
- extra_data_len += strlen(name);
-
- extra_data[extra_data_len++] = ',';
- }
- } while (NT_STATUS_V(status) == NT_STATUS_V(STATUS_MORE_ENTRIES));
-
- close_samr_domain_handle(domain, &dom_pol);
+ if (!info[i].acct_name) {
+ fstrcpy(acct_name, "");
+ } else {
+ fstrcpy(acct_name, info[i].acct_name);
+ }
+
+ fill_domain_username(name, domain->name, acct_name);
+
+ /* Append to extra data */
+ memcpy(&extra_data[extra_data_len], name,
+ strlen(name));
+ extra_data_len += strlen(name);
+ extra_data[extra_data_len++] = ',';
+ }
}
/* Assign extra_data fields in response structure */
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index c0c7b6ae0dd..06804b3b43f 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/nsswitch/winbindd_util.c
@@ -1,5 +1,5 @@
/*
- Unix SMB/Netbios implementation.
+ Unix SMB/CIFS implementation.
Winbind daemon for ntdom nss module
@@ -36,418 +36,204 @@
*
* Correct code should never look at a field that has this value.
**/
-static const fstring name_deadbeef = "<deadbeef>";
-
-/* Globals for domain list stuff */
+static const fstring name_deadbeef = "<deadbeef>";
-struct winbindd_domain *domain_list = NULL;
+/* The list of trusted domains. Note that the list can be deleted and
+ recreated using the init_domain_list() function so pointers to
+ individual winbindd_domain structures cannot be made. Keep a copy of
+ the domain name instead. */
-/* Given a domain name, return the struct winbindd domain info for it
- if it is actually working. */
+static struct winbindd_domain *_domain_list;
-struct winbindd_domain *find_domain_from_name(char *domain_name)
+struct winbindd_domain *domain_list(void)
{
- struct winbindd_domain *tmp;
-
- if (domain_list == NULL)
- get_domain_info();
-
- /* Search through list */
-
- for (tmp = domain_list; tmp != NULL; tmp = tmp->next) {
- if (strcmp(domain_name, tmp->name) == 0)
- return tmp;
- }
+ /* Initialise list */
- /* Not found */
+ if (!_domain_list)
+ init_domain_list();
- return NULL;
+ return _domain_list;
}
-/* Given a domain name, return the struct winbindd domain info for it */
+/* Free all entries in the trusted domain list */
-struct winbindd_domain *find_domain_from_sid(DOM_SID *sid)
+void free_domain_list(void)
{
- struct winbindd_domain *tmp;
-
- if (domain_list == NULL)
- get_domain_info();
-
- /* Search through list */
-
- for (tmp = domain_list; tmp != NULL; tmp = tmp->next) {
- if (sid_equal(sid, &tmp->sid))
- return tmp;
+ struct winbindd_domain *domain = _domain_list;
+
+ while(domain) {
+ struct winbindd_domain *next = domain->next;
+
+ DLIST_REMOVE(_domain_list, domain);
+ SAFE_FREE(domain);
+ domain = next;
}
-
- /* Not found */
-
- return NULL;
}
/* Add a trusted domain to our list of domains */
static struct winbindd_domain *add_trusted_domain(char *domain_name,
- DOM_SID *domain_sid)
+ struct winbindd_methods *methods)
{
- struct winbindd_domain *domain, *tmp;
+ struct winbindd_domain *domain;
- for (tmp = domain_list; tmp != NULL; tmp = tmp->next) {
- if (strcmp(domain_name, tmp->name) == 0) {
- DEBUG(3, ("domain %s already in domain list\n", domain_name));
- return tmp;
+ /* We can't call domain_list() as this function is called from
+ init_domain_list() and we'll get stuck in a loop. */
+
+ for (domain = _domain_list; domain; domain = domain->next) {
+ if (strcmp(domain_name, domain->name) == 0) {
+ DEBUG(3, ("domain %s already in domain list\n",
+ domain_name));
+ return domain;
}
}
- DEBUG(1, ("adding domain %s\n", domain_name));
-
/* Create new domain entry */
-
- if ((domain = (struct winbindd_domain *)malloc(sizeof(*domain))) == NULL)
+
+ if ((domain = (struct winbindd_domain *)
+ malloc(sizeof(*domain))) == NULL)
return NULL;
/* Fill in fields */
ZERO_STRUCTP(domain);
+
fstrcpy(domain->name, domain_name);
- sid_copy(&domain->sid, domain_sid);
-
+ domain->methods = methods;
+ domain->sequence_number = DOM_SEQUENCE_NONE;
+ domain->last_seq_check = 0;
+
/* Link to domain list */
- DLIST_ADD(domain_list, domain);
+ DLIST_ADD(_domain_list, domain);
return domain;
}
/* Look up global info for the winbind daemon */
-BOOL get_domain_info(void)
+BOOL init_domain_list(void)
{
- uint32 enum_ctx = 0, num_doms = 0;
- char **domains = NULL;
- DOM_SID *sids = NULL, domain_sid;
NTSTATUS result;
- CLI_POLICY_HND *hnd;
- int i;
- fstring level5_dom;
- BOOL rv = False;
TALLOC_CTX *mem_ctx;
-
- DEBUG(1, ("getting trusted domain list\n"));
+ extern struct winbindd_methods cache_methods;
+ struct winbindd_domain *domain;
+ DOM_SID *dom_sids;
+ char **names;
+ int num_domains = 0;
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("init_domain_list")))
return False;
- /* Add our workgroup - keep handle to look up trusted domains */
+ /* Free existing list */
- if (!(hnd = cm_get_lsa_handle(lp_workgroup())))
- goto done;
+ free_domain_list();
- result = cli_lsa_query_info_policy(hnd->cli, mem_ctx,
- &hnd->pol, 0x05, level5_dom, &domain_sid);
+ /* Add ourselves as the first entry */
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- add_trusted_domain(lp_workgroup(), &domain_sid);
-
- /* Enumerate list of trusted domains */
+ domain = add_trusted_domain(lp_workgroup(), &cache_methods);
- if (!(hnd = cm_get_lsa_handle(lp_workgroup())))
- goto done;
+ /* Now we *must* get the domain sid for our primary domain. Go into
+ a holding pattern until that is available */
- result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx,
- &hnd->pol, &enum_ctx, &num_doms, &domains, &sids);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- /* Add each domain to the trusted domain list */
-
- for(i = 0; i < num_doms; i++)
- add_trusted_domain(domains[i], &sids[i]);
-
- rv = True;
-
- done:
-
- talloc_destroy(mem_ctx);
-
- return rv;
-}
-
-/* Free global domain info */
-
-void free_domain_info(void)
-{
- struct winbindd_domain *domain;
-
- /* Free list of domains */
-
- if (domain_list) {
- struct winbindd_domain *next_domain;
-
- domain = domain_list;
-
- while(domain) {
- next_domain = domain->next;
- SAFE_FREE(domain);
- domain = next_domain;
- }
+ result = cache_methods.domain_sid(domain, &domain->sid);
+ while (!NT_STATUS_IS_OK(result)) {
+ sleep(10);
+ DEBUG(1,("Retrying startup domain sid fetch for %s\n",
+ domain->name));
+ result = cache_methods.domain_sid(domain, &domain->sid);
}
-}
+
+ DEBUG(1,("Added domain %s (%s)\n",
+ domain->name,
+ sid_string_static(&domain->sid)));
-/* Connect to a domain controller using get_any_dc_name() to discover
- the domain name and sid */
+ DEBUG(1, ("getting trusted domain list\n"));
-BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain)
-{
- fstring level5_dom;
- uint32 enum_ctx = 0, num_doms = 0;
- char **domains = NULL;
- DOM_SID *sids = NULL;
- CLI_POLICY_HND *hnd;
- NTSTATUS result;
- BOOL rv = False;
- TALLOC_CTX *mem_ctx;
-
- DEBUG(1, ("looking up sid for domain %s\n", domain_name));
-
- if (!(mem_ctx = talloc_init()))
- return False;
-
- if (!(hnd = cm_get_lsa_handle(domain_name)))
- goto done;
-
- /* Do a level 5 query info policy if we are looking up the SID for
- our own domain. */
-
- if (strequal(domain_name, lp_workgroup())) {
-
- result = cli_lsa_query_info_policy(hnd->cli, mem_ctx,
- &hnd->pol, 0x05, level5_dom,
- &domain->sid);
-
- rv = NT_STATUS_IS_OK(result);
- goto done;
- }
-
- /* Use lsaenumdomains to get sid for this domain */
-
- result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx, &hnd->pol,
- &enum_ctx, &num_doms, &domains, &sids);
-
- /* Look for domain name */
-
- if (NT_STATUS_IS_OK(result) && domains && sids) {
- BOOL found = False;
+ result = cache_methods.trusted_domains(domain, mem_ctx, &num_domains,
+ &names, &dom_sids);
+
+ /* Add each domain to the trusted domain list */
+ if (NT_STATUS_IS_OK(result)) {
int i;
-
- for(i = 0; i < num_doms; i++) {
- if (strequal(domain_name, domains[i])) {
- sid_copy(&domain->sid, &sids[i]);
- found = True;
- break;
- }
+ for(i = 0; i < num_domains; i++) {
+ domain = add_trusted_domain(names[i], &cache_methods);
+ if (!domain) continue;
+ sid_copy(&domain->sid, &dom_sids[i]);
+ DEBUG(1,("Added domain %s (%s)\n",
+ domain->name,
+ sid_string_static(&domain->sid)));
+
+ /* this primes the connection */
+ cache_methods.domain_sid(domain, &domain->sid);
}
-
- rv = found;
- goto done;
}
-
- rv = False; /* An error occured with a trusted domain */
-
- done:
talloc_destroy(mem_ctx);
-
- return rv;
-}
-
-/* Store a SID in a domain indexed by name in the cache. */
-
-static void store_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME_USE type)
-{
- fstring domain_str;
- char *p;
- struct winbindd_sid sid_val;
- struct winbindd_domain *domain;
-
- /* Get name from domain. */
- fstrcpy( domain_str, name);
- p = strchr(domain_str, '\\');
- if (p)
- *p = '\0';
-
- if ((domain = find_domain_from_name(domain_str)) == NULL)
- return;
-
- sid_to_string(sid_val.sid, sid);
- sid_val.type = (int)type;
-
- DEBUG(10,("store_sid_by_name_in_cache: storing cache entry %s -> SID %s\n",
- name, sid_val.sid ));
-
- winbindd_store_sid_cache_entry(domain, name, &sid_val);
-}
-
-/* Lookup a SID in a domain indexed by name in the cache. */
-
-static BOOL winbindd_lookup_sid_by_name_in_cache(fstring name, DOM_SID *sid, enum SID_NAME_USE *type)
-{
- fstring domain_str;
- char *p;
- struct winbindd_sid sid_ret;
- struct winbindd_domain *domain;
-
- /* Get name from domain. */
- fstrcpy( domain_str, name);
- p = strchr(domain_str, '\\');
- if (p)
- *p = '\0';
-
- if ((domain = find_domain_from_name(domain_str)) == NULL)
- return False;
-
- if (!winbindd_fetch_sid_cache_entry(domain, name, &sid_ret))
- return False;
-
- string_to_sid( sid, sid_ret.sid);
- *type = (enum SID_NAME_USE)sid_ret.type;
-
- DEBUG(10,("winbindd_lookup_sid_by_name_in_cache: Cache hit for name %s. SID = %s\n",
- name, sid_ret.sid ));
-
return True;
}
-/* Store a name in a domain indexed by SID in the cache. */
+/* Given a domain name, return the struct winbindd domain info for it
+ if it is actually working. */
-static void store_name_by_sid_in_cache(DOM_SID *sid, fstring name, enum SID_NAME_USE type)
+struct winbindd_domain *find_domain_from_name(const char *domain_name)
{
- fstring sid_str;
- uint32 rid;
- DOM_SID domain_sid;
- struct winbindd_name name_val;
struct winbindd_domain *domain;
- /* Split sid into domain sid and user rid */
- sid_copy(&domain_sid, sid);
- sid_split_rid(&domain_sid, &rid);
-
- if ((domain = find_domain_from_sid(&domain_sid)) == NULL)
- return;
+ /* Search through list */
- sid_to_string(sid_str, sid);
- fstrcpy( name_val.name, name );
- name_val.type = (int)type;
+ for (domain = domain_list(); domain != NULL; domain = domain->next) {
+ if (strequal(domain_name, domain->name) ||
+ strequal(domain_name, domain->full_name))
+ return domain;
+ }
- DEBUG(10,("store_name_by_sid_in_cache: storing cache entry SID %s -> %s\n",
- sid_str, name_val.name ));
+ /* Not found */
- winbindd_store_name_cache_entry(domain, sid_str, &name_val);
+ return NULL;
}
-/* Lookup a name in a domain indexed by SID in the cache. */
+/* Given a domain sid, return the struct winbindd domain info for it */
-static BOOL winbindd_lookup_name_by_sid_in_cache(DOM_SID *sid, fstring name, enum SID_NAME_USE *type)
+struct winbindd_domain *find_domain_from_sid(DOM_SID *sid)
{
- fstring sid_str;
- uint32 rid;
- DOM_SID domain_sid;
- struct winbindd_name name_ret;
struct winbindd_domain *domain;
- /* Split sid into domain sid and user rid */
- sid_copy(&domain_sid, sid);
- sid_split_rid(&domain_sid, &rid);
-
- if ((domain = find_domain_from_sid(&domain_sid)) == NULL)
- return False;
-
- sid_to_string(sid_str, sid);
-
- if (!winbindd_fetch_name_cache_entry(domain, sid_str, &name_ret))
- return False;
+ /* Search through list */
- fstrcpy( name, name_ret.name );
- *type = (enum SID_NAME_USE)name_ret.type;
+ for (domain = domain_list(); domain != NULL; domain = domain->next) {
+ if (sid_compare_domain(sid, &domain->sid) == 0)
+ return domain;
+ }
- DEBUG(10,("winbindd_lookup_name_by_sid_in_cache: Cache hit for SID = %s, name %s\n",
- sid_str, name ));
+ /* Not found */
- return True;
+ return NULL;
}
/* Lookup a sid in a domain from a name */
-BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *type)
+BOOL winbindd_lookup_sid_by_name(struct winbindd_domain *domain,
+ const char *name, DOM_SID *sid,
+ enum SID_NAME_USE *type)
{
- int num_sids = 0, num_names = 1;
- DOM_SID *sids = NULL;
- uint32 *types = NULL;
- CLI_POLICY_HND *hnd;
NTSTATUS result;
- TALLOC_CTX *mem_ctx;
- BOOL rv = False;
/* Don't bother with machine accounts */
if (name[strlen(name) - 1] == '$')
return False;
- /* First check cache. */
- if (winbindd_lookup_sid_by_name_in_cache(name, sid, type)) {
- if (*type == SID_NAME_USE_NONE)
- return False; /* Negative cache hit. */
- return True;
- }
-
/* Lookup name */
-
- if (!(mem_ctx = talloc_init()))
- return False;
-
- if (!(hnd = cm_get_lsa_handle(lp_workgroup())))
- goto done;
-
- result = cli_lsa_lookup_names(hnd->cli, mem_ctx, &hnd->pol,
- num_names, (char **)&name, &sids,
- &types, &num_sids);
+ result = domain->methods->name_to_sid(domain, name, sid, type);
/* Return rid and type if lookup successful */
-
- if (NT_STATUS_IS_OK(result)) {
-
- /* Return sid */
-
- if ((sid != NULL) && (sids != NULL))
- sid_copy(sid, &sids[0]);
-
- /* Return name type */
-
- if ((type != NULL) && (types != NULL))
- *type = types[0];
-
- /* Store the forward and reverse map of this lookup in the cache. */
- store_sid_by_name_in_cache(name, &sids[0], types[0]);
- store_name_by_sid_in_cache(&sids[0], name, types[0]);
- } else {
- /* JRA. Here's where we add the -ve cache store with a name type of SID_NAME_USE_NONE. */
- DOM_SID nullsid;
-
- ZERO_STRUCT(nullsid);
- store_sid_by_name_in_cache(name, &nullsid, SID_NAME_USE_NONE);
+ if (!NT_STATUS_IS_OK(result)) {
*type = SID_NAME_UNKNOWN;
}
- rv = NT_STATUS_IS_OK(result);
-
- done:
- talloc_destroy(mem_ctx);
-
- return rv;
+ return NT_STATUS_IS_OK(result);
}
/**
@@ -457,6 +243,8 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty
*
* @param name On success, set to the name corresponding to @p sid.
*
+ * @param dom_name On success, set to the 'domain name' corresponding to @p sid.
+ *
* @param type On success, contains the type of name: alias, group or
* user.
*
@@ -464,335 +252,45 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty
* are set, otherwise False.
**/
BOOL winbindd_lookup_name_by_sid(DOM_SID *sid,
+ fstring dom_name,
fstring name,
enum SID_NAME_USE *type)
{
- int num_sids = 1, num_names = 0;
- uint32 *types = NULL;
- char **names;
- CLI_POLICY_HND *hnd;
+ char *names;
NTSTATUS result;
TALLOC_CTX *mem_ctx;
BOOL rv = False;
+ struct winbindd_domain *domain;
- /* First check cache. */
- if (winbindd_lookup_name_by_sid_in_cache(sid, name, type)) {
- if (*type == SID_NAME_USE_NONE) {
- fstrcpy(name, name_deadbeef);
- *type = SID_NAME_UNKNOWN;
- return False; /* Negative cache hit. */
- } else
- return True;
+ domain = find_domain_from_sid(sid);
+
+ if (!domain) {
+ DEBUG(1,("Can't find domain from sid\n"));
+ return False;
}
/* Lookup name */
- if (!(mem_ctx = talloc_init()))
+ if (!(mem_ctx = talloc_init_named("winbindd_lookup_name_by_sid")))
return False;
- if (!(hnd = cm_get_lsa_handle(lp_workgroup())))
- goto done;
-
- result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol,
- num_sids, sid, &names, &types,
- &num_names);
+ result = domain->methods->sid_to_name(domain, mem_ctx, sid, &names, type);
/* Return name and type if successful */
if ((rv = NT_STATUS_IS_OK(result))) {
-
- /* Return name */
-
- if ((names != NULL) && (name != NULL))
- fstrcpy(name, names[0]);
-
- /* Return name type */
-
- if ((type != NULL) && (types != NULL))
- *type = types[0];
-
- store_sid_by_name_in_cache(names[0], sid, types[0]);
- store_name_by_sid_in_cache(sid, names[0], types[0]);
+ fstrcpy(dom_name, domain->name);
+ fstrcpy(name, names);
} else {
- /* OK, so we tried to look up a name in this sid, and
- * didn't find it. Therefore add a negative cache
- * entry. */
- store_name_by_sid_in_cache(sid, "", SID_NAME_USE_NONE);
*type = SID_NAME_UNKNOWN;
fstrcpy(name, name_deadbeef);
}
-
- done:
talloc_destroy(mem_ctx);
return rv;
}
-/* Lookup user information from a rid */
-
-BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx, uint32 user_rid,
- SAM_USERINFO_CTR **user_info)
-{
- CLI_POLICY_HND *hnd;
- uint16 info_level = 0x15;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
- POLICY_HND dom_pol, user_pol;
- BOOL got_dom_pol = False, got_user_pol = False;
-
- /* Get sam handle */
-
- if (!(hnd = cm_get_sam_handle(domain->name)))
- goto done;
-
- /* Get domain handle */
-
- result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol,
- des_access, &domain->sid, &dom_pol);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_dom_pol = True;
-
- /* Get user handle */
-
- result = cli_samr_open_user(hnd->cli, mem_ctx, &dom_pol,
- des_access, user_rid, &user_pol);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- /* Get user info */
-
- result = cli_samr_query_userinfo(hnd->cli, mem_ctx, &user_pol,
- info_level, user_info);
-
- cli_samr_close(hnd->cli, mem_ctx, &user_pol);
-
- done:
- /* Clean up policy handles */
-
- if (got_user_pol)
- cli_samr_close(hnd->cli, mem_ctx, &user_pol);
-
- if (got_dom_pol)
- cli_samr_close(hnd->cli, mem_ctx, &dom_pol);
-
- return NT_STATUS_IS_OK(result);
-}
-
-/* Lookup groups a user is a member of. I wish Unix had a call like this! */
-
-BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx,
- uint32 user_rid, uint32 *num_groups,
- DOM_GID **user_groups)
-{
- CLI_POLICY_HND *hnd;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- POLICY_HND dom_pol, user_pol;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
- BOOL got_dom_pol = False, got_user_pol = False;
-
- /* Get sam handle */
-
- if (!(hnd = cm_get_sam_handle(domain->name)))
- goto done;
-
- /* Get domain handle */
-
- result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol,
- des_access, &domain->sid, &dom_pol);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_dom_pol = True;
-
- /* Get user handle */
-
- result = cli_samr_open_user(hnd->cli, mem_ctx, &dom_pol,
- des_access, user_rid, &user_pol);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_user_pol = True;
-
- /* Query user rids */
-
- result = cli_samr_query_usergroups(hnd->cli, mem_ctx, &user_pol,
- num_groups, user_groups);
-
- done:
-
- /* Clean up policy handles */
-
- if (got_user_pol)
- cli_samr_close(hnd->cli, mem_ctx, &user_pol);
-
- if (got_dom_pol)
- cli_samr_close(hnd->cli, mem_ctx, &dom_pol);
-
- return NT_STATUS_IS_OK(result);
-}
-
-/* Lookup group membership given a rid. */
-
-BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx,
- uint32 group_rid, uint32 *num_names,
- uint32 **rid_mem, char ***names,
- uint32 **name_types)
-{
- CLI_POLICY_HND *hnd;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 i, total_names = 0;
- POLICY_HND dom_pol, group_pol;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
- BOOL got_dom_pol = False, got_group_pol = False;
-
- /* Get sam handle */
-
- if (!(hnd = cm_get_sam_handle(domain->name)))
- goto done;
-
- /* Get domain handle */
-
- result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol,
- des_access, &domain->sid, &dom_pol);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_dom_pol = True;
-
- /* Get group handle */
-
- result = cli_samr_open_group(hnd->cli, mem_ctx, &dom_pol,
- des_access, group_rid, &group_pol);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- got_group_pol = True;
-
- /* Step #1: Get a list of user rids that are the members of the
- group. */
-
- result = cli_samr_query_groupmem(hnd->cli, mem_ctx,
- &group_pol, num_names, rid_mem,
- name_types);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- /* Step #2: Convert list of rids into list of usernames. Do this
- in bunches of ~1000 to avoid crashing NT4. It looks like there
- is a buffer overflow or something like that lurking around
- somewhere. */
-
-#define MAX_LOOKUP_RIDS 900
-
- *names = talloc(mem_ctx, *num_names * sizeof(char *));
- *name_types = talloc(mem_ctx, *num_names * sizeof(uint32));
-
- for (i = 0; i < *num_names; i += MAX_LOOKUP_RIDS) {
- int num_lookup_rids = MIN(*num_names - i, MAX_LOOKUP_RIDS);
- uint32 tmp_num_names = 0;
- char **tmp_names = NULL;
- uint32 *tmp_types = NULL;
-
- /* Lookup a chunk of rids */
-
- result = cli_samr_lookup_rids(hnd->cli, mem_ctx,
- &dom_pol, 1000, /* flags */
- num_lookup_rids,
- &(*rid_mem)[i],
- &tmp_num_names,
- &tmp_names, &tmp_types);
-
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
- /* Copy result into array. The talloc system will take
- care of freeing the temporary arrays later on. */
-
- memcpy(&(*names)[i], tmp_names, sizeof(char *) *
- tmp_num_names);
-
- memcpy(&(*name_types)[i], tmp_types, sizeof(uint32) *
- tmp_num_names);
-
- total_names += tmp_num_names;
- }
-
- *num_names = total_names;
-
- done:
- if (got_group_pol)
- cli_samr_close(hnd->cli, mem_ctx, &group_pol);
-
- if (got_dom_pol)
- cli_samr_close(hnd->cli, mem_ctx, &dom_pol);
-
- return NT_STATUS_IS_OK(result);
-}
-
-BOOL create_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol)
-{
- CLI_POLICY_HND *hnd;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED;
- TALLOC_CTX *mem_ctx = talloc_init();
-
- ZERO_STRUCTP(pdom_pol);
-
- if (!mem_ctx)
- return False;
-
- /* Get sam handle */
-
- if (!(hnd = cm_get_sam_handle(domain->name))) {
- talloc_destroy(mem_ctx);
- return False;
- }
- /* Get domain handle */
- result = cli_samr_open_domain(hnd->cli, mem_ctx, &hnd->pol,
- des_access, &domain->sid, pdom_pol);
-
- talloc_destroy(mem_ctx);
- if (!NT_STATUS_IS_OK(result))
- return False;
-
- return True;
-}
-
-void close_samr_domain_handle(struct winbindd_domain *domain, POLICY_HND *pdom_pol)
-{
- static POLICY_HND zero_pol;
- CLI_POLICY_HND *hnd;
- TALLOC_CTX *mem_ctx = talloc_init();
-
- if (!mem_ctx)
- return;
-
- if (memcmp(pdom_pol, &zero_pol, sizeof(zero_pol)) == 0)
- return;
-
- if (!(hnd = cm_get_sam_handle(domain->name))) {
- talloc_destroy(mem_ctx);
- return;
- }
-
- cli_samr_close(hnd->cli, mem_ctx, pdom_pol);
- ZERO_STRUCTP(pdom_pol);
-
- talloc_destroy(mem_ctx);
-}
/* Free state information held for {set,get,end}{pw,gr}ent() functions */
@@ -807,9 +305,6 @@ void free_getent_state(struct getent_state *state)
while(temp != NULL) {
struct getent_state *next;
- /* Close SAMR cache handle. */
- close_samr_domain_handle(temp->domain, &temp->dom_pol);
-
/* Free sam entries then list entry */
SAFE_FREE(state->sam_entries);
@@ -821,68 +316,23 @@ void free_getent_state(struct getent_state *state)
}
}
-struct getent_state *create_getent_state(struct winbindd_domain *domain)
-{
- struct getent_state *state = (struct getent_state *)malloc(sizeof(struct getent_state));
-
- if (state == NULL)
- return NULL;
-
- ZERO_STRUCTP(state);
- state->domain = domain;
-
- /* Create and cache a SAMR domain handle. */
- if (!create_samr_domain_handle(state->domain, &state->dom_pol)) {
- free_getent_state(state);
- return NULL;
- }
-
- return state;
-}
-
/* Initialise trusted domain info */
BOOL winbindd_param_init(void)
{
- /* Parse winbind uid and winbind_gid parameters */
-
- if (!lp_winbind_uid(&server_state.uid_low, &server_state.uid_high)) {
- DEBUG(0, ("winbind uid range missing or invalid\n"));
- return False;
- }
-
- if (!lp_winbind_gid(&server_state.gid_low, &server_state.gid_high)) {
- DEBUG(0, ("winbind gid range missing or invalid\n"));
- return False;
- }
-
- return True;
-}
-
-/* Query display info for a domain. This returns enough information plus a
- bit extra to give an overview of domain users for the User Manager
- application. */
-
-NTSTATUS winbindd_query_dispinfo(struct winbindd_domain *domain,
- TALLOC_CTX *mem_ctx, POLICY_HND *pdom_pol,
- uint32 *start_ndx, uint16 info_level,
- uint32 *num_entries, SAM_DISPINFO_CTR *ctr)
-{
- CLI_POLICY_HND *hnd;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- /* Get sam handle */
-
- if (!(hnd = cm_get_sam_handle(domain->name)))
- return NT_STATUS_UNSUCCESSFUL;
+ /* Parse winbind uid and winbind_gid parameters */
- /* Query display info */
-
- result = cli_samr_query_dispinfo(hnd->cli, mem_ctx,
- pdom_pol, start_ndx, info_level,
- num_entries, 0xffff, ctr);
-
- return result;
+ if (!lp_winbind_uid(&server_state.uid_low, &server_state.uid_high)) {
+ DEBUG(0, ("winbind uid range missing or invalid\n"));
+ return False;
+ }
+
+ if (!lp_winbind_gid(&server_state.gid_low, &server_state.gid_high)) {
+ DEBUG(0, ("winbind gid range missing or invalid\n"));
+ return False;
+ }
+
+ return True;
}
/* Check if a domain is present in a comma-separated list of domains */
@@ -901,17 +351,43 @@ BOOL check_domain_env(char *domain_env, char *domain)
}
/* Parse a string of the form DOMAIN/user into a domain and a user */
+extern fstring global_myworkgroup;
-BOOL parse_domain_user(char *domuser, fstring domain, fstring user)
+BOOL parse_domain_user(const char *domuser, fstring domain, fstring user)
{
char *p = strchr(domuser,*lp_winbind_separator());
- if (!p)
+ if (!(p || lp_winbind_use_default_domain()))
return False;
- fstrcpy(user, p+1);
- fstrcpy(domain, domuser);
- domain[PTR_DIFF(p, domuser)] = 0;
+ if(!p && lp_winbind_use_default_domain()) {
+ fstrcpy(user, domuser);
+ fstrcpy(domain, global_myworkgroup);
+ } else {
+ fstrcpy(user, p+1);
+ fstrcpy(domain, domuser);
+ domain[PTR_DIFF(p, domuser)] = 0;
+ }
strupper(domain);
return True;
}
+
+/*
+ Fill DOMAIN\\USERNAME entry accounting 'winbind use default domain' and
+ 'winbind separator' options.
+ This means:
+ - omit DOMAIN when 'winbind use default domain = true' and DOMAIN is
+ global_myworkgroup
+
+*/
+void fill_domain_username(fstring name, const char *domain, const char *user)
+{
+ if(lp_winbind_use_default_domain() &&
+ !strcmp(global_myworkgroup, domain)) {
+ strlcpy(name, user, sizeof(fstring));
+ } else {
+ slprintf(name, sizeof(fstring) - 1, "%s%s%s",
+ domain, lp_winbind_separator(),
+ user);
+ }
+}
diff --git a/source/nsswitch/winbindd_wins.c b/source/nsswitch/winbindd_wins.c
index ca21ccb4853..af624170eb4 100644
--- a/source/nsswitch/winbindd_wins.c
+++ b/source/nsswitch/winbindd_wins.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
Winbind daemon - WINS related functions
@@ -95,7 +94,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
return NULL;
p = wins_srv_ip();
- if( !zero_ip(p) ) {
+ if( !is_zero_ip(p) ) {
ret = name_query(fd,name,0x20,False,True, p, count);
goto out;
}
@@ -125,42 +124,42 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state)
{
- char response[1024];
- int i, count, len, size, maxsize;
+ fstring response;
+ int i, count, maxlen, size;
struct node_status *status;
DEBUG(3, ("[%5d]: wins_byip %s\n", state->pid,
- state->request.data.name));
+ state->request.data.winsreq));
*response = '\0';
- maxsize = len = sizeof(response) - 1;
+ maxlen = sizeof(response) - 1;
- if ((status = lookup_byaddr_backend(state->request.data.name, &count))){
- size = strlen(state->request.data.name) + 1;
- if (size > len) {
+ if ((status = lookup_byaddr_backend(state->request.data.winsreq, &count))){
+ size = strlen(state->request.data.winsreq);
+ if (size > maxlen) {
SAFE_FREE(status);
return WINBINDD_ERROR;
}
- len -= size;
- safe_strcat(response,state->request.data.name,maxsize);
- safe_strcat(response,"\t",maxsize);
+ safe_strcat(response,state->request.data.winsreq,maxlen);
+ safe_strcat(response,"\t",maxlen);
for (i = 0; i < count; i++) {
/* ignore group names */
if (status[i].flags & 0x80) continue;
if (status[i].type == 0x20) {
- size = sizeof(status[i].name) + 1;
- if (size > len) {
+ size = sizeof(status[i].name) + strlen(response);
+ if (size > maxlen) {
SAFE_FREE(status);
return WINBINDD_ERROR;
}
- len -= size;
- safe_strcat(response, status[i].name, maxsize);
- safe_strcat(response, " ", maxsize);
+ safe_strcat(response, status[i].name, maxlen);
+ safe_strcat(response, " ", maxlen);
}
}
+ /* make last character a newline */
+ response[strlen(response)-1] = '\n';
SAFE_FREE(status);
}
- fstrcpy(state->response.data.name.name,response);
+ fstrcpy(state->response.data.winsresp,response);
return WINBINDD_OK;
}
@@ -169,40 +168,43 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state)
enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state)
{
struct in_addr *ip_list;
- int i, count, len, size, maxsize;
- char response[1024];
+ int i, count, maxlen, size;
+ fstring response;
char * addr;
DEBUG(3, ("[%5d]: wins_byname %s\n", state->pid,
- state->request.data.name));
+ state->request.data.winsreq));
*response = '\0';
- maxsize = len = sizeof(response) - 1;
+ maxlen = sizeof(response) - 1;
- if ((ip_list = lookup_byname_backend(state->request.data.name,&count))){
+ if ((ip_list = lookup_byname_backend(state->request.data.winsreq,&count))){
for (i = count; i ; i--) {
addr = inet_ntoa(ip_list[i-1]);
- size = strlen(addr) + 1;
- if (size > len) {
+ size = strlen(addr);
+ if (size > maxlen) {
SAFE_FREE(ip_list);
return WINBINDD_ERROR;
}
- len -= size;
- safe_strcat(response,addr,maxsize);
- safe_strcat(response," ",maxsize);
+ if (i != 0) {
+ /* Clear out the newline character */
+ response[strlen(response)-1] = ' ';
+ }
+ safe_strcat(response,addr,maxlen);
+ safe_strcat(response,"\t",maxlen);
}
- size = strlen(state->request.data.name) + 1;
- if (size > len) {
+ size = strlen(state->request.data.winsreq) + strlen(response);
+ if (size > maxlen) {
SAFE_FREE(ip_list);
return WINBINDD_ERROR;
}
- response[strlen(response)-1] = '\t';
- safe_strcat(response,state->request.data.name,maxsize);
+ safe_strcat(response,state->request.data.winsreq,maxlen);
+ safe_strcat(response,"\n",maxlen);
SAFE_FREE(ip_list);
} else
return WINBINDD_ERROR;
- fstrcpy(state->response.data.name.name,response);
+ fstrcpy(state->response.data.winsresp,response);
return WINBINDD_OK;
}
diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c
index a645172e53d..c88bd379100 100644
--- a/source/nsswitch/wins.c
+++ b/source/nsswitch/wins.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.0
+ Unix SMB/CIFS implementation.
a WINS nsswitch module
Copyright (C) Andrew Tridgell 1999
@@ -35,6 +34,7 @@
static int initialised;
+extern BOOL AllowDebugChange;
/* Use our own create socket code so we don't recurse.... */
@@ -77,7 +77,8 @@ static int wins_lookup_open_socket_in(void)
static void nss_wins_init(void)
{
initialised = 1;
- DEBUGLEVEL = 10;
+ DEBUGLEVEL = 0;
+ AllowDebugChange = False;
/* needed for lp_xx() functions */
charset_initialise();
@@ -130,7 +131,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
return NULL;
p = wins_srv_ip();
- if( !zero_ip(p) ) {
+ if( !is_zero_ip(p) ) {
ret = name_query(fd,name,0x20,False,True, p, count);
goto out;
}
@@ -205,7 +206,7 @@ int lookup(nsd_file_t *rq)
if ( status = lookup_byaddr_backend(key, &count)) {
size = strlen(key) + 1;
if (size > len) {
- SAFE_FREE(status);
+ free(status);
return NSD_ERROR;
}
len -= size;
@@ -217,7 +218,7 @@ int lookup(nsd_file_t *rq)
if (status[i].type == 0x20) {
size = sizeof(status[i].name) + 1;
if (size > len) {
- SAFE_FREE(status);
+ free(status);
return NSD_ERROR;
}
len -= size;
@@ -227,7 +228,7 @@ int lookup(nsd_file_t *rq)
}
}
response[strlen(response)-1] = '\n';
- SAFE_FREE(status);
+ free(status);
}
} else if (strcasecmp(map,"hosts.byname") == 0) {
if (ip_list = lookup_byname_backend(key, &count)) {
@@ -235,7 +236,7 @@ int lookup(nsd_file_t *rq)
addr = inet_ntoa(ip_list[i-1]);
size = strlen(addr) + 1;
if (size > len) {
- SAFE_FREE(ip_list);
+ free(ip_list);
return NSD_ERROR;
}
len -= size;
@@ -246,13 +247,13 @@ int lookup(nsd_file_t *rq)
}
size = strlen(key) + 1;
if (size > len) {
- SAFE_FREE(ip_list);
+ free(ip_list);
return NSD_ERROR;
}
strncat(response,key,size);
strncat(response,"\n",1);
found = True;
- SAFE_FREE(ip_list);
+ free(ip_list);
}
}
@@ -310,7 +311,8 @@ _nss_wins_gethostbyname_r(const char *name, struct hostent *he,
host_addresses++;
}
- SAFE_FREE(ip_list);
+ if (ip_list)
+ free(ip_list);
memcpy(buffer, name, namelen);
he->h_name = buffer;
@@ -318,4 +320,3 @@ _nss_wins_gethostbyname_r(const char *name, struct hostent *he,
return NSS_STATUS_SUCCESS;
}
#endif
-
diff --git a/source/pam_smbpass/pam_smb_acct.c b/source/pam_smbpass/pam_smb_acct.c
index 8d91c456bf4..22f8e756581 100644
--- a/source/pam_smbpass/pam_smb_acct.c
+++ b/source/pam_smbpass/pam_smb_acct.c
@@ -45,7 +45,6 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags,
int retval;
const char *name;
- const char *p;
SAM_ACCOUNT *sampass = NULL;
extern BOOL in_client;
diff --git a/source/pam_smbpass/pam_smb_auth.c b/source/pam_smbpass/pam_smb_auth.c
index a4f784701c3..6a3e6e56598 100644
--- a/source/pam_smbpass/pam_smb_auth.c
+++ b/source/pam_smbpass/pam_smb_auth.c
@@ -47,6 +47,9 @@ do { \
static int _smb_add_user(pam_handle_t *pamh, unsigned int ctrl,
const char *name, SAM_ACCOUNT *sampass, BOOL exist);
+int make_remark(pam_handle_t *, unsigned int, int, const char *);
+
+
/*
* pam_sm_authenticate() authenticates users against the samba password file.
*
diff --git a/source/pam_smbpass/pam_smb_passwd.c b/source/pam_smbpass/pam_smb_passwd.c
index da96f375d5a..4cdf5c3e9b0 100644
--- a/source/pam_smbpass/pam_smb_passwd.c
+++ b/source/pam_smbpass/pam_smb_passwd.c
@@ -35,8 +35,7 @@
int smb_update_db( pam_handle_t *pamh, int ctrl, const char *user, char *pass_new )
{
- char c;
- int retval, i;
+ int retval;
pstring err_str;
pstring msg_str;
diff --git a/source/pam_smbpass/support.c b/source/pam_smbpass/support.c
index 3f5d52cdef2..332b54f23b7 100644
--- a/source/pam_smbpass/support.c
+++ b/source/pam_smbpass/support.c
@@ -62,6 +62,10 @@ int make_remark(pam_handle_t *, unsigned int, int, const char *);
void _cleanup(pam_handle_t *, void *, int);
char *_pam_delete(register char *);
+/* default configuration file location */
+
+pstring servicesf = CONFIGFILE;
+
/* syslogging function for errors and other information */
void _log_err( int err, const char *format, ... )
@@ -136,6 +140,9 @@ int set_ctrl( int flags, int argc, const char **argv )
/* A good, sane default (matches Samba's behavior). */
set( SMB__NONULL, ctrl );
+ /* initialize service file location */
+ service_file=servicesf;
+
if (flags & PAM_SILENT) {
set( SMB__QUIET, ctrl );
}
@@ -165,6 +172,8 @@ int set_ctrl( int flags, int argc, const char **argv )
_log_err( LOG_ERR, "Error loading service file %s", service_file );
}
+ secrets_init();
+
if (lp_null_passwords()) {
set( SMB__NULLOK, ctrl );
}
@@ -303,7 +312,7 @@ int _smb_verify_password( pam_handle_t * pamh, SAM_ACCOUNT *sampass,
uchar hash_pass[16];
uchar lm_pw[16];
uchar nt_pw[16];
- int retval;
+ int retval = PAM_AUTH_ERR;
char *data_name;
const char *name;
diff --git a/source/pam_smbpass/support.h b/source/pam_smbpass/support.h
index 01178698913..d2fe26bd048 100644
--- a/source/pam_smbpass/support.h
+++ b/source/pam_smbpass/support.h
@@ -48,3 +48,5 @@ extern int _smb_read_password( pam_handle_t *, unsigned int, char*,
extern int _pam_smb_approve_pass(pam_handle_t *, unsigned int, const char *,
const char *);
+
+extern pstring servicesf;
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index db7c5140799..ba5dbcbcf21 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -108,6 +108,7 @@ typedef struct
char *szDeletePrinterCommand;
char *szOs2DriverMap;
char *szLockDir;
+ char *szPidDir;
char *szRootdir;
char *szDefaultService;
char *szDfree;
@@ -170,6 +171,7 @@ typedef struct
char *szWinbindSeparator;
BOOL bWinbindEnumUsers;
BOOL bWinbindEnumGroups;
+ BOOL bWinbindUseDefaultDomain;
char *szAddShareCommand;
char *szChangeShareCommand;
char *szDeleteShareCommand;
@@ -208,6 +210,8 @@ typedef struct
int min_passwd_length;
int oplock_break_wait_time;
int winbind_cache_time;
+ int iLockSpinCount;
+ int iLockSpinTime;
#ifdef WITH_LDAP_SAM
int ldap_port;
int ldap_ssl;
@@ -257,6 +261,7 @@ typedef struct
BOOL bReadPrediction;
BOOL bReadbmpx;
BOOL bSyslogOnly;
+ BOOL bAdminLog;
BOOL bBrowseList;
BOOL bNISHomeMap;
BOOL bTimeServer;
@@ -267,6 +272,7 @@ typedef struct
BOOL bTimestampLogs;
BOOL bNTSmbSupport;
BOOL bNTPipeSupport;
+ BOOL bNTStatusSupport;
BOOL bStatCache;
BOOL bKernelOplocks;
BOOL bAllowTrustedDomains;
@@ -351,6 +357,7 @@ typedef struct
int iDefaultCase;
int iPrinting;
int iOplockContentionLimit;
+ int iCSCPolicy;
BOOL bAlternatePerm;
BOOL bPreexecClose;
BOOL bRootpreexecClose;
@@ -396,6 +403,7 @@ typedef struct
BOOL bFakeDirCreateTimes;
BOOL bBlockingLocks;
BOOL bInheritPerms;
+ BOOL bInheritACLS;
BOOL bMSDfsRoot;
BOOL bUseClientDriver;
BOOL bDefaultDevmode;
@@ -468,6 +476,7 @@ static service sDefault = {
CASE_LOWER, /* iDefaultCase */
DEFAULT_PRINTING, /* iPrinting */
2, /* iOplockContentionLimit */
+ 0, /* iCSCPolicy */
False, /* bAlternatePerm */
False, /* bPreexecClose */
False, /* bRootpreexecClose */
@@ -513,6 +522,7 @@ static service sDefault = {
False, /* bFakeDirCreateTimes */
True, /* bBlockingLocks */
False, /* bInheritPerms */
+ False, /* bInheritACLS */
False, /* bMSDfsRoot */
False, /* bUseClientDriver */
False, /* bDefaultDevmode */
@@ -521,8 +531,6 @@ static service sDefault = {
"" /* dummy */
};
-
-
/* local variables */
static service **ServicePtrs = NULL;
static int iNumServices = 0;
@@ -637,6 +645,19 @@ static struct enum_list enum_bool_auto[] = {
{-1, NULL}
};
+/* Client-side offline caching policy types */
+#define CSC_POLICY_MANUAL 0
+#define CSC_POLICY_DOCUMENTS 1
+#define CSC_POLICY_PROGRAMS 2
+#define CSC_POLICY_DISABLE 3
+
+static struct enum_list enum_csc_policy[] = {
+ {CSC_POLICY_MANUAL, "manual"},
+ {CSC_POLICY_DOCUMENTS, "documents"},
+ {CSC_POLICY_PROGRAMS, "programs"},
+ {CSC_POLICY_DISABLE, "disable"}
+};
+
/*
Do you want session setups at user level security with a invalid
password to be rejected or allowed in as guest? WinNT rejects them
@@ -759,6 +780,7 @@ static struct parm_struct parm_table[] = {
{"directory security mask", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_mask, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE},
{"force directory security mode", P_OCTAL, P_LOCAL, &sDefault.iDir_Security_force_mode, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE},
{"inherit permissions", P_BOOL, P_LOCAL, &sDefault.bInheritPerms, NULL, NULL, FLAG_SHARE},
+ {"inherit acls", P_BOOL, P_LOCAL, &sDefault.bInheritACLS, NULL, NULL, FLAG_SHARE},
{"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_SHARE},
{"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, 0},
@@ -794,6 +816,8 @@ static struct parm_struct parm_table[] = {
#endif /* WITH_SSL */
{"Logging Options", P_SEP, P_SEPARATOR},
+
+ {"admin log", P_BOOL, P_GLOBAL, &Globals.bAdminLog, NULL, NULL, 0},
{"log level", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0},
{"debuglevel", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0},
{"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0},
@@ -821,7 +845,8 @@ static struct parm_struct parm_table[] = {
{"nt smb support", P_BOOL, P_GLOBAL, &Globals.bNTSmbSupport, NULL, NULL, 0},
{"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0},
- {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, 0},
+ {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE },
+ {"nt status support", P_BOOL, P_GLOBAL, &Globals.bNTStatusSupport, NULL, NULL, 0 },
{"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL, NULL, 0},
{"announce as", P_ENUM, P_GLOBAL, &Globals.announce_as, NULL, enum_announce_as, 0},
{"max mux", P_INTEGER, P_GLOBAL, &Globals.max_mux, NULL, NULL, 0},
@@ -964,9 +989,12 @@ static struct parm_struct parm_table[] = {
{"Locking Options", P_SEP, P_SEPARATOR},
{"blocking locks", P_BOOL, P_LOCAL, &sDefault.bBlockingLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL},
+ {"csc policy", P_ENUM, P_LOCAL, &sDefault.iCSCPolicy, NULL, enum_csc_policy, FLAG_SHARE | FLAG_GLOBAL},
{"fake oplocks", P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, FLAG_SHARE},
{"kernel oplocks", P_BOOL, P_GLOBAL, &Globals.bKernelOplocks, NULL, NULL, FLAG_GLOBAL},
{"locking", P_BOOL, P_LOCAL, &sDefault.bLocking, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL},
+ {"lock spin count", P_INTEGER, P_GLOBAL, &Globals.iLockSpinCount, NULL, NULL, FLAG_GLOBAL},
+ {"lock spin time", P_INTEGER, P_GLOBAL, &Globals.iLockSpinTime, NULL, NULL, FLAG_GLOBAL},
{"oplocks", P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL},
{"level2 oplocks", P_BOOL, P_LOCAL, &sDefault.bLevel2OpLocks, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL},
@@ -997,6 +1025,8 @@ static struct parm_struct parm_table[] = {
{"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_DOS_STRING},
{"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0},
{"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0},
+ {"pid dir", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, 0},
+ {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, 0},
#ifdef WITH_UTMP
{"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 0},
{"wtmp directory", P_STRING, P_GLOBAL, &Globals.szWtmpDir, NULL, NULL, 0},
@@ -1046,14 +1076,17 @@ static struct parm_struct parm_table[] = {
{"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL,
NULL, 0},
- {"VFS options", P_SEP, P_SEPARATOR},
+ {"VFS module options", P_SEP, P_SEPARATOR},
{"vfs object", P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE},
{"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE},
-
+#ifdef WITH_MSDFS
+ {"MSDfs options", P_SEP, P_SEPARATOR},
+
{"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE},
{"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 0},
+#endif
{"Winbind options", P_SEP, P_SEPARATOR},
@@ -1065,6 +1098,7 @@ static struct parm_struct parm_table[] = {
{"winbind cache time", P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0},
{"winbind enum users", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, 0},
{"winbind enum groups", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumGroups, NULL, NULL, 0},
+ {"winbind use default domain", P_BOOL, P_GLOBAL, &Globals.bWinbindUseDefaultDomain, NULL, NULL, 0},
{NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0}
};
@@ -1231,6 +1265,7 @@ static void init_globals(void)
string_set(&Globals.szPasswdProgram, PASSWD_PROGRAM);
string_set(&Globals.szPrintcapname, PRINTCAP_NAME);
string_set(&Globals.szLockDir, LOCKDIR);
+ string_set(&Globals.szPidDir, PIDDIR);
#ifdef WITH_UTMP
string_set(&Globals.szUtmpDir, "");
string_set(&Globals.szWtmpDir, "");
@@ -1284,6 +1319,7 @@ static void init_globals(void)
Globals.bStripDot = False;
Globals.syslog = 1;
Globals.bSyslogOnly = False;
+ Globals.bAdminLog = False;
Globals.bTimestampLogs = True;
Globals.bDebugHiresTimestamp = False;
Globals.bDebugPid = False;
@@ -1315,12 +1351,15 @@ static void init_globals(void)
Globals.bNTSmbSupport = True; /* Do NT SMB's by default. */
Globals.bNTPipeSupport = True; /* Do NT pipes by default. */
Globals.bStatCache = True; /* use stat cache by default */
+ Globals.bNTStatusSupport = True; /* Use NT status by default. */
Globals.bRestrictAnonymous = False;
Globals.bLanmanAuth = True; /* Do use the LanMan hash if it is available */
Globals.map_to_guest = 0; /* By Default, "Never" */
Globals.min_passwd_length = MINPASSWDLENGTH; /* By Default, 5. */
Globals.oplock_break_wait_time = 0; /* By Default, 0 msecs. */
Globals.enhanced_browsing = True;
+ Globals.iLockSpinCount = 3; /* Try 2 times. */
+ Globals.iLockSpinTime = 10; /* usec. */
#ifdef MMAP_BLACKLIST
Globals.bUseMmap = False;
#else
@@ -1392,6 +1431,9 @@ static void init_globals(void)
Globals.bWinbindEnumUsers = True;
Globals.bWinbindEnumGroups = True;
+ Globals.bWinbindUseDefaultDomain = False;
+
+ Globals.bHostMSDfs = False;
/*
* This must be done last as it checks the value in
@@ -1460,6 +1502,8 @@ static char *lp_string(const char *s)
#define FN_LOCAL_STRING(fn_name,val) \
char *fn_name(int i) {return(lp_string((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val));}
+#define FN_LOCAL_CONST_STRING(fn_name,val) \
+ const char *fn_name(int i) {return(const char *)((LP_SNUM_OK(i) && ServicePtrs[(i)]->val) ? ServicePtrs[(i)]->val : sDefault.val);}
#define FN_LOCAL_BOOL(fn_name,val) \
BOOL fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);}
#define FN_LOCAL_CHAR(fn_name,val) \
@@ -1481,6 +1525,7 @@ FN_GLOBAL_STRING(lp_addprinter_cmd, &Globals.szAddPrinterCommand)
FN_GLOBAL_STRING(lp_deleteprinter_cmd, &Globals.szDeletePrinterCommand)
FN_GLOBAL_STRING(lp_os2_driver_map, &Globals.szOs2DriverMap)
FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir)
+FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir)
#ifdef WITH_UTMP
FN_GLOBAL_STRING(lp_utmpdir, &Globals.szUtmpDir)
FN_GLOBAL_STRING(lp_wtmpdir, &Globals.szWtmpDir)
@@ -1525,6 +1570,7 @@ FN_GLOBAL_STRING(lp_template_shell, &Globals.szTemplateShell)
FN_GLOBAL_STRING(lp_winbind_separator, &Globals.szWinbindSeparator)
FN_GLOBAL_BOOL(lp_winbind_enum_users, &Globals.bWinbindEnumUsers)
FN_GLOBAL_BOOL(lp_winbind_enum_groups, &Globals.bWinbindEnumGroups)
+FN_GLOBAL_BOOL(lp_winbind_use_default_domain, &Globals.bWinbindUseDefaultDomain)
FN_GLOBAL_STRING(lp_codepagedir,&Globals.szCodePageDir)
#ifdef WITH_LDAP_SAM
FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer)
@@ -1578,6 +1624,7 @@ FN_GLOBAL_BOOL(lp_strip_dot, &Globals.bStripDot)
FN_GLOBAL_BOOL(lp_encrypted_passwords, &Globals.bEncryptPasswords)
FN_GLOBAL_BOOL(lp_update_encrypted, &Globals.bUpdateEncrypt)
FN_GLOBAL_BOOL(lp_syslog_only, &Globals.bSyslogOnly)
+FN_GLOBAL_BOOL(lp_admin_log, &Globals.bAdminLog)
FN_GLOBAL_BOOL(lp_timestamp_logs, &Globals.bTimestampLogs)
FN_GLOBAL_BOOL(lp_debug_hires_timestamp, &Globals.bDebugHiresTimestamp)
FN_GLOBAL_BOOL(lp_debug_pid, &Globals.bDebugPid)
@@ -1591,6 +1638,7 @@ FN_GLOBAL_BOOL(lp_unix_password_sync, &Globals.bUnixPasswdSync)
FN_GLOBAL_BOOL(lp_passwd_chat_debug, &Globals.bPasswdChatDebug)
FN_GLOBAL_BOOL(lp_nt_smb_support, &Globals.bNTSmbSupport)
FN_GLOBAL_BOOL(lp_nt_pipe_support, &Globals.bNTPipeSupport)
+FN_GLOBAL_BOOL(lp_nt_status_support, &Globals.bNTStatusSupport)
FN_GLOBAL_BOOL(lp_stat_cache, &Globals.bStatCache)
FN_GLOBAL_BOOL(lp_allow_trusted_domains, &Globals.bAllowTrustedDomains)
FN_GLOBAL_BOOL(lp_restrict_anonymous, &Globals.bRestrictAnonymous)
@@ -1631,11 +1679,14 @@ FN_GLOBAL_INTEGER(lp_stat_cache_size, &Globals.stat_cache_size)
FN_GLOBAL_INTEGER(lp_map_to_guest, &Globals.map_to_guest)
FN_GLOBAL_INTEGER(lp_min_passwd_length, &Globals.min_passwd_length)
FN_GLOBAL_INTEGER(lp_oplock_break_wait_time, &Globals.oplock_break_wait_time)
+FN_GLOBAL_INTEGER(lp_lock_spin_count, &Globals.iLockSpinCount)
+FN_GLOBAL_INTEGER(lp_lock_sleep_time, &Globals.iLockSpinTime)
FN_LOCAL_STRING(lp_preexec, szPreExec)
FN_LOCAL_STRING(lp_postexec, szPostExec)
FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec)
FN_LOCAL_STRING(lp_rootpostexec, szRootPostExec)
FN_LOCAL_STRING(lp_servicename, szService)
+FN_LOCAL_CONST_STRING(lp_const_servicename, szService)
FN_LOCAL_STRING(lp_pathname, szPath)
FN_LOCAL_STRING(lp_dontdescend, szDontdescend)
FN_LOCAL_STRING(lp_username, szUsername)
@@ -1665,6 +1716,7 @@ FN_LOCAL_STRING(lp_writelist, writelist)
FN_LOCAL_STRING(lp_printer_admin, printer_admin)
FN_LOCAL_STRING(lp_fstype, fstype)
FN_LOCAL_STRING(lp_vfsobj, szVfsObjectFile)
+FN_LOCAL_STRING(lp_vfs_options, szVfsOptions)
static FN_LOCAL_STRING(lp_volume, volume)
FN_LOCAL_STRING(lp_mangled_map, szMangledMap)
FN_LOCAL_STRING(lp_veto_files, szVetoFiles)
@@ -1714,6 +1766,7 @@ FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution)
FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes)
FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks)
FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms)
+FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS)
FN_LOCAL_BOOL(lp_use_client_driver, bUseClientDriver)
FN_LOCAL_BOOL(lp_default_devmode, bDefaultDevmode)
FN_LOCAL_BOOL(lp_nt_acl_support, bNTAclSupport)
@@ -1731,6 +1784,7 @@ FN_LOCAL_INTEGER(lp_minprintspace, iMinPrintSpace)
FN_LOCAL_INTEGER(lp_maxprintjobs, iMaxPrintJobs)
FN_LOCAL_INTEGER(lp_printing, iPrinting)
FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit)
+FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy)
FN_LOCAL_INTEGER(lp_write_cache_size, iWriteCacheSize)
FN_LOCAL_CHAR(lp_magicchar, magic_char)
FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time)
@@ -2199,9 +2253,12 @@ static void add_to_file_list(char *fname, char *subfname)
return;
}
file_lists = f;
- }
-
- f->modtime = file_modtime(subfname);
+ f->modtime = file_modtime(subfname);
+ } else {
+ time_t t = file_modtime(subfname);
+ if (t)
+ f->modtime = t;
+ }
}
/*******************************************************************
@@ -2224,7 +2281,7 @@ BOOL lp_file_list_changed(void)
mod_time = file_modtime(n2);
- if ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0)) {
+ if (mod_time && ((f->modtime != mod_time) || (f->subfname == NULL) || (strcmp(n2, f->subfname) != 0))) {
DEBUGADD(6, ("file %s modified: %s\n", n2, ctime(&mod_time)));
f->modtime = mod_time;
SAFE_FREE(f->subfname);
@@ -2255,7 +2312,7 @@ static BOOL handle_netbios_name(char *pszParmValue, char **ptr)
* Convert from UNIX to DOS string - the UNIX to DOS converter
* isn't called on the special handlers.
*/
- unix_to_dos(netbios_name, True);
+ unix_to_dos(netbios_name);
pstrcpy(global_myname, netbios_name);
DEBUG(4,
@@ -2669,7 +2726,7 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue)
if (parm_table[parmnum].flags & FLAG_DEPRECATED)
{
- DEBUG(1, ("WARNING: The \"%s\"option is deprecated\n",
+ DEBUG(0, ("WARNING: The \"%s\"option is deprecated\n",
pszParmName));
}
@@ -2740,26 +2797,26 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue)
case P_STRING:
string_set(parm_ptr, pszParmValue);
if (parm_table[parmnum].flags & FLAG_DOS_STRING)
- unix_to_dos(*(char **)parm_ptr, True);
+ unix_to_dos(*(char **)parm_ptr);
break;
case P_USTRING:
string_set(parm_ptr, pszParmValue);
if (parm_table[parmnum].flags & FLAG_DOS_STRING)
- unix_to_dos(*(char **)parm_ptr, True);
+ unix_to_dos(*(char **)parm_ptr);
strupper(*(char **)parm_ptr);
break;
case P_GSTRING:
pstrcpy((char *)parm_ptr, pszParmValue);
if (parm_table[parmnum].flags & FLAG_DOS_STRING)
- unix_to_dos((char *)parm_ptr, True);
+ unix_to_dos((char *)parm_ptr);
break;
case P_UGSTRING:
pstrcpy((char *)parm_ptr, pszParmValue);
if (parm_table[parmnum].flags & FLAG_DOS_STRING)
- unix_to_dos((char *)parm_ptr, True);
+ unix_to_dos((char *)parm_ptr);
strupper((char *)parm_ptr);
break;
@@ -2803,7 +2860,7 @@ static BOOL do_parameter(char *pszParmName, char *pszParmValue)
/***************************************************************************
print a parameter of the specified type
***************************************************************************/
-static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(*dos_to_ext)(char *, BOOL))
+static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(*dos_to_ext)(const char *))
{
int i;
switch (p->type)
@@ -2830,6 +2887,12 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(
case P_INTEGER:
fprintf(f, "%d", *(int *)ptr);
+ if (strequal(p->label,"log level")) {
+ for (i = 1; i < DBGC_LAST; i ++) {
+ if (((int *)ptr)[i])
+ fprintf(f, ",%s:%d",debug_classname_from_index(i),((int *)ptr)[i]);
+ }
+ }
break;
case P_CHAR:
@@ -2844,7 +2907,7 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(
case P_UGSTRING:
if ((char *)ptr) {
if (p->flags & FLAG_DOS_STRING)
- fprintf(f, "%s", dos_to_ext((char *)ptr, False));
+ fprintf(f, "%s", dos_to_ext((const char *)ptr));
else
fprintf(f, "%s", (char *)ptr);
}
@@ -2854,7 +2917,7 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f, char *(
case P_USTRING:
if (*(char **)ptr) {
if(p->flags & FLAG_DOS_STRING)
- fprintf(f,"%s",dos_to_ext(*(char **)ptr, False));
+ fprintf(f,"%s",dos_to_ext((const char *)*(const char **)ptr));
else
fprintf(f, "%s", *(char **)ptr);
}
@@ -3012,7 +3075,7 @@ static BOOL is_default(int i)
/***************************************************************************
Display the contents of the global structure.
***************************************************************************/
-static void dump_globals(FILE *f, char *(*dos_to_ext)(char *, BOOL))
+static void dump_globals(FILE *f, char *(*dos_to_ext)(const char *))
{
int i;
fprintf(f, "# Global parameters\n[global]\n");
@@ -3046,7 +3109,7 @@ BOOL lp_is_default(int snum, struct parm_struct *parm)
/***************************************************************************
Display the contents of a single services record.
***************************************************************************/
-static void dump_a_service(service * pService, FILE * f, char *(*dos_to_ext)(char *, BOOL))
+static void dump_a_service(service * pService, FILE * f, char *(*dos_to_ext)(const char *))
{
int i;
if (pService != &sDefault)
@@ -3222,7 +3285,7 @@ void lp_add_one_printer(char *name, char *comment)
lp_add_printer(name, printers);
if ((i = lp_servicenumber(name)) >= 0) {
string_set(&ServicePtrs[i]->comment, comment);
- unix_to_dos(ServicePtrs[i]->comment, True);
+ unix_to_dos(ServicePtrs[i]->comment);
ServicePtrs[i]->autoloaded = True;
}
}
@@ -3321,42 +3384,34 @@ static void set_server_role(void)
{
server_role = ROLE_STANDALONE;
- switch (lp_security())
- {
+ switch (lp_security()) {
case SEC_SHARE:
- {
if (lp_domain_logons())
- {
- DEBUG(0,
- ("Server's Role (logon server) conflicts with share-level security\n"));
- }
+ DEBUG(0, ("Server's Role (logon server) conflicts with share-level security\n"));
+ DEBUG(10,("set_server_role: ROLE_STANDALONE\n"));
break;
- }
case SEC_SERVER:
case SEC_DOMAIN:
- {
- if (lp_domain_logons())
- {
+ if (lp_domain_logons()) {
server_role = ROLE_DOMAIN_BDC;
+ DEBUG(10,("set_server_role: ROLE_DOMAIN_BDC\n"));
break;
}
server_role = ROLE_DOMAIN_MEMBER;
+ DEBUG(10,("set_server_role: ROLE_DOMAIN_MEMBER\n"));
break;
- }
case SEC_USER:
- {
- if (lp_domain_logons())
- {
+ if (lp_domain_logons()) {
server_role = ROLE_DOMAIN_PDC;
+ DEBUG(10,("set_server_role: ROLE_DOMAIN_PDC\n"));
break;
}
+ DEBUG(10,("set_server_role: ROLE_STANDALONE\n"));
break;
- }
default:
- {
- DEBUG(0,
- ("Server's Role undefined due to unknown security mode\n"));
- }
+ DEBUG(0, ("Server's Role undefined due to unknown security mode\n"));
+ DEBUG(10,("set_server_role: ROLE_STANDALONE\n"));
+ break;
}
}
@@ -3447,7 +3502,7 @@ int lp_numservices(void)
/***************************************************************************
Display the contents of the services array in human-readable form.
***************************************************************************/
-void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(char *, BOOL))
+void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(const char *))
{
int iService;
@@ -3467,7 +3522,7 @@ void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(ch
/***************************************************************************
Display the contents of one service in human-readable form.
***************************************************************************/
-void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(char *, BOOL))
+void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(const char *))
{
if (VALID(snum))
{
@@ -3773,5 +3828,23 @@ void lp_set_logfile(const char *name)
const char *get_called_name(void)
{
extern fstring local_machine;
- return (*local_machine) ? local_machine : global_myname;
+ static fstring called_name;
+
+ if (! *local_machine)
+ return global_myname;
+
+ /*
+ * Windows NT/2k uses "*SMBSERVER" and XP uses "*SMBSERV"
+ */
+
+ if (*local_machine) {
+ if (!StrCaseCmp(local_machine, "*SMBSERVER") || !StrCaseCmp(local_machine, "*SMBSERV")) {
+ fstrcpy(called_name, get_my_primary_ip());
+ DEBUG(8,("get_called_name: assuming that client used IP address [%s] as called name.\n",
+ called_name));
+ return called_name;
+ }
+ }
+
+ return local_machine;
}
diff --git a/source/param/params.c b/source/param/params.c
index a7d50601768..a1f9e6bc23c 100644
--- a/source/param/params.c
+++ b/source/param/params.c
@@ -272,7 +272,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) )
DEBUG(0, ("%s Empty section name in configuration file.\n", func ));
return( False );
}
- if( !sfunc( unix_to_dos(bufr,True) ) ) /* Got a valid name. Deal with it. */
+ if( !sfunc( unix_to_dos(bufr) ) ) /* Got a valid name. Deal with it. */
return( False );
(void)EatComment( InFile ); /* Finish off the line. */
return( True );
diff --git a/source/passdb/machine_sid.c b/source/passdb/machine_sid.c
index e374b0657d6..f7ed3811b97 100644
--- a/source/passdb/machine_sid.c
+++ b/source/passdb/machine_sid.c
@@ -2,8 +2,8 @@
Unix SMB/Netbios implementation.
Version 1.9.
Password and authentication handling
- Copyright (C) Jeremy Allison 1996-1998
- Copyright (C) Luke Kenneth Casson Leighton 1996-1998
+ Copyright (C) Jeremy Allison 1996-2002
+ Copyright (C) Andrew Tridgell 2002
Copyright (C) Gerald (Jerry) Carter 2000
This program is free software; you can redistribute it and/or modify
@@ -27,29 +27,45 @@
Read the machine SID from a file.
****************************************************************************/
-static BOOL read_sid_from_file(int fd, char *sid_file)
+static BOOL read_sid_from_file(char *fname, DOM_SID *sid)
{
- fstring fline;
+ char **lines;
+ int numlines;
+ BOOL ret;
- memset(fline, '\0', sizeof(fline));
+ lines = file_lines_load(fname, &numlines, False);
- if(read(fd, fline, sizeof(fline) -1 ) < 0) {
- DEBUG(0,("unable to read file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- return False;
- }
+ if (!lines || numlines < 1) {
+ if (lines)
+ file_lines_free(lines);
+ return False;
+ }
- /*
- * Convert to the machine SID.
- */
+ ret = string_to_sid(sid, lines[0]);
+ if (!ret)
+ DEBUG(0,("read_sid_from_file: Failed to convert machine SID. (%s)\n", lines[0]));
+ file_lines_free(lines);
+ return ret;
+}
- fline[sizeof(fline)-1] = '\0';
- if(!string_to_sid( &global_sam_sid, fline)) {
- DEBUG(0,("unable to generate machine SID.\n"));
- return False;
- }
+/****************************************************************************
+ Generate a random sid - used to build our own sid if we don't have one.
+****************************************************************************/
- return True;
+static void generate_random_sid(DOM_SID *sid)
+{
+ int i;
+ unsigned char raw_sid_data[12];
+
+ memset((char *)sid, '\0', sizeof(*sid));
+ sid->sid_rev_num = 1;
+ sid->id_auth[5] = 5;
+ sid->num_auths = 0;
+ sid->sub_auths[sid->num_auths++] = 21;
+
+ generate_random_buffer(raw_sid_data, 12, True);
+ for (i = 0; i < 3; i++)
+ sid->sub_auths[sid->num_auths++] = IVAL(raw_sid_data, i*4);
}
/****************************************************************************
@@ -60,196 +76,99 @@ static BOOL read_sid_from_file(int fd, char *sid_file)
BOOL pdb_generate_sam_sid(void)
{
- int fd;
- pstring sid_file;
- fstring sid_string;
- SMB_STRUCT_STAT st;
- BOOL overwrite_bad_sid = False;
+ char *fname = NULL;
+ extern pstring global_myname;
+ extern fstring global_myworkgroup;
+ BOOL is_dc = False;
+ pstring priv_dir;
generate_wellknown_sids();
- get_private_directory(sid_file);
-
- if (!directory_exist(sid_file, NULL)) {
- if (mkdir(sid_file, 0700) != 0) {
- DEBUG(0,("can't create private directory %s : %s\n",
- sid_file, strerror(errno)));
- return False;
- }
+ switch (lp_server_role()) {
+ case ROLE_DOMAIN_PDC:
+ case ROLE_DOMAIN_BDC:
+ is_dc = True;
+ break;
+ default:
+ is_dc = False;
+ break;
}
- pstrcat(sid_file, "/MACHINE.SID");
-
- if((fd = sys_open(sid_file, O_RDWR | O_CREAT, 0644)) == -1) {
- DEBUG(0,("unable to open or create file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- return False;
- }
-
- /*
- * Check if the file contains data.
- */
-
- if(sys_fstat( fd, &st) < 0) {
- DEBUG(0,("unable to stat file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- close(fd);
- return False;
- }
-
- if(st.st_size > 0) {
- /*
- * We have a valid SID - read it.
- */
- if(!read_sid_from_file( fd, sid_file)) {
- DEBUG(0,("unable to read file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- close(fd);
- return False;
+ if (secrets_fetch_domain_sid(global_myname, &global_sam_sid)) {
+ DOM_SID domain_sid;
+
+ /* We got our sid. If not a pdc/bdc, we're done. */
+ if (!is_dc)
+ return True;
+
+ if (!secrets_fetch_domain_sid(global_myworkgroup, &domain_sid)) {
+
+ /* No domain sid and we're a pdc/bdc. Store it */
+
+ if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) {
+ DEBUG(0,("pdb_generate_sam_sid: Can't store domain SID as a pdc/bdc.\n"));
+ return False;
+ }
+ return True;
}
- /*
- * JRA. Reversed the sense of this test now that I have
- * actually done this test *personally*. One more reason
- * to never trust third party information you have not
- * independently verified.... sigh. JRA.
- */
-
- if(global_sam_sid.num_auths > 0 && global_sam_sid.sub_auths[0] == 0x21) {
- /*
- * Fix and re-write...
- */
- overwrite_bad_sid = True;
- global_sam_sid.sub_auths[0] = 21;
- DEBUG(5,("pdb_generate_sam_sid: Old (incorrect) sid id_auth of hex 21 \
-detected - re-writing to be decimal 21 instead.\n" ));
- sid_to_string(sid_string, &global_sam_sid);
- if(sys_lseek(fd, (SMB_OFF_T)0, SEEK_SET) != 0) {
- DEBUG(0,("unable to seek file file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- close(fd);
+ if (!sid_equal(&domain_sid, &global_sam_sid)) {
+
+ /* Domain name sid doesn't match global sam sid. Re-store global sam sid as domain sid. */
+
+ DEBUG(0,("pdb_generate_sam_sid: Mismatched SIDs as a pdc/bdc.\n"));
+ if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) {
+ DEBUG(0,("pdb_generate_sam_sid: Can't re-store domain SID as a pdc/bdc.\n"));
return False;
}
- } else {
- close(fd);
return True;
}
- } else {
- /*
- * The file contains no data - we need to generate our
- * own sid.
- * Generate the new sid data & turn it into a string.
- */
- int i;
- uchar raw_sid_data[12];
- DOM_SID mysid;
-
- memset((char *)&mysid, '\0', sizeof(DOM_SID));
- mysid.sid_rev_num = 1;
- mysid.id_auth[5] = 5;
- mysid.num_auths = 0;
- mysid.sub_auths[mysid.num_auths++] = 21;
-
- generate_random_buffer( raw_sid_data, 12, True);
- for( i = 0; i < 3; i++)
- mysid.sub_auths[mysid.num_auths++] = IVAL(raw_sid_data, i*4);
-
- sid_to_string(sid_string, &mysid);
- }
-
- fstrcat(sid_string, "\n");
-
- /*
- * Ensure our new SID is valid.
- */
-
- if(!string_to_sid( &global_sam_sid, sid_string)) {
- DEBUG(0,("unable to generate machine SID.\n"));
- return False;
- }
-
- /*
- * Do an exclusive blocking lock on the file.
- */
-
- if(!do_file_lock( fd, 60, F_WRLCK)) {
- DEBUG(0,("unable to lock file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- close(fd);
- return False;
- }
-
- if(!overwrite_bad_sid) {
- /*
- * At this point we have a blocking lock on the SID
- * file - check if in the meantime someone else wrote
- * SID data into the file. If so - they were here first,
- * use their data.
- */
-
- if(sys_fstat( fd, &st) < 0) {
- DEBUG(0,("unable to stat file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- close(fd);
+
+ return True;
+ }
+
+ /* check for an old MACHINE.SID file for backwards compatibility */
+ get_private_directory(priv_dir);
+ asprintf(&fname, "%s/MACHINE.SID", priv_dir);
+
+ if (read_sid_from_file(fname, &global_sam_sid)) {
+ /* remember it for future reference and unlink the old MACHINE.SID */
+ if (!secrets_store_domain_sid(global_myname, &global_sam_sid)) {
+ DEBUG(0,("pdb_generate_sam_sid: Failed to store SID from file.\n"));
+ SAFE_FREE(fname);
return False;
- }
-
- if(st.st_size > 0) {
- /*
- * Unlock as soon as possible to reduce
- * contention on the exclusive lock.
- */
- do_file_lock( fd, 60, F_UNLCK);
-
- /*
- * We have a valid SID - read it.
- */
-
- if(!read_sid_from_file( fd, sid_file)) {
- DEBUG(0,("unable to read file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- close(fd);
+ }
+ unlink(fname);
+ if (is_dc) {
+ if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) {
+ DEBUG(0,("pdb_generate_sam_sid: Failed to store domain SID from file.\n"));
+ SAFE_FREE(fname);
return False;
}
- close(fd);
- return True;
- }
+ }
+
+ /* Stored the old sid from MACHINE.SID successfully.
+ Patch from Stefan "metze" Metzmacher <metze@metzemix.de>*/
+ SAFE_FREE(fname);
+ return True;
}
-
- /*
- * The file is still empty and we have an exlusive lock on it,
- * or we're fixing an earlier mistake.
- * Write out out SID data into the file.
- */
-
- /*
- * Use chmod here as some (strange) UNIX's don't
- * have fchmod. JRA.
- */
-
- if(chmod(sid_file, 0644) < 0) {
- DEBUG(0,("unable to set correct permissions on file %s. \
-Error was %s\n", sid_file, strerror(errno) ));
- do_file_lock( fd, 60, F_UNLCK);
- close(fd);
- return False;
- }
-
- if(write( fd, sid_string, strlen(sid_string)) != strlen(sid_string)) {
- DEBUG(0,("unable to write file %s. Error was %s\n",
- sid_file, strerror(errno) ));
- do_file_lock( fd, 60, F_UNLCK);
- close(fd);
- return False;
- }
-
- /*
- * Unlock & exit.
- */
-
- do_file_lock( fd, 60, F_UNLCK);
- close(fd);
- return True;
-}
+ SAFE_FREE(fname);
+
+ /* we don't have the SID in secrets.tdb, we will need to
+ generate one and save it */
+ generate_random_sid(&global_sam_sid);
+ if (!secrets_store_domain_sid(global_myname, &global_sam_sid)) {
+ DEBUG(0,("pdb_generate_sam_sid: Failed to store generated machine SID.\n"));
+ return False;
+ }
+ if (is_dc) {
+ if (!secrets_store_domain_sid(global_myworkgroup, &global_sam_sid)) {
+ DEBUG(0,("pdb_generate_sam_sid: Failed to store generated domain SID.\n"));
+ return False;
+ }
+ }
+
+ return True;
+}
diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c
index fd2a678a268..a043a355347 100644
--- a/source/passdb/passdb.c
+++ b/source/passdb/passdb.c
@@ -481,14 +481,12 @@ BOOL local_lookup_rid(uint32 rid, char *name, enum SID_NAME_USE *psid_name_use)
if(is_user) {
if(rid == DOMAIN_USER_RID_ADMIN) {
- pstring admin_users;
- char *p = admin_users;
+ char *p = lp_admin_users(-1);
*psid_name_use = SID_NAME_USER;
if(!next_token(&p, name, NULL, sizeof(fstring)))
fstrcpy(name, "Administrator");
} else if (rid == DOMAIN_USER_RID_GUEST) {
- pstring guest_users;
- char *p = guest_users;
+ char *p = lp_guestaccount(-1);
*psid_name_use = SID_NAME_USER;
if(!next_token(&p, name, NULL, sizeof(fstring)))
fstrcpy(name, "Guest");
@@ -938,6 +936,7 @@ account without a valid local system user.\n", user_name);
} else {
/* the entry already existed */
local_flags &= ~LOCAL_ADD_USER;
+ slprintf(msg_str, msg_str_len-1, "Password changed for user %s.\n", user_name );
}
/*
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index 3b7b8123eb6..a747ca40b1b 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -56,6 +56,7 @@ struct ldap_enum_info {
LDAP *ldap_struct;
LDAPMessage *result;
LDAPMessage *entry;
+ int index;
};
static struct ldap_enum_info global_ldap_ent;
@@ -580,7 +581,6 @@ Initialize SAM_ACCOUNT from an LDAP query
static BOOL init_ldap_from_sam (LDAPMod *** mods, int ldap_state, SAM_ACCOUNT * sampass)
{
pstring temp;
- uint32 i;
*mods = NULL;
@@ -706,6 +706,7 @@ BOOL pdb_setsampwent(BOOL update)
global_ldap_ent.entry = ldap_first_entry(global_ldap_ent.ldap_struct,
global_ldap_ent.result);
+ global_ldap_ent.index = -1;
return True;
}
@@ -732,8 +733,11 @@ BOOL pdb_getsampwent(SAM_ACCOUNT * user)
if (!global_ldap_ent.entry)
return False;
- global_ldap_ent.entry = ldap_next_entry(global_ldap_ent.ldap_struct,
- global_ldap_ent.entry);
+ global_ldap_ent.index++;
+ if (global_ldap_ent.index > 0)
+ {
+ global_ldap_ent.entry = ldap_next_entry(global_ldap_ent.ldap_struct, global_ldap_ent.entry);
+ }
if (global_ldap_ent.entry != NULL)
{
diff --git a/source/passdb/pdb_nisplus.c b/source/passdb/pdb_nisplus.c
index 3648fb0341a..f9b15918b7d 100644
--- a/source/passdb/pdb_nisplus.c
+++ b/source/passdb/pdb_nisplus.c
@@ -299,14 +299,14 @@ static BOOL make_sam_from_nisp_object(SAM_ACCOUNT *pw_buf, nis_object *obj)
/* pdb_set_nt_username() -- cant set it here... */
get_single_attribute(obj, NPF_FULL_NAME, full_name, sizeof(pstring));
- unix_to_dos(full_name, True);
+ unix_to_dos(full_name);
pdb_set_fullname(pw_buf, full_name);
pdb_set_acct_ctrl(pw_buf, pdb_decode_acct_ctrl(ENTRY_VAL(obj,
NPF_ACB)));
get_single_attribute(obj, NPF_ACCT_DESC, acct_desc, sizeof(pstring));
- unix_to_dos(acct_desc, True);
+ unix_to_dos(acct_desc);
pdb_set_acct_desc(pw_buf, acct_desc);
pdb_set_workstations(pw_buf, ENTRY_VAL(obj, NPF_WORKSTATIONS));
@@ -343,7 +343,7 @@ static BOOL make_sam_from_nisp_object(SAM_ACCOUNT *pw_buf, nis_object *obj)
get_single_attribute(obj, NPF_LOGON_SCRIPT, logon_script,
sizeof(pstring));
if( !(logon_script && *logon_script) ) {
- pstrcpy(logon_script, lp_logon_script(), False);
+ pstrcpy(logon_script, lp_logon_script());
}
else
pdb_set_logon_script(pw_buf, logon_script, True);
@@ -532,9 +532,9 @@ static BOOL init_nisp_from_sam(nis_object *obj, SAM_ACCOUNT *sampass,
slprintf(pwdmchg_t, 13, "MCT-%08X",
(uint32)pdb_get_pass_must_change_time(sampass));
safe_strcpy(full_name, pdb_get_fullname(sampass), sizeof(full_name)-1);
- dos_to_unix(full_name, True);
+ dos_to_unix(full_name);
safe_strcpy(acct_desc, pdb_get_acct_desc(sampass), sizeof(acct_desc)-1);
- dos_to_unix(acct_desc, True);
+ dos_to_unix(acct_desc);
if( old ) {
/* name */
@@ -858,7 +858,7 @@ static BOOL init_nisp_from_sam(nis_object *obj, SAM_ACCOUNT *sampass,
/***************************************************************
calls nis_list, returns results.
****************************************************************/
-static nis_result *nisp_get_nis_list(char *nis_name, uint_t flags)
+static nis_result *nisp_get_nis_list(char *nis_name, unsigned int flags)
{
nis_result *result;
int i;
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c
index 2af118d4061..58143977e08 100644
--- a/source/passdb/pdb_tdb.c
+++ b/source/passdb/pdb_tdb.c
@@ -549,6 +549,7 @@ BOOL pdb_getsampwnam (SAM_ACCOUNT *user, char *sname)
strlower(name);
get_private_directory(tdbfile);
+ pstrcat(tdbfile, "/");
pstrcat(tdbfile, PASSDB_FILE_NAME);
/* set search key */
diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c
index ad29bb23b0f..2700c2a0eb2 100644
--- a/source/passdb/secrets.c
+++ b/source/passdb/secrets.c
@@ -94,6 +94,7 @@ BOOL secrets_store_domain_sid(char *domain, DOM_SID *sid)
fstring key;
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
+ strupper(key);
return secrets_store(key, sid, sizeof(DOM_SID));
}
@@ -104,7 +105,8 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid)
size_t size;
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ strupper(key);
+ dos_to_unix(key); /* Convert key to unix-codepage */
dyn_sid = (DOM_SID *)secrets_fetch(key, &size);
if (dyn_sid == NULL)
@@ -131,11 +133,12 @@ char *trust_keystr(char *domain)
fstring dos_domain;
fstrcpy(dos_domain, domain);
- unix_to_dos(dos_domain, True);
+ unix_to_dos(dos_domain);
slprintf(keystr,sizeof(keystr)-1,"%s/%s",
SECRETS_MACHINE_ACCT_PASS, dos_domain);
+ strupper(keystr);
return keystr;
}
diff --git a/source/printing/lpq_parse.c b/source/printing/lpq_parse.c
index edb56f49be4..26f84572c67 100644
--- a/source/printing/lpq_parse.c
+++ b/source/printing/lpq_parse.c
@@ -3,6 +3,7 @@
Version 3.0
lpq parsing routines
Copyright (C) Andrew Tridgell 2000
+ Copyright (C) 2002 by Martin Pool
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
@@ -146,25 +147,21 @@ static BOOL parse_lpq_bsd(char *line,print_queue_struct *buf,BOOL first)
buf->size = atoi(tok[TOTALTOK]);
buf->status = strequal(tok[RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED;
buf->time = time(NULL);
- StrnCpy(buf->user,tok[USERTOK],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[FILETOK],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user,tok[USERTOK]);
+ fstrcpy(buf->fs_file,tok[FILETOK]);
if ((FILETOK + 1) != TOTALTOK) {
- int bufsize;
int i;
- bufsize = sizeof(buf->file) - strlen(buf->file) - 1;
-
for (i = (FILETOK + 1); i < TOTALTOK; i++) {
- safe_strcat(buf->file," ",bufsize);
- safe_strcat(buf->file,tok[i],bufsize - 1);
- bufsize = sizeof(buf->file) - strlen(buf->file) - 1;
- if (bufsize <= 0) {
- break;
- }
+ /* FIXME: Using fstrcat rather than other means is a bit
+ * inefficient; this might be a problem for enormous queues with
+ * many fields. */
+ fstrcat(buf->fs_file, " ");
+ fstrcat(buf->fs_file, tok[i]);
}
/* Ensure null termination. */
- buf->file[sizeof(buf->file)-1] = '\0';
+ fstrterminate(buf->fs_file);
}
#ifdef PRIOTOK
@@ -270,34 +267,30 @@ static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first)
buf->time = LPRng_time(tokarr[LPRNG_TIMETOK]);
- StrnCpy(buf->user,tokarr[LPRNG_USERTOK],sizeof(buf->user)-1);
+ fstrcpy(buf->fs_user,tokarr[LPRNG_USERTOK]);
/* The '@hostname' prevents windows from displaying the printing icon
* for the current user on the taskbar. Plop in a null.
*/
- if ((cptr = strchr(buf->user,'@')) != NULL) {
+ if ((cptr = strchr(buf->fs_user,'@')) != NULL) {
*cptr = '\0';
}
- StrnCpy(buf->file,tokarr[LPRNG_FILETOK],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_file,tokarr[LPRNG_FILETOK]);
if ((LPRNG_FILETOK + 1) != LPRNG_TOTALTOK) {
- int bufsize;
int i;
- bufsize = sizeof(buf->file) - strlen(buf->file) - 1;
-
for (i = (LPRNG_FILETOK + 1); i < LPRNG_TOTALTOK; i++) {
- safe_strcat(buf->file," ",bufsize);
- safe_strcat(buf->file,tokarr[i],bufsize - 1);
- bufsize = sizeof(buf->file) - strlen(buf->file) - 1;
- if (bufsize <= 0) {
- break;
- }
+ /* FIXME: Using fstrcat rather than other means is a bit
+ * inefficient; this might be a problem for enormous queues with
+ * many fields. */
+ fstrcat(buf->fs_file, " ");
+ fstrcat(buf->fs_file, tokarr[i]);
}
/* Ensure null termination. */
- buf->file[sizeof(buf->file)-1] = '\0';
+ fstrterminate(buf->fs_file);
}
return(True);
@@ -360,8 +353,8 @@ static BOOL parse_lpq_aix(char *line,print_queue_struct *buf,BOOL first)
buf->status = strequal(tok[0],"HELD")?LPQ_PAUSED:LPQ_QUEUED;
buf->priority = 0;
buf->time = time(NULL);
- StrnCpy(buf->user,tok[3],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[2],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user, tok[3]);
+ fstrcpy(buf->fs_file, tok[2]);
}
else
{
@@ -394,8 +387,8 @@ static BOOL parse_lpq_aix(char *line,print_queue_struct *buf,BOOL first)
buf->status = strequal(tok[2],"RUNNING")?LPQ_PRINTING:LPQ_QUEUED;
buf->priority = 0;
buf->time = time(NULL);
- StrnCpy(buf->user,tok[5],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[4],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user, tok[5]);
+ fstrcpy(buf->fs_file, tok[4]);
}
@@ -456,14 +449,14 @@ static BOOL parse_lpq_hpux(char * line, print_queue_struct *buf, BOOL first)
fstrcpy(tok[0],"STDIN");
buf->size = atoi(tok[1]);
- StrnCpy(buf->file,tok[0],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_file,tok[0]);
/* fill things from header line */
buf->time = jobtime;
buf->job = jobid;
buf->status = jobstat;
buf->priority = jobprio;
- StrnCpy(buf->user,jobuser,sizeof(buf->user)-1);
+ fstrcpy(buf->fs_user, jobuser);
return(True);
}
@@ -489,7 +482,7 @@ static BOOL parse_lpq_hpux(char * line, print_queue_struct *buf, BOOL first)
/* the 2nd, 5th & 7th column must be integer */
if (!isdigit((int)*tok[1]) || !isdigit((int)*tok[4]) || !isdigit((int)*tok[6])) return(False);
jobid = atoi(tok[1]);
- StrnCpy(jobuser,tok[2],sizeof(buf->user)-1);
+ fstrcpy(jobuser, tok[2]);
jobprio = atoi(tok[4]);
/* process time */
@@ -579,8 +572,8 @@ static BOOL parse_lpq_sysv(char *line,print_queue_struct *buf,BOOL first)
buf->status = LPQ_QUEUED;
buf->priority = 0;
buf->time = EntryTime(tok, 4, count, 7);
- StrnCpy(buf->user,tok[2],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[2],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user, tok[2]);
+ fstrcpy(buf->fs_file, tok[2]);
return(True);
}
@@ -640,8 +633,8 @@ static BOOL parse_lpq_qnx(char *line,print_queue_struct *buf,BOOL first)
buf->status = strequal(tok[3],"active")?LPQ_PRINTING:LPQ_QUEUED;
buf->priority = 0;
buf->time = time(NULL);
- StrnCpy(buf->user,tok[1],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[6],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user,tok[1]);
+ fstrcpy(buf->fs_file,tok[6]);
return(True);
}
@@ -710,8 +703,8 @@ static BOOL parse_lpq_plp(char *line,print_queue_struct *buf,BOOL first)
buf->status = strequal(tok[0],"active")?LPQ_PRINTING:LPQ_QUEUED;
buf->priority = 0;
buf->time = time(NULL);
- StrnCpy(buf->user,tok[1],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[6],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user,tok[1]);
+ fstrcpy(buf->fs_file,tok[6]);
return(True);
}
@@ -767,8 +760,8 @@ static BOOL parse_lpq_softq(char *line,print_queue_struct *buf,BOOL first)
buf->job = atoi(tok[0]);
buf->size = atoi(tok[count+6]);
buf->priority = atoi(tok[count+5]);
- StrnCpy(buf->user,tok[count+7],sizeof(buf->user)-1);
- StrnCpy(buf->file,tok[count+8],sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user,tok[count+7]);
+ fstrcpy(buf->fs_file,tok[count+8]);
buf->time = time(NULL); /* default case: take current time */
{
time_t jobtime;
@@ -864,8 +857,8 @@ static BOOL parse_lpq_nt(char *line,print_queue_struct *buf,BOOL first)
buf->priority = 0;
buf->size = atoi(parse_line.size);
buf->time = time(NULL);
- StrnCpy(buf->user, parse_line.owner, sizeof(buf->user)-1);
- StrnCpy(buf->file, parse_line.jobname, sizeof(buf->file)-1);
+ fstrcpy(buf->fs_user, parse_line.owner);
+ fstrcpy(buf->fs_file, parse_line.jobname);
if (strequal(parse_line.status, LPRNT_PRINTING))
buf->status = LPQ_PRINTING;
else if (strequal(parse_line.status, LPRNT_PAUSED))
@@ -923,7 +916,7 @@ static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first)
/* Get the job name */
parse_line.space2[0] = '\0';
trim_string(parse_line.jobname, NULL, " ");
- StrnCpy(buf->file, parse_line.jobname, sizeof(buf->file)-1);
+ fstrcpy(buf->fs_file, parse_line.jobname);
buf->priority = 0;
buf->size = atoi(parse_line.size);
@@ -941,7 +934,7 @@ static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first)
!strequal(parse_line.status, LPROS2_WAITING))
return(False);
- StrnCpy(buf->user, parse_line.owner, sizeof(buf->user)-1);
+ fstrcpy(buf->fs_user, parse_line.owner);
if (strequal(parse_line.status, LPROS2_PRINTING))
buf->status = LPQ_PRINTING;
else if (strequal(parse_line.status, LPROS2_PAUSED))
@@ -987,10 +980,10 @@ static BOOL parse_lpq_vlp(char *line,print_queue_struct *buf,BOOL first)
buf->time = atoi(tok);
break;
case 4:
- fstrcpy(buf->user, tok);
+ fstrcpy(buf->fs_user, tok);
break;
case 5:
- fstrcpy(buf->file, tok);
+ fstrcpy(buf->fs_file, tok);
break;
}
toknum++;
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index dc04a2fb6eb..25f0b3dbe85 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -43,13 +43,36 @@ static TDB_CONTEXT *tdb_printers; /* used for printers files */
/* Map generic permissions to printer object specific permissions */
-struct generic_mapping printer_generic_mapping = {
+GENERIC_MAPPING printer_generic_mapping = {
PRINTER_READ,
PRINTER_WRITE,
PRINTER_EXECUTE,
PRINTER_ALL_ACCESS
};
+STANDARD_MAPPING printer_std_mapping = {
+ PRINTER_READ,
+ PRINTER_WRITE,
+ PRINTER_EXECUTE,
+ PRINTER_ALL_ACCESS
+};
+
+/* Map generic permissions to print server object specific permissions */
+
+GENERIC_MAPPING printserver_generic_mapping = {
+ SERVER_READ,
+ SERVER_WRITE,
+ SERVER_EXECUTE,
+ SERVER_ALL_ACCESS
+};
+
+STANDARD_MAPPING printserver_std_mapping = {
+ SERVER_READ,
+ SERVER_WRITE,
+ SERVER_EXECUTE,
+ SERVER_ALL_ACCESS
+};
+
/* We need one default form to support our default printer. Msoft adds the
forms it wants and in the ORDER it wants them (note: DEVMODE papersize is an
array index). Letter is always first, so (for the current code) additions
@@ -292,6 +315,12 @@ BOOL nt_printing_init(void)
update_c_setprinter(True);
+ /*
+ * register callback to handle updating printers as new
+ * drivers are installed
+ */
+ message_register(MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer);
+
return True;
}
@@ -452,7 +481,7 @@ int write_ntforms(nt_forms_struct **list, int number)
(*list)[i].bottom);
if (len > sizeof(buf)) break;
slprintf(key, sizeof(key)-1, "%s%s", FORMS_PREFIX, (*list)[i].name);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dsize = strlen(key)+1;
kbuf.dptr = key;
dbuf.dsize = len;
@@ -539,7 +568,7 @@ BOOL delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR
}
slprintf(key, sizeof(key)-1, "%s%s", FORMS_PREFIX, (*list)[n].name);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dsize = strlen(key)+1;
kbuf.dptr = key;
if (tdb_delete(tdb_forms, kbuf) != 0) {
@@ -1606,7 +1635,7 @@ static uint32 add_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver)
}
slprintf(key, sizeof(key)-1, "%s%s/%d/%s", DRIVERS_PREFIX, architecture, driver->cversion, driver->name);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
DEBUG(5,("add_a_printer_driver_3: Adding driver with key %s\n", key ));
@@ -1817,8 +1846,8 @@ uint32 get_a_printer_driver_9x_compatible(pstring line, fstring model)
DEBUGADD(10,("info3->configfile [%s]\n", info3->configfile));
/*pstrcat(line, info3->name); pstrcat(line, ":");*/
- trim_string(info3->configfile, "\\print$\\WIN40\\0\\", 0);
- pstrcat(line, info3->configfile);
+ trim_string(info3->driverpath, "\\print$\\WIN40\\0\\", 0);
+ pstrcat(line, info3->driverpath);
pstrcat(line, ":");
trim_string(info3->datafile, "\\print$\\WIN40\\0\\", 0);
pstrcat(line, info3->datafile);
@@ -1987,7 +2016,7 @@ uint32 del_a_printer(char *sharename)
TDB_DATA kbuf;
slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, sharename);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dptr=key;
kbuf.dsize=strlen(key)+1;
@@ -2083,7 +2112,7 @@ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info)
slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, info->sharename);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dptr = key;
kbuf.dsize = strlen(key)+1;
@@ -2194,10 +2223,6 @@ void free_nt_printer_param(NT_PRINTER_PARAM **param_ptr)
NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename)
{
-/*
- * should I init this ones ???
- nt_devmode->devicename
-*/
char adevice[32];
NT_DEVICEMODE *nt_devmode = (NT_DEVICEMODE *)malloc(sizeof(NT_DEVICEMODE));
@@ -2600,7 +2625,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen
ZERO_STRUCT(info);
slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, sharename);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dptr = key;
kbuf.dsize = strlen(key)+1;
@@ -2641,7 +2666,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen
slprintf(printername, sizeof(printername)-1, "\\\\%s\\%s", get_called_name(),
info.printername);
fstrcpy(info.printername, printername);
-
+
len += unpack_devicemode(&info.devmode,dbuf.dptr+len, dbuf.dsize-len);
/*
@@ -2770,8 +2795,17 @@ static uint32 rev_changeid(void)
get_process_uptime(&tv);
+#if 1 /* JERRY */
/* Return changeid as msec since spooler restart */
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
+#else
+ /*
+ * This setting seems to work well but is too untested
+ * to replace the above calculation. Left in for experiementation
+ * of the reader --jerry (Tue Mar 12 09:15:05 CST 2002)
+ */
+ return tv.tv_sec * 10 + tv.tv_usec / 100000;
+#endif
}
/*
@@ -2840,7 +2874,7 @@ WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level)
Initialize printer devmode & data with previously saved driver init values.
****************************************************************************/
-static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr)
+static BOOL set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr)
{
int len = 0;
pstring key;
@@ -2862,13 +2896,13 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr)
ZERO_STRUCT(info);
slprintf(key, sizeof(key)-1, "%s%s", DRIVER_INIT_PREFIX, info_ptr->drivername);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dptr = key;
kbuf.dsize = strlen(key)+1;
dbuf = tdb_fetch(tdb_drivers, kbuf);
- if (!dbuf.dptr) {
+ if (!dbuf.dptr) {
/*
* When changing to a driver that has no init info in the tdb, remove
* the previous drivers init info and leave the new on blank.
@@ -2889,11 +2923,49 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr)
ZERO_STRUCT(info.devmode->devicename);
fstrcpy(info.devmode->devicename, info_ptr->printername);
+
+ /*
+ * NT/2k does not change out the entire DeviceMode of a printer
+ * when changing the driver. Only the driverextra, private, &
+ * driverversion fields. --jerry (Thu Mar 14 08:58:43 CST 2002)
+ *
+ * Later e4xamination revealed that Windows NT/2k does reset the
+ * the printer's device mode, bit **only** when you change a
+ * property of the device mode such as the page orientation.
+ * --jerry
+ */
+
+#if 1 /* JERRY */
+
/*
* Bind the saved DEVMODE to the new the printer.
*/
free_nt_devicemode(&info_ptr->devmode);
info_ptr->devmode = info.devmode;
+#else
+ /* copy the entire devmode if we currently don't have one */
+
+ if (!info_ptr->devmode) {
+ DEBUG(10,("set_driver_init_2: Current Devmode is NULL. Copying entire Device Mode\n"));
+ info_ptr->devmode = info.devmode;
+ }
+ else {
+ /* only set the necessary fields */
+
+ DEBUG(10,("set_driver_init_2: Setting driverversion [0x%x] and private data [0x%x]\n",
+ info.devmode->driverversion, info.devmode->driverextra));
+
+ info_ptr->devmode->driverversion = info.devmode->driverversion;
+
+ SAFE_FREE(info_ptr->devmode->private);
+ info_ptr->devmode->private = NULL;
+
+ if (info.devmode->driverversion)
+ info_ptr->devmode->private = memdup(info.devmode->private, info.devmode->driverversion);
+
+ free_nt_devicemode(&info.devmode);
+ }
+#endif
DEBUG(10,("set_driver_init_2: Set printer [%s] init DEVMODE for driver [%s]\n",
info_ptr->printername, info_ptr->drivername));
@@ -2915,19 +2987,19 @@ static uint32 set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr)
is bound to the new printer.
****************************************************************************/
-uint32 set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
+BOOL set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
- uint32 result;
+ BOOL result = False;
- switch (level)
+ switch (level)
{
case 2:
- {
- result=set_driver_init_2(printer->info_2);
+ result = set_driver_init_2(printer->info_2);
break;
- }
+
default:
- result=1;
+ DEBUG(0,("set_driver_init: Programmer's error! Unknown driver_init level [%d]\n",
+ level));
break;
}
@@ -2973,7 +3045,7 @@ static uint32 update_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info)
}
slprintf(key, sizeof(key)-1, "%s%s", DRIVER_INIT_PREFIX, info->drivername);
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
kbuf.dptr = key;
kbuf.dsize = strlen(key)+1;
@@ -3078,7 +3150,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA
* When the DEVMODE is already set on the printer, don't try to unpack it.
*/
- if (!printer->info_2->devmode) {
+ if (!printer->info_2->devmode && param->data_len) {
/*
* Set devmode on printer info, so entire printer initialization can be
* saved to tdb.
@@ -3091,7 +3163,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARA
status = WERR_NOMEM;
goto done;
}
-
+
ZERO_STRUCTP(nt_devmode);
/*
@@ -3203,7 +3275,7 @@ WERROR get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, fstring s
break;
}
- DEBUG(10,("get_a_printer: [%s] level %u returning %s\n", sharename, (unsigned int)level, werror_str(result)));
+ DEBUG(10,("get_a_printer: [%s] level %u returning %s\n", sharename, (unsigned int)level, dos_errstr(result)));
return result;
}
@@ -3639,7 +3711,8 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
DOM_SID owner_sid;
size_t sd_size;
enum SID_NAME_USE name_type;
-
+ fstring dos_domain;
+
/* Create an ACE where Everyone is allowed to print */
init_sec_access(&sa, PRINTER_ACE_PRINT);
@@ -3649,7 +3722,14 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
/* Make the security descriptor owned by the Administrators group
on the PDC of the domain. */
- if (winbind_lookup_name(lp_workgroup(), &owner_sid, &name_type)) {
+ /* Note that for hysterical raisins, the argument to
+ secrets_fetch_domain_sid() must be in dos codepage format.
+ Aargh! */
+
+ fstrcpy(dos_domain, lp_workgroup());
+ unix_to_dos(dos_domain);
+
+ if (secrets_fetch_domain_sid(dos_domain, &owner_sid)) {
sid_append_rid(&owner_sid, DOMAIN_USER_RID_ADMIN);
} else {
@@ -3746,7 +3826,7 @@ BOOL nt_printing_getsec(TALLOC_CTX *ctx, char *printername, SEC_DESC_BUF **secde
/* Change sd owner to workgroup administrator */
- if (winbind_lookup_name(lp_workgroup(), &owner_sid,
+ if (winbind_lookup_name(NULL, lp_workgroup(), &owner_sid,
&name_type)) {
SEC_DESC_BUF *new_secdesc_ctr = NULL;
SEC_DESC *psd = NULL;
@@ -3972,6 +4052,7 @@ BOOL print_time_access_check(int snum)
return ok;
}
+#if 0 /* JERRY - not used */
/****************************************************************************
Attempt to write a default device.
*****************************************************************************/
@@ -4043,3 +4124,4 @@ WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul
free_a_printer(&printer, 2);
return result;
}
+#endif /* JERRY */
diff --git a/source/printing/pcap.c b/source/printing/pcap.c
index a2ca0b7dcb4..37de0a9ad84 100644
--- a/source/printing/pcap.c
+++ b/source/printing/pcap.c
@@ -294,7 +294,7 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
if (*line == '#' || *line == 0)
continue;
- unix_to_dos(line,True);
+ unix_to_dos(line);
/* now we have a real printer line - cut it off at the first : */
p = strchr(line,':');
@@ -381,7 +381,7 @@ void pcap_printer_fn(void (*fn)(char *, char *))
p = strchr(line,':');
if (p) *p = 0;
- unix_to_dos(line,True);
+ unix_to_dos(line);
/* now find the most likely printer name and comment
this is pure guesswork, but it's better than nothing */
diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c
index 327811dd9fe..77615dfe90f 100644
--- a/source/printing/print_cups.c
+++ b/source/printing/print_cups.c
@@ -195,9 +195,9 @@ cups_printer_fn(void (*fn)(char *, char *)) /* I - Function to call */
break;
if (info == NULL || !info[0])
- (*fn)(unix_to_dos(name,False), make_model);
+ (*fn)(unix_to_dos_static(name), make_model);
else
- (*fn)(unix_to_dos(name,False), info);
+ (*fn)(unix_to_dos_static(name), info);
}
ippDelete(response);
@@ -266,7 +266,7 @@ cups_printername_ok(char *name) /* I - Name of printer */
"requested-attributes", NULL, "printer-uri");
slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s",
- dos_to_unix(name, False));
+ dos_to_unix_static(name));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
@@ -904,8 +904,8 @@ cups_queue_get(int snum, print_queue_struct **q, print_status_struct *status)
LPQ_PRINTING;
temp->priority = job_priority;
temp->time = job_time;
- strncpy(temp->user, user_name, sizeof(temp->user) - 1);
- strncpy(temp->file, job_name, sizeof(temp->file) - 1);
+ strncpy(temp->fs_user, user_name, sizeof(temp->fs_user) - 1);
+ strncpy(temp->fs_file, job_name, sizeof(temp->fs_file) - 1);
qcount ++;
diff --git a/source/printing/print_generic.c b/source/printing/print_generic.c
index 741a4db2391..a1f94d14a83 100644
--- a/source/printing/print_generic.c
+++ b/source/printing/print_generic.c
@@ -82,7 +82,7 @@ static int print_run_command(int snum,char *command, int *outfd, ...)
standard_sub_snum(snum,syscmd);
/* Convert script args to unix-codepage */
- dos_to_unix(syscmd, True);
+ dos_to_unix(syscmd);
ret = smbrun(syscmd,outfd);
DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret));
@@ -149,6 +149,7 @@ static int generic_job_submit(int snum, struct printjob *pjob)
pstring print_directory;
char *wd, *p;
pstring jobname;
+ fstring job_page_count, job_size;
/* we print from the directory path to give the best chance of
parsing the lpq output */
@@ -167,6 +168,8 @@ static int generic_job_submit(int snum, struct printjob *pjob)
pstrcpy(jobname, pjob->jobname);
pstring_sub(jobname, "'", "_");
+ slprintf(job_page_count, sizeof(job_page_count)-1, "%d", pjob->page_count);
+ slprintf(job_size, sizeof(job_size)-1, "%d", pjob->size);
/* send it to the system spooler */
ret = print_run_command(snum,
@@ -174,6 +177,8 @@ static int generic_job_submit(int snum, struct printjob *pjob)
"%s", p,
"%J", jobname,
"%f", p,
+ "%z", job_size,
+ "%c", job_page_count,
NULL);
chdir(wd);
@@ -195,7 +200,7 @@ static int generic_queue_get(int snum, print_queue_struct **q, print_status_stru
/* Convert printer name (i.e. share name) to unix-codepage */
fstrcpy(printer_name, lp_servicename(snum));
- dos_to_unix(printer_name, True);
+ dos_to_unix(printer_name);
print_run_command(snum, lp_lpqcommand(snum), &fd, NULL);
diff --git a/source/printing/print_svid.c b/source/printing/print_svid.c
index c4c8945ea86..36446a3da7c 100644
--- a/source/printing/print_svid.c
+++ b/source/printing/print_svid.c
@@ -118,7 +118,7 @@ void sysv_printer_fn(void (*fn)(char *, char *))
if (printers == NULL)
populate_printers();
for (tmp = printers; tmp != NULL; tmp = tmp->next)
- (fn)(unix_to_dos(tmp->name,False), "");
+ (fn)(unix_to_dos_static(tmp->name), "");
}
diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c
index ea50f43d2e2..4f9b649185d 100644
--- a/source/printing/printfsp.c
+++ b/source/printing/printfsp.c
@@ -69,7 +69,6 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname)
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = False;
- fsp->stat_open = False;
fsp->directory_delete_on_close = False;
fsp->conn = conn;
string_set(&fsp->fsp_name,print_job_fname(jobid));
diff --git a/source/printing/printing.c b/source/printing/printing.c
index a1aa2ce76ed..374aca16ea9 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -53,11 +53,12 @@ BOOL print_backend_init(void)
{
char *sversion = "INFO/version";
- if (tdb && local_pid == sys_getpid()) return True;
+ if (tdb && local_pid == sys_getpid())
+ return True;
tdb = tdb_open_log(lock_path("printing.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
if (!tdb) {
- DEBUG(0,("print_backend_init: Failed to open printing backend database. Error = [%s]\n",
- tdb_errorstr(tdb)));
+ DEBUG(0,("print_backend_init: Failed to open printing backend database %s.\n",
+ lock_path("printing.tdb") ));
return False;
}
local_pid = sys_getpid();
@@ -109,6 +110,7 @@ static struct printjob *print_job_find(int jobid)
memcpy(&pjob, ret.dptr, sizeof(pjob));
SAFE_FREE(ret.dptr);
+ unix_to_dos(pjob.queuename);
return &pjob;
}
@@ -119,10 +121,14 @@ static struct printjob *print_job_find(int jobid)
static BOOL print_job_store(int jobid, struct printjob *pjob)
{
TDB_DATA d;
+ BOOL ret;
+
+ dos_to_unix(pjob->queuename);
d.dptr = (void *)pjob;
d.dsize = sizeof(*pjob);
-
- return (tdb_store(tdb, print_key(jobid), d, TDB_REPLACE) == 0);
+ ret = (tdb_store(tdb, print_key(jobid), d, TDB_REPLACE) == 0);
+ unix_to_dos(pjob->queuename);
+ return ret;
}
/****************************************************************************
@@ -166,9 +172,9 @@ static void print_unix_job(int snum, print_queue_struct *q)
pj.spooled = True;
pj.smbjob = False;
fstrcpy(pj.filename, "");
- fstrcpy(pj.jobname, q->file);
- fstrcpy(pj.user, q->user);
- fstrcpy(pj.qname, lp_servicename(snum));
+ fstrcpy(pj.jobname, q->fs_file);
+ fstrcpy(pj.user, q->fs_user);
+ fstrcpy(pj.queuename, lp_servicename(snum));
print_job_store(jobid, &pj);
}
@@ -189,8 +195,9 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void
if (data.dsize != sizeof(pjob) || key.dsize != sizeof(int)) return 0;
memcpy(&jobid, key.dptr, sizeof(jobid));
memcpy(&pjob, data.dptr, sizeof(pjob));
+ unix_to_dos(pjob.queuename);
- if (strcmp(lp_servicename(ts->snum), pjob.qname)) {
+ if (ts->snum != lp_servicenumber(pjob.queuename)) {
/* this isn't for the queue we are looking at */
ts->total_jobs++;
return 0;
@@ -222,7 +229,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void
}
for (i=0;i<ts->qcount;i++) {
- int qid = print_parse_jobid(ts->queue[i].file);
+ int qid = print_parse_jobid(ts->queue[i].fs_file);
if (jobid == qid) break;
}
@@ -259,7 +266,7 @@ static void print_cache_flush(int snum)
{
fstring key;
slprintf(key, sizeof(key)-1, "CACHE/%s", lp_servicename(snum));
- dos_to_unix(key, True); /* Convert key to unix-codepage */
+ dos_to_unix(key); /* Convert key to unix-codepage */
tdb_store_int32(tdb, key, -1);
}
@@ -318,6 +325,20 @@ static void set_updating_pid(fstring printer_name, BOOL delete)
}
/****************************************************************************
+ Send a message saying the queue changed.
+****************************************************************************/
+
+static void send_queue_message(const char *printer_name, uint32 high, uint32 low)
+{
+ char msg[8 + sizeof(fstring)];
+ SIVAL(msg,0,low);
+ SIVAL(msg,4,high);
+ fstrcpy(&msg[8], printer_name);
+
+ message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, 8 + strlen(printer_name) + 1, False, NULL);
+}
+
+/****************************************************************************
update the internal database from the system print queue for a queue
****************************************************************************/
@@ -335,7 +356,7 @@ static void print_queue_update(int snum)
/* Convert printer name (i.e. share name) to unix-codepage for all of the
* following tdb key generation */
fstrcpy(printer_name, lp_servicename(snum));
- dos_to_unix(printer_name, True);
+ dos_to_unix(printer_name);
/*
* Check to see if someone else is doing this update.
@@ -406,7 +427,7 @@ static void print_queue_update(int snum)
fill in any system job numbers as we go
*/
for (i=0; i<qcount; i++) {
- int jobid = print_parse_jobid(queue[i].file);
+ int jobid = print_parse_jobid(queue[i].fs_file);
if (jobid == -1) {
/* assume its a unix print job */
@@ -452,7 +473,7 @@ static void print_queue_update(int snum)
if( qcount != get_queue_status(snum, &old_status)) {
DEBUG(10,("print_queue_update: queue status change %d jobs -> %d jobs for printer %s\n",
old_status.qcount, qcount, printer_name ));
- message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
}
/* store the new queue status structure */
@@ -497,7 +518,7 @@ int print_job_snum(int jobid)
struct printjob *pjob = print_job_find(jobid);
if (!pjob) return -1;
- return lp_servicenumber(pjob->qname);
+ return find_service(pjob->queuename);
}
/****************************************************************************
@@ -568,6 +589,10 @@ static BOOL print_job_delete1(int jobid)
return True;
snum = print_job_snum(jobid);
+ if (snum == -1) {
+ DEBUG(5,("print_job_delete1: unknown service number for jobid %d\n", jobid));
+ return False;
+ }
/* Hrm - we need to be able to cope with deleting a job before it
has reached the spooler. */
@@ -608,10 +633,10 @@ static BOOL is_owner(struct current_user *user, int jobid)
if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
return strequal(pjob->user,
- unix_to_dos(vuser->user.smb_name,False));
+ unix_to_dos_static(vuser->user.smb_name));
} else {
return strequal(pjob->user,
- unix_to_dos(uidtoname(user->uid),False));
+ unix_to_dos_static(uidtoname(user->uid)));
}
}
@@ -624,7 +649,12 @@ BOOL print_job_delete(struct current_user *user, int jobid, WERROR *errcode)
int snum = print_job_snum(jobid);
char *printer_name;
BOOL owner;
-
+
+ if (snum == -1) {
+ DEBUG(5,("print_job_delete: unknown service number for jobid %d\n", jobid));
+ return False;
+ }
+
owner = is_owner(user, jobid);
/* Check access against security descriptor or whether the user
@@ -648,7 +678,7 @@ BOOL print_job_delete(struct current_user *user, int jobid, WERROR *errcode)
printer_name = PRINTERNAME(snum);
- message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
return !print_job_exists(jobid);
}
@@ -668,6 +698,10 @@ BOOL print_job_pause(struct current_user *user, int jobid, WERROR *errcode)
if (!pjob->spooled || pjob->sysjob == -1) return False;
snum = print_job_snum(jobid);
+ if (snum == -1) {
+ DEBUG(5,("print_job_pause: unknown service number for jobid %d\n", jobid));
+ return False;
+ }
if (!is_owner(user, jobid) &&
!print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) {
@@ -691,7 +725,7 @@ BOOL print_job_pause(struct current_user *user, int jobid, WERROR *errcode)
printer_name = PRINTERNAME(snum);
- message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
/* how do we tell if this succeeded? */
@@ -713,6 +747,10 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode)
if (!pjob->spooled || pjob->sysjob == -1) return False;
snum = print_job_snum(jobid);
+ if (snum == -1) {
+ DEBUG(5,("print_job_resume: unknown service number for jobid %d\n", jobid));
+ return False;
+ }
if (!is_owner(user, jobid) &&
!print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) {
@@ -735,7 +773,7 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode)
printer_name = PRINTERNAME(snum);
- message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
return True;
}
@@ -746,12 +784,21 @@ BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode)
int print_job_write(int jobid, const char *buf, int size)
{
- int fd;
+ int return_code;
+ struct printjob *pjob = print_job_find(jobid);
- fd = print_job_fd(jobid);
- if (fd == -1) return -1;
+ if (!pjob)
+ return -1;
+ /* don't allow another process to get this info - it is meaningless */
+ if (pjob->pid != local_pid)
+ return -1;
- return write(fd, buf, size);
+ return_code = write(pjob->fd, buf, size);
+ if (return_code>0) {
+ pjob->size += size;
+ print_job_store(jobid, pjob);
+ }
+ return return_code;
}
/****************************************************************************
@@ -761,15 +808,27 @@ int print_job_write(int jobid, const char *buf, int size)
static BOOL print_cache_expired(int snum)
{
fstring key;
- time_t t2, t = time(NULL);
+ time_t last_qscan_time, time_now = time(NULL);
- slprintf(key, sizeof(key)-1, "CACHE/%s", lp_servicename(snum));
- dos_to_unix(key, True); /* Convert key to unix-codepage */
- t2 = (time_t)tdb_fetch_int32(tdb, key);
- if (t2 == ((time_t)-1) || (t - t2) >= lp_lpqcachetime()) {
+ slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum));
+ dos_to_unix(key); /* Convert key to unix-codepage */
+ last_qscan_time = (time_t)tdb_fetch_int32(tdb, key);
+
+ /*
+ * Invalidate the queue for 3 reasons.
+ * (1). last queue scan time == -1.
+ * (2). Current time - last queue scan time > allowed cache time.
+ * (3). last queue scan time > current time + MAX_CACHE_VALID_TIME (1 hour by default).
+ * This last test picks up machines for which the clock has been moved
+ * forward, an lpq scan done and then the clock moved back. Otherwise
+ * that last lpq scan would stay around for a loooong loooong time... :-). JRA.
+ */
+
+ if (last_qscan_time == ((time_t)-1) || (time_now - last_qscan_time) >= lp_lpqcachetime() ||
+ last_qscan_time > (time_now + MAX_CACHE_VALID_TIME)) {
DEBUG(3, ("print cache expired for queue %s \
-(last_cache = %d, time now = %d, qcachetime = %d)\n", lp_servicename(snum),
- (int)t2, (int)t, (int)lp_lpqcachetime() ));
+(last_qscan_time = %d, time now = %d, qcachetime = %d)\n", lp_servicename(snum),
+ (int)last_qscan_time, (int)time_now, (int)lp_lpqcachetime() ));
return True;
}
return False;
@@ -786,7 +845,7 @@ static int get_queue_status(int snum, print_status_struct *status)
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", lp_servicename(snum));
- dos_to_unix(keystr, True); /* Convert key to unix-codepage */
+ dos_to_unix(keystr); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr);
data = tdb_fetch(tdb, key);
@@ -913,12 +972,12 @@ int print_job_start(struct current_user *user, int snum, char *jobname)
fstrcpy(pjob.jobname, jobname);
if ((vuser = get_valid_user_struct(user->vuid)) != NULL) {
- fstrcpy(pjob.user, unix_to_dos(vuser->user.smb_name,False));
+ fstrcpy(pjob.user, unix_to_dos_static(vuser->user.smb_name));
} else {
- fstrcpy(pjob.user, unix_to_dos(uidtoname(user->uid),False));
+ fstrcpy(pjob.user, unix_to_dos_static(uidtoname(user->uid)));
}
- fstrcpy(pjob.qname, lp_servicename(snum));
+ fstrcpy(pjob.queuename, lp_servicename(snum));
/* lock the database */
tdb_lock_bystring(tdb, "INFO/nextjob");
@@ -987,6 +1046,23 @@ to open spool file %s.\n", pjob.filename));
}
/****************************************************************************
+ Update the number of pages spooled to jobid
+****************************************************************************/
+
+void print_job_endpage(int jobid)
+{
+ struct printjob *pjob = print_job_find(jobid);
+ if (!pjob)
+ return;
+ /* don't allow another process to get this info - it is meaningless */
+ if (pjob->pid != local_pid)
+ return;
+
+ pjob->page_count++;
+ print_job_store(jobid, pjob);
+}
+
+/****************************************************************************
Print a file - called on closing the file. This spools the job.
If normal close is false then we're tearing down the jobs - treat as an
error.
@@ -1005,6 +1081,10 @@ BOOL print_job_end(int jobid, BOOL normal_close)
return False;
snum = print_job_snum(jobid);
+ if (snum == -1) {
+ DEBUG(5,("print_job_end: unknown service number for jobid %d\n", jobid));
+ return False;
+ }
if (normal_close && (sys_fstat(pjob->fd, &sbuf) == 0)) {
pjob->size = sbuf.st_size;
@@ -1070,9 +1150,11 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void *
if (data.dsize != sizeof(pjob) || key.dsize != sizeof(int)) return 0;
memcpy(&jobid, key.dptr, sizeof(jobid));
memcpy(&pjob, data.dptr, sizeof(pjob));
+ unix_to_dos(pjob.queuename);
/* maybe it isn't for this queue */
- if (ts->snum != print_queue_snum(pjob.qname)) return 0;
+ if (ts->snum != lp_servicenumber(pjob.queuename))
+ return 0;
if (ts->qcount >= ts->maxcount) return 0;
@@ -1080,11 +1162,12 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void *
ts->queue[i].job = jobid;
ts->queue[i].size = pjob.size;
+ ts->queue[i].page_count = pjob.page_count;
ts->queue[i].status = pjob.status;
ts->queue[i].priority = 1;
ts->queue[i].time = pjob.starttime;
- fstrcpy(ts->queue[i].user, pjob.user);
- fstrcpy(ts->queue[i].file, pjob.jobname);
+ fstrcpy(ts->queue[i].fs_user, pjob.user);
+ fstrcpy(ts->queue[i].fs_file, pjob.jobname);
ts->qcount++;
@@ -1105,9 +1188,11 @@ static int traverse_count_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data,
if (data.dsize != sizeof(pjob) || key.dsize != sizeof(int)) return 0;
memcpy(&jobid, key.dptr, sizeof(jobid));
memcpy(&pjob, data.dptr, sizeof(pjob));
+ unix_to_dos(pjob.queuename);
/* maybe it isn't for this queue */
- if (ts->snum != print_queue_snum(pjob.qname)) return 0;
+ if (ts->snum != lp_servicenumber(pjob.queuename))
+ return 0;
ts->count++;
@@ -1154,7 +1239,7 @@ int print_queue_status(int snum,
*/
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", lp_servicename(snum));
- dos_to_unix(keystr, True); /* Convert key to unix-codepage */
+ dos_to_unix(keystr); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr);
data = tdb_fetch(tdb, key);
@@ -1243,7 +1328,7 @@ BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode)
printer_name = PRINTERNAME(snum);
- message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
return True;
}
@@ -1276,7 +1361,7 @@ BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode)
printer_name = PRINTERNAME(snum);
- message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
return True;
}
@@ -1313,7 +1398,7 @@ BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode)
printer_name = PRINTERNAME(snum);
- message_send_all(conn_tdb_ctx(),MSG_PRINTER_NOTIFY, printer_name, strlen(printer_name) + 1, False);
+ send_queue_message(printer_name, 0, PRINTER_CHANGE_JOB);
return True;
}
diff --git a/source/rpc_client/cli_login.c b/source/rpc_client/cli_login.c
index 2e90702e66d..0492e73b7a3 100644
--- a/source/rpc_client/cli_login.c
+++ b/source/rpc_client/cli_login.c
@@ -169,13 +169,13 @@ NTSTATUS cli_nt_login_network(struct cli_state *cli, char *domain, char *usernam
ctr->switch_value = NET_LOGON_TYPE;
fstrcpy(dos_wksta_name, cli->clnt_name_slash);
- unix_to_dos(dos_wksta_name, True);
+ unix_to_dos(dos_wksta_name);
fstrcpy(dos_username, username);
- unix_to_dos(dos_username, True);
+ unix_to_dos(dos_username);
fstrcpy(dos_domain, domain);
- unix_to_dos(dos_domain, True);
+ unix_to_dos(dos_domain);
/* Create the structure needed for SAM logon. */
init_id_info2(&ctr->auth.id2, dos_domain, 0, smb_userid_low, 0,
diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c
index 168828e5388..df77080425a 100644
--- a/source/rpc_client/cli_netlogon.c
+++ b/source/rpc_client/cli_netlogon.c
@@ -68,7 +68,7 @@ BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level)
global_myname, status_level));
/* store the parameters */
- init_q_logon_ctrl2(&q_l, unix_to_dos(cli->srv_name_slash,False),
+ init_q_logon_ctrl2(&q_l, unix_to_dos_static(cli->srv_name_slash),
status_level);
/* turn parameters into data stream */
@@ -132,7 +132,7 @@ NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
credstr(cli->clnt_cred.challenge.data), neg_flags));
/* store the parameters */
- init_q_auth_2(&q_a, unix_to_dos(cli->srv_name_slash,False), cli->mach_acct,
+ init_q_auth_2(&q_a, unix_to_dos_static(cli->srv_name_slash), cli->mach_acct,
sec_chan, global_myname, &cli->clnt_cred.challenge, neg_flags);
/* turn parameters into data stream */
@@ -221,7 +221,7 @@ BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_
cli->desthost, global_myname, credstr(clnt_chal->data)));
/* store the parameters */
- init_q_req_chal(&q_c, unix_to_dos(cli->srv_name_slash,False),
+ init_q_req_chal(&q_c, unix_to_dos_static(cli->srv_name_slash),
global_myname, clnt_chal);
/* turn parameters into data stream */
@@ -286,7 +286,7 @@ BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16])
credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time));
/* store the parameters */
- init_q_srv_pwset(&q_s, unix_to_dos(cli->srv_name_slash,False),
+ init_q_srv_pwset(&q_s, unix_to_dos_static(cli->srv_name_slash),
cli->mach_acct, sec_chan_type, global_myname,
&new_clnt_cred, (char *)hashed_mach_pwd);
@@ -364,7 +364,7 @@ static NTSTATUS cli_net_sam_logon_internal(struct cli_state *cli, NET_ID_INFO_CT
/* store the parameters */
q_s.validation_level = validation_level;
- init_sam_info(&q_s.sam_id, unix_to_dos(cli->srv_name_slash,False),
+ init_sam_info(&q_s.sam_id, unix_to_dos_static(cli->srv_name_slash),
global_myname, &new_clnt_cred, &dummy_rtn_creds,
ctr->switch_value, ctr);
@@ -496,7 +496,7 @@ BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr)
memset(&dummy_rtn_creds, '\0', sizeof(dummy_rtn_creds));
- init_sam_info(&q_s.sam_id, unix_to_dos(cli->srv_name_slash,False),
+ init_sam_info(&q_s.sam_id, unix_to_dos_static(cli->srv_name_slash),
global_myname, &new_clnt_cred, &dummy_rtn_creds,
ctr->switch_value, ctr);
diff --git a/source/rpc_client/cli_spoolss_notify.c b/source/rpc_client/cli_spoolss_notify.c
index a96fd8e0dde..c65e61095dd 100644
--- a/source/rpc_client/cli_spoolss_notify.c
+++ b/source/rpc_client/cli_spoolss_notify.c
@@ -1,6 +1,5 @@
/*
- * Unix SMB/Netbios implementation.
- * Version 1.9.
+ * Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-2000,
* Copyright (C) Jean Francois Micouleau 1998-2000,
@@ -21,11 +20,36 @@
*/
#include "includes.h"
+#if 0
#include "rpc_parse.h"
#include "nterr.h"
-
+#endif
extern pstring global_myname;
+struct msg_info_table {
+ uint32 msg;
+ uint32 field;
+ char* name;
+ void (*construct_fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx);
+};
+
+struct msg_info_table msg_table[] = {
+{ PRINTER_MESSAGE_DRIVER, PRINTER_NOTIFY_DRIVER_NAME, "PRINTER_MESSAGE_DRIVER", spoolss_notify_driver_name },
+{ PRINTER_MESSAGE_ATTRIBUTES, PRINTER_NOTIFY_ATTRIBUTES, "PRINTER_MESSAGE_ATTRIBUTES", spoolss_notify_attributes },
+{ PRINTER_MESSAGE_COMMENT, PRINTER_NOTIFY_COMMENT, "PRINTER_MESSAGE_COMMENT", spoolss_notify_comment },
+{ PRINTER_MESSAGE_LOCATION, PRINTER_NOTIFY_LOCATION, "PRINTER_MESSAGE_LOCATION", spoolss_notify_location },
+{ PRINTER_MESSAGE_PRINTERNAME, PRINTER_NOTIFY_PRINTER_NAME, "PRINTER_MESSAGE_PRINTERNAME", spoolss_notify_printer_name },
+{ PRINTER_MESSAGE_SHARENAME, PRINTER_NOTIFY_SHARE_NAME, "PRINTER_MESSAGE_SHARENAME", spoolss_notify_share_name },
+{ PRINTER_MESSAGE_PORT, PRINTER_NOTIFY_PORT_NAME, "PRINTER_MESSAGE_PORT", spoolss_notify_port_name },
+{ PRINTER_MESSAGE_CJOBS, PRINTER_NOTIFY_CJOBS, "PRINTER_MESSAGE_CJOBS", spoolss_notify_cjobs },
+{ PRINTER_MESSAGE_SEPFILE, PRINTER_NOTIFY_SEPFILE, "PRINTER_MESSAGE_SEPFILE", spoolss_notify_sepfile },
+{ PRINTER_MESSAGE_PARAMS, PRINTER_NOTIFY_PARAMETERS, "PRINTER_MESSAGE_PARAMETERS", spoolss_notify_parameters },
+{ PRINTER_MESSAGE_DATATYPE, PRINTER_NOTIFY_DATATYPE, "PRINTER_MESSAGE_DATATYPE", spoolss_notify_datatype },
+{ PRINTER_MESSAGE_NULL, 0x0, "", NULL },
+};
+
/*********************************************************
Disconnect from the client machine.
**********************************************************/
@@ -70,8 +94,8 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine)
}
if (!attempt_netbios_session_request(cli, global_myname, remote_machine, &cli->dest_ip)) {
- DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request. Error was %s\n", remote_machine, cli_errstr(cli) ));
- cli_shutdown(cli);
+ DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n",
+ remote_machine));
return False;
}
@@ -127,168 +151,297 @@ BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine)
return True;
}
-/***************************************************************************
+/*
+ * SPOOLSS Client RPC's used by servers as the notification
+ * back channel
+ */
+
+ /***************************************************************************
do a reply open printer
****************************************************************************/
-BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, WERROR *status, POLICY_HND *handle)
+WERROR cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ char *printer, uint32 localprinter, uint32 type,
+ POLICY_HND *handle)
{
+ WERROR result = W_ERROR(ERRgeneral);
+
prs_struct rbuf;
prs_struct buf;
SPOOL_Q_REPLYOPENPRINTER q_s;
SPOOL_R_REPLYOPENPRINTER r_s;
- prs_init(&buf, 1024, cli->mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL );
+ prs_init(&buf, 1024, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL );
/* create and send a MSRPC command with api SPOOLSS_REPLYOPENPRINTER */
-/*
- DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n",
- cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname,
- credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time));
-*/
+
/* store the parameters */
make_spoolss_q_replyopenprinter(&q_s, printer, localprinter, type);
/* turn parameters into data stream */
if(!spoolss_io_q_replyopenprinter("", &q_s, &buf, 0)) {
- DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to marshall NET_Q_SRV_PWSET struct.\n"));
- prs_mem_free(&buf);
- prs_mem_free(&rbuf);
- return False;
+ DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to marshall SPOOL_Q_REPLYOPENPRINTER struct.\n"));
+ goto done;
}
/* send the data on \PIPE\ */
- if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYOPENPRINTER, &buf, &rbuf)) {
- prs_mem_free(&buf);
- prs_mem_free(&rbuf);
- return False;
- }
-
- prs_mem_free(&buf);
+ if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYOPENPRINTER, &buf, &rbuf))
+ goto done;
/* turn data stream into parameters*/
if(!spoolss_io_r_replyopenprinter("", &r_s, &rbuf, 0)) {
- prs_mem_free(&rbuf);
- return False;
+ DEBUG(0,("cli_spoolss_reply_open_printer: Error : failed to unmarshall SPOOL_R_REPLYOPENPRINTER struct.\n"));
+ goto done;
}
- prs_mem_free(&rbuf);
-
memcpy(handle, &r_s.handle, sizeof(r_s.handle));
- *status=r_s.status;
+ result = r_s.status;
- return True;
+done:
+ prs_mem_free(&buf);
+ prs_mem_free(&rbuf);
+
+ return result;
}
/***************************************************************************
do a reply open printer
****************************************************************************/
-BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle,
- uint32 change_low, uint32 change_high, WERROR *status)
+WERROR cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle)
{
+ WERROR result = W_ERROR(ERRgeneral);
prs_struct rbuf;
prs_struct buf;
- SPOOL_Q_REPLY_RRPCN q_s;
- SPOOL_R_REPLY_RRPCN r_s;
+ SPOOL_Q_REPLYCLOSEPRINTER q_s;
+ SPOOL_R_REPLYCLOSEPRINTER r_s;
prs_init(&buf, 1024, cli->mem_ctx, MARSHALL);
prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL );
/* create and send a MSRPC command with api */
-/*
- DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n",
- cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname,
- credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time));
-*/
+
/* store the parameters */
- make_spoolss_q_reply_rrpcn(&q_s, handle, change_low, change_high);
+ make_spoolss_q_reply_closeprinter(&q_s, handle);
/* turn parameters into data stream */
- if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) {
- DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n"));
- prs_mem_free(&buf);
- prs_mem_free(&rbuf);
- return False;
+ if(!spoolss_io_q_replycloseprinter("", &q_s, &buf, 0)) {
+ DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_Q_REPLY_CLOSEPRINTER struct.\n"));
+ goto done;
}
/* send the data on \PIPE\ */
- if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf)) {
- prs_mem_free(&buf);
- prs_mem_free(&rbuf);
- return False;
- }
+ if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYCLOSEPRINTER, &buf, &rbuf))
+ goto done;
- prs_mem_free(&buf);
-
/* turn data stream into parameters*/
- if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) {
- prs_mem_free(&rbuf);
- return False;
+ if(!spoolss_io_r_replycloseprinter("", &r_s, &rbuf, 0)) {
+ DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_R_REPLY_CLOSEPRINTER struct.\n"));
+ goto done;
}
+
+ result = r_s.status;
+
+done:
+ prs_mem_free(&buf);
prs_mem_free(&rbuf);
- *status=r_s.status;
+ return result;
+}
- return True;
+
+/*********************************************************************
+ This SPOOLSS_ROUTERREPLYPRINTER function is used to send a change
+ notification event when the registration **did not** use
+ SPOOL_NOTIFY_OPTION_TYPE structure to specify the events to monitor.
+ Also see cli_spolss_reply_rrpcn()
+ *********************************************************************/
+
+WERROR cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, uint32 condition, uint32 changd_id)
+{
+ prs_struct qbuf, rbuf;
+ SPOOL_Q_ROUTERREPLYPRINTER q;
+ SPOOL_R_ROUTERREPLYPRINTER r;
+ WERROR result = W_ERROR(ERRgeneral);
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+
+ /* Initialise input parameters */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
+
+
+ /* write the request */
+ make_spoolss_q_routerreplyprinter(&q, pol, condition, changd_id);
+
+ /* Marshall data and send request */
+ if (!spoolss_io_q_routerreplyprinter ("", &q, &qbuf, 0)) {
+ DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to marshall SPOOL_Q_ROUTERREPLYPRINTER!\n"));
+ goto done;
+ }
+
+
+ if (!rpc_api_pipe_req (cli, SPOOLSS_ROUTERREPLYPRINTER, &qbuf, &rbuf))
+ goto done;
+
+ /* Unmarshall response */
+ if (!spoolss_io_r_routerreplyprinter ("", &r, &rbuf, 0)) {
+ DEBUG(0,("cli_spoolss_routerreplyprinter: Unable to unmarshall SPOOL_R_ROUTERREPLYPRINTER!\n"));
+ goto done;
+ }
+
+ /* Return output parameters */
+ result = r.status;
+
+done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
}
-/***************************************************************************
- do a reply open printer
-****************************************************************************/
-BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle,
- WERROR *status)
+/**********************************************************************************
+ Build the SPOOL_NOTIFY_INFO_DATA entries based upon the flags which have been set
+ *********************************************************************************/
+
+static int build_notify_data (TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, uint32 flags,
+ SPOOL_NOTIFY_INFO_DATA **notify_data)
+{
+ SPOOL_NOTIFY_INFO_DATA *data;
+ uint32 idx = 0;
+ int i = 0;
+
+ while ((msg_table[i].msg != PRINTER_MESSAGE_NULL) && flags)
+ {
+ if (flags & msg_table[i].msg)
+ {
+ DEBUG(10,("build_notify_data: %s set on [%s][%d]\n", msg_table[i].name,
+ printer->info_2->printername, idx));
+ if ((data=Realloc(*notify_data, (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) {
+ DEBUG(0,("build_notify_data: Realloc() failed with size [%d]!\n",
+ (idx+1)*sizeof(SPOOL_NOTIFY_INFO_DATA)));
+ return -1;
+ }
+ *notify_data = data;
+
+ /* clear memory */
+ memset(*notify_data+idx, 0x0, sizeof(SPOOL_NOTIFY_INFO_DATA));
+
+ /*
+ * 'id' (last param here) is undefined when type == PRINTER_NOTIFY_TYPE
+ * See PRINTER_NOTIFY_INFO_DATA entries in MSDN
+ * --jerry
+ */
+ construct_info_data(*notify_data+idx, PRINTER_NOTIFY_TYPE, msg_table[i].field, 0x00);
+
+ msg_table[i].construct_fn(-1, *notify_data+idx, NULL, printer, ctx);
+ idx++;
+ }
+
+ i++;
+ }
+
+ return idx;
+}
+
+/*********************************************************************
+ This SPOOLSS_ROUTERREPLYPRINTER function is used to send a change
+ notification event when the registration **did** use
+ SPOOL_NOTIFY_OPTION_TYPE structure to specify the events to monitor
+ Also see cli_spoolss_routereplyprinter()
+ *********************************************************************/
+
+WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *handle, PRINTER_MESSAGE_INFO *info,
+ NT_PRINTER_INFO_LEVEL *printer)
{
prs_struct rbuf;
- prs_struct buf;
+ prs_struct buf;
- SPOOL_Q_REPLYCLOSEPRINTER q_s;
- SPOOL_R_REPLYCLOSEPRINTER r_s;
+ SPOOL_NOTIFY_INFO notify_info;
+ SPOOL_NOTIFY_INFO_DATA *notify_data = NULL;
+ uint32 data_len;
- prs_init(&buf, 1024, cli->mem_ctx, MARSHALL);
- prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL );
+ WERROR result = W_ERROR(ERRgeneral);
+
+ SPOOL_Q_REPLY_RRPCN q_s;
+ SPOOL_R_REPLY_RRPCN r_s;
+
+ if (!info) {
+ DEBUG(5,("cli_spoolss_reply_rrpcn: NULL printer message info pointer!\n"));
+ goto done;
+ }
+
+ prs_init(&buf, 1024, mem_ctx, MARSHALL);
+ prs_init(&rbuf, 0, mem_ctx, UNMARSHALL );
+
+ ZERO_STRUCT(notify_info);
+
+ /*
+ * See comments in _spoolss_setprinter() about PRINTER_CHANGE_XXX
+ * events. --jerry
+ */
+ DEBUG(10,("cli_spoolss_reply_rrpcn: PRINTER_MESSAGE flags = 0x%8x\n", info->flags));
+
+ data_len = build_notify_data(mem_ctx, printer, info->flags, &notify_data);
+ if (info->flags && (data_len == -1)) {
+ DEBUG(0,("cli_spoolss_reply_rrpcn: Failed to build SPOOL_NOTIFY_INFO_DATA [flags == 0x%x] for printer [%s]\n",
+ info->flags, info->printer_name));
+ result = WERR_NOMEM;
+ goto done;
+ }
+ notify_info.version = 0x2;
+ notify_info.flags = 0x00020000; /* ?? */
+ notify_info.count = data_len;
+ notify_info.data = notify_data;
/* create and send a MSRPC command with api */
-/*
- DEBUG(4,("cli_spoolss_reply_open_printer: srv:%s acct:%s sc: %d mc: %s clnt %s %x\n",
- cli->srv_name_slash, cli->mach_acct, sec_chan_type, global_myname,
- credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time));
-*/
/* store the parameters */
- make_spoolss_q_reply_closeprinter(&q_s, handle);
+
+ make_spoolss_q_reply_rrpcn(&q_s, handle, info->low, info->high, &notify_info);
/* turn parameters into data stream */
- if(!spoolss_io_q_replycloseprinter("", &q_s, &buf, 0)) {
- DEBUG(0,("cli_spoolss_reply_close_printer: Error : failed to marshall SPOOL_Q_REPLY_CLOSEPRINTER struct.\n"));
- prs_mem_free(&buf);
- prs_mem_free(&rbuf);
- return False;
+ if(!spoolss_io_q_reply_rrpcn("", &q_s, &buf, 0)) {
+ DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to marshall SPOOL_Q_REPLY_RRPCN struct.\n"));
+ goto done;
}
/* send the data on \PIPE\ */
- if (!rpc_api_pipe_req(cli, SPOOLSS_REPLYCLOSEPRINTER, &buf, &rbuf)) {
- prs_mem_free(&buf);
- prs_mem_free(&rbuf);
- return False;
- }
+ if (!rpc_api_pipe_req(cli, SPOOLSS_RRPCN, &buf, &rbuf))
+ goto done;
+
- prs_mem_free(&buf);
-
/* turn data stream into parameters*/
- if(!spoolss_io_r_replycloseprinter("", &r_s, &rbuf, 0)) {
- prs_mem_free(&rbuf);
- return False;
+ if(!spoolss_io_r_reply_rrpcn("", &r_s, &rbuf, 0)) {
+ DEBUG(0,("cli_spoolss_reply_rrpcn: Error : failed to unmarshall SPOOL_R_REPLY_RRPCN struct.\n"));
+ goto done;
+ }
+
+ if (r_s.unknown0 == 0x00080000) {
+ DEBUG(8,("cli_spoolss_reply_rrpcn: I think the spooler resonded that the notification was ignored.\n"));
}
-
- prs_mem_free(&rbuf);
- *status=r_s.status;
+ result = r_s.status;
- return True;
+done:
+ prs_mem_free(&buf);
+ prs_mem_free(&rbuf);
+ /*
+ * The memory allocated in this array is talloc'd so we only need
+ * free the array here. JRA.
+ */
+ SAFE_FREE(notify_data);
+
+ return result;
}
diff --git a/source/rpc_client/cli_trust.c b/source/rpc_client/cli_trust.c
index c910e2f334a..21eb878deb3 100644
--- a/source/rpc_client/cli_trust.c
+++ b/source/rpc_client/cli_trust.c
@@ -74,9 +74,8 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
}
if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
- DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS \
-session request. Error was %s\n", remote_machine, cli_errstr(&cli) ));
- cli_shutdown(&cli);
+ DEBUG(0,("modify_trust_password: machine %s rejected the NetBIOS session request.\n",
+ remote_machine ));
return False;
}
diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c
index 10a9efbe49d..91b54b9c836 100644
--- a/source/rpc_parse/parse_lsa.c
+++ b/source/rpc_parse/parse_lsa.c
@@ -1,6 +1,5 @@
/*
- * Unix SMB/Netbios implementation.
- * Version 1.9.
+ * Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
@@ -138,8 +137,7 @@ static BOOL lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps,
Inits an LSA_SEC_QOS structure.
********************************************************************/
-void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff,
- uint32 unknown)
+void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff)
{
DEBUG(5, ("init_lsa_sec_qos\n"));
@@ -147,7 +145,6 @@ void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff,
qos->sec_imp_level = imp_lev;
qos->sec_ctxt_mode = ctxt;
qos->effective_only = eff;
- qos->unknown = unknown;
}
/*******************************************************************
@@ -178,13 +175,10 @@ static BOOL lsa_io_sec_qos(char *desc, LSA_SEC_QOS *qos, prs_struct *ps,
return False;
if(!prs_uint8 ("effective_only", ps, depth, &qos->effective_only))
return False;
- if(!prs_uint32("unknown ", ps, depth, &qos->unknown))
- return False;
if (qos->len != prs_offset(ps) - start) {
DEBUG(3,("lsa_io_sec_qos: length %x does not match size %x\n",
qos->len, prs_offset(ps) - start));
- return False;
}
return True;
@@ -255,7 +249,11 @@ static BOOL lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps,
}
#endif
- if (attr->ptr_sec_qos != 0 && attr->sec_qos != NULL) {
+ if (attr->ptr_sec_qos != 0) {
+ if (UNMARSHALLING(ps))
+ if (!(attr->sec_qos = (LSA_SEC_QOS *)prs_alloc_mem(ps,sizeof(LSA_SEC_QOS))))
+ return False;
+
if(!lsa_io_sec_qos("sec_qos", attr->sec_qos, ps, depth))
return False;
}
@@ -277,8 +275,7 @@ void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name,
r_q->ptr = 1; /* undocumented pointer */
- if (qos == NULL)
- r_q->des_access = desired_access;
+ r_q->des_access = desired_access;
r_q->system_name = system_name;
init_lsa_obj_attr(&r_q->attr, attributes, qos);
@@ -304,10 +301,8 @@ BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps,
if(!lsa_io_obj_attr("", &r_q->attr, ps, depth))
return False;
- if (r_q->attr.ptr_sec_qos == 0) {
- if(!prs_uint32("des_access", ps, depth, &r_q->des_access))
- return False;
- }
+ if(!prs_uint32("des_access", ps, depth, &r_q->des_access))
+ return False;
return True;
}
@@ -344,8 +339,7 @@ void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name,
r_q->ptr = 1; /* undocumented pointer */
- if (qos == NULL)
- r_q->des_access = desired_access;
+ r_q->des_access = desired_access;
init_unistr2(&r_q->uni_server_name, server_name,
strlen(server_name) + 1);
@@ -371,10 +365,8 @@ BOOL lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps,
if(!lsa_io_obj_attr("", &r_q->attr, ps, depth))
return False;
- if (r_q->attr.ptr_sec_qos == 0) {
- if(!prs_uint32("des_access", ps, depth, &r_q->des_access))
- return False;
- }
+ if(!prs_uint32("des_access", ps, depth, &r_q->des_access))
+ return False;
return True;
}
@@ -1052,7 +1044,7 @@ makes a structure.
********************************************************************/
void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l,
- POLICY_HND *hnd, int num_names, char **names)
+ POLICY_HND *hnd, int num_names, const char **names)
{
int i;
@@ -1078,11 +1070,11 @@ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l,
}
for (i = 0; i < num_names; i++) {
- char* name = names[i];
- int len = strlen(name);
+ int len;
+ len = strlen(names[i]);
init_uni_hdr(&q_l->hdr_name[i], len);
- init_unistr2(&q_l->uni_name[i], name, len);
+ init_unistr2(&q_l->uni_name[i], names[i], len);
}
}
@@ -1608,6 +1600,9 @@ BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_stru
if(!smb_io_unistr2("uni2_srvname", &q_c->uni2_srvname, q_c->ptr_srvname, ps, depth)) /* server name to be looked up */
return False;
+ if (!prs_align(ps))
+ return False;
+
if(!prs_uint32("unk1", ps, depth, &q_c->unk1))
return False;
if(!prs_uint32("unk2", ps, depth, &q_c->unk2))
@@ -1660,6 +1655,14 @@ BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_stru
return True;
}
+void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *sid, uint32 desired_access)
+{
+ memcpy(&trn->pol, hnd, sizeof(trn->pol));
+
+ init_dom_sid2(&trn->sid, sid);
+ trn->access = desired_access;
+}
+
/*******************************************************************
Reads or writes an LSA_Q_OPENACCOUNT structure.
********************************************************************/
@@ -1675,7 +1678,7 @@ BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, i
if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth))
return False;
- if(!smb_io_dom_sid2("", &r_c->sid, ps, depth)) /* domain SID */
+ if(!smb_io_dom_sid2("sid", &r_c->sid, ps, depth)) /* domain SID */
return False;
if(!prs_uint32("access", ps, depth, &r_c->access))
@@ -1706,6 +1709,12 @@ BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps,
}
+void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd)
+{
+ memcpy(&trn->pol, hnd, sizeof(trn->pol));
+
+}
+
/*******************************************************************
Reads or writes an LSA_Q_ENUMPRIVSACCOUNT structure.
********************************************************************/
@@ -1800,6 +1809,7 @@ void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, u
r_u->set.set=set;
r_u->set.count=count;
r_u->set.control=control;
+ DEBUG(10,("init_lsa_r_enum_privsaccount: %d %d privileges\n", r_u->count, r_u->set.count));
}
/*******************************************************************
@@ -1822,6 +1832,12 @@ BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_str
return False;
/* malloc memory if unmarshalling here */
+
+ if (UNMARSHALLING(ps) && r_c->count!=0) {
+ if (!(r_c->set.set = (LUID_ATTR *)prs_alloc_mem(ps,sizeof(LUID_ATTR) * r_c->count)))
+ return False;
+
+ }
if(!lsa_io_privilege_set(desc, &r_c->set, ps, depth))
return False;
@@ -1873,3 +1889,215 @@ BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_str
return True;
}
+
+
+/*******************************************************************
+ Reads or writes an LSA_Q_SETSYSTEMACCOUNT structure.
+********************************************************************/
+
+BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_q_setsystemaccount");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth))
+ return False;
+
+ if(!prs_uint32("access", ps, depth, &r_c->access))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_R_SETSYSTEMACCOUNT structure.
+********************************************************************/
+
+BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_r_setsystemaccount");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &r_c->status))
+ return False;
+
+ return True;
+}
+
+
+void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, char *name)
+{
+ int len_name = strlen(name);
+ memcpy(&trn->pol, hnd, sizeof(trn->pol));
+
+ if(len_name == 0)
+ len_name = 1;
+
+ init_uni_hdr(&trn->hdr_right, len_name);
+ init_unistr2(&trn->uni2_right, name, len_name);
+}
+
+/*******************************************************************
+ Reads or writes an LSA_Q_LOOKUPPRIVVALUE structure.
+********************************************************************/
+
+BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_q_lookupprivvalue");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth))
+ return False;
+ if(!smb_io_unihdr ("hdr_name", &r_c->hdr_right, ps, depth))
+ return False;
+ if(!smb_io_unistr2("uni2_right", &r_c->uni2_right, r_c->hdr_right.buffer, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_R_LOOKUPPRIVVALUE structure.
+********************************************************************/
+
+BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_r_lookupprivvalue");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!lsa_io_luid("luid", &r_c->luid, ps, depth))
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &r_c->status))
+ return False;
+
+ return True;
+}
+
+
+/*******************************************************************
+ Reads or writes an LSA_Q_ADDPRIVS structure.
+********************************************************************/
+
+BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_q_addprivs");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth))
+ return False;
+
+ if(!prs_uint32("count", ps, depth, &r_c->count))
+ return False;
+
+ if (UNMARSHALLING(ps) && r_c->count!=0) {
+ if (!(r_c->set.set = (LUID_ATTR *)prs_alloc_mem(ps,sizeof(LUID_ATTR) * r_c->count)))
+ return False;
+ }
+
+ if(!lsa_io_privilege_set(desc, &r_c->set, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_R_ADDPRIVS structure.
+********************************************************************/
+
+BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_r_addprivs");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &r_c->status))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_Q_REMOVEPRIVS structure.
+********************************************************************/
+
+BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_q_removeprivs");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth))
+ return False;
+
+ if(!prs_uint32("allrights", ps, depth, &r_c->allrights))
+ return False;
+
+ if(!prs_uint32("ptr", ps, depth, &r_c->ptr))
+ return False;
+
+ /*
+ * JFM: I'm not sure at all if the count is inside the ptr
+ * never seen one with ptr=0
+ */
+
+ if (r_c->ptr!=0) {
+ if(!prs_uint32("count", ps, depth, &r_c->count))
+ return False;
+
+ if (UNMARSHALLING(ps) && r_c->count!=0) {
+ if (!(r_c->set.set = (LUID_ATTR *)prs_alloc_mem(ps,sizeof(LUID_ATTR) * r_c->count)))
+ return False;
+ }
+
+ if(!lsa_io_privilege_set(desc, &r_c->set, ps, depth))
+ return False;
+ }
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_R_REMOVEPRIVS structure.
+********************************************************************/
+
+BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_r_removeprivs");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &r_c->status))
+ return False;
+
+ return True;
+}
+
+BOOL policy_handle_is_valid(const POLICY_HND *hnd)
+{
+ POLICY_HND zero_pol;
+
+ ZERO_STRUCT(zero_pol);
+ return ((memcmp(&zero_pol, hnd, sizeof(POLICY_HND)) == 0) ? False : True );
+}
diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c
index afb829637c3..466653af52c 100644
--- a/source/rpc_parse/parse_misc.c
+++ b/source/rpc_parse/parse_misc.c
@@ -15,7 +15,7 @@
* 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.
- *
+ e
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -554,8 +554,6 @@ BOOL smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth)
prs_debug(ps, depth, desc, "smb_io_unistr");
depth++;
- if(!prs_align(ps))
- return False;
if(!prs_unistr("unistr", ps, depth, uni))
return False;
@@ -571,7 +569,7 @@ static void create_buffer3(BUFFER3 *str, size_t len)
if (len < MAX_BUFFERLEN)
len = MAX_BUFFERLEN;
- str->buffer = talloc_zero(get_talloc_ctx(), len);
+ str->buffer = talloc_zero(get_talloc_ctx(), len);
if (str->buffer == NULL)
smb_panic("create_buffer3: talloc fail\n");
diff --git a/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c
index e3f7ea5d9ae..a666258d0ce 100644
--- a/source/rpc_parse/parse_net.c
+++ b/source/rpc_parse/parse_net.c
@@ -1594,17 +1594,20 @@ makes a NET_Q_SAM_SYNC structure.
********************************************************************/
BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name,
const char *cli_name, DOM_CRED * cli_creds,
- uint32 database_id)
+ DOM_CRED *ret_creds, uint32 database_id)
{
DEBUG(5, ("init_q_sam_sync\n"));
init_unistr2(&q_s->uni_srv_name, srv_name, strlen(srv_name) + 1);
init_unistr2(&q_s->uni_cli_name, cli_name, strlen(cli_name) + 1);
- if (cli_creds) {
+ if (cli_creds)
memcpy(&q_s->cli_creds, cli_creds, sizeof(q_s->cli_creds));
+
+ if (cli_creds)
+ memcpy(&q_s->ret_creds, ret_creds, sizeof(q_s->ret_creds));
+ else
memset(&q_s->ret_creds, 0, sizeof(q_s->ret_creds));
- }
q_s->database_id = database_id;
q_s->restart_state = 0;
diff --git a/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c
index b11dc7394da..9699a7f6de3 100644
--- a/source/rpc_parse/parse_prs.c
+++ b/source/rpc_parse/parse_prs.c
@@ -615,7 +615,7 @@ BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status)
}
DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name,
- werror_str(*status)));
+ dos_errstr(*status)));
ps->data_offset += sizeof(uint32);
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index f207d32e55c..7fecbfb806c 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -1645,7 +1645,6 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_en
uint32 len_sam_name, len_sam_desc;
uint32 i;
- DOMAIN_GRP *grp;
ZERO_STRUCTP(sam);
DEBUG(5, ("init_sam_dispinfo_3: num_entries: %d\n", num_entries));
@@ -1663,16 +1662,17 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_en
ZERO_STRUCTP(sam->str);
for (i = 0; i < num_entries; i++) {
+ DOMAIN_GRP *grp = disp_group_info[i+start_idx].grp;
+
DEBUG(11, ("init_sam_dispinfo_3: entry: %d\n",i));
- grp=disp_group_info[i+start_idx].grp;
- len_sam_name = strlen(grp[i].name);
- len_sam_desc = strlen(grp[i].comment);
+ len_sam_name = strlen(grp->name);
+ len_sam_desc = strlen(grp->comment);
- init_sam_entry3(&sam->sam[i], start_idx + i + 1, len_sam_name, len_sam_desc, grp[i].rid);
+ init_sam_entry3(&sam->sam[i], start_idx + i + 1, len_sam_name, len_sam_desc, grp->rid);
- init_unistr2(&sam->str[i].uni_grp_name, grp[i].name, len_sam_name);
- init_unistr2(&sam->str[i].uni_grp_desc, grp[i].comment, len_sam_desc);
+ init_unistr2(&sam->str[i].uni_grp_name, grp->name, len_sam_name);
+ init_unistr2(&sam->str[i].uni_grp_desc, grp->comment, len_sam_desc);
}
return NT_STATUS_OK;
@@ -1830,7 +1830,6 @@ NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_en
uint32 len_sam_name;
uint32 i;
- DOMAIN_GRP *grp;
ZERO_STRUCTP(sam);
DEBUG(5, ("init_sam_dispinfo_5: num_entries: %d\n", num_entries));
@@ -1848,13 +1847,14 @@ NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_en
ZERO_STRUCTP(sam->str);
for (i = 0; i < num_entries; i++) {
+ DOMAIN_GRP *grp = disp_group_info[i+start_idx].grp;
+
DEBUG(11, ("init_sam_dispinfo_5: entry: %d\n",i));
- grp=disp_group_info[i+start_idx].grp;
- len_sam_name = strlen(grp[i].name);
+ len_sam_name = strlen(grp->name);
init_sam_entry5(&sam->sam[i], start_idx + i + 1, len_sam_name);
- init_string2(&sam->str[i].grp_name, grp[i].name, len_sam_name+1, len_sam_name);
+ init_string2(&sam->str[i].grp_name, grp->name, len_sam_name+1, len_sam_name);
}
return NT_STATUS_OK;
@@ -5611,7 +5611,7 @@ static BOOL sam_io_user_info25(char *desc, SAM_USER_INFO_25 * usr, prs_struct *p
if (usr == NULL)
return False;
- prs_debug(ps, depth, desc, "sam_io_user_info23");
+ prs_debug(ps, depth, desc, "sam_io_user_info25");
depth++;
if(!prs_align(ps))
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c
index 94bf6f906b7..a47b9f5b60c 100644
--- a/source/rpc_parse/parse_spoolss.c
+++ b/source/rpc_parse/parse_spoolss.c
@@ -1,11 +1,10 @@
/*
- * Unix SMB/Netbios implementation.
- * Version 1.9.
+ * Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-2000,
* Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
* Copyright (C) Jean François Micouleau 1998-2000,
- * Copyright (C) Gerald Carter 2000,
+ * Copyright (C) Gerald Carter 2000-2002
* Copyright (C) Tim Potter 2001.
*
* This program is free software; you can redistribute it and/or modify
@@ -425,8 +424,11 @@ BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data,
return False;
}
}
+#if 0 /* JERRY */
+ /* Win2k does not seem to put this parse align here */
if(!prs_align(ps))
return False;
+#endif
return True;
}
@@ -612,22 +614,44 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo
return False;
if (!prs_uint32("displayfrequency", ps, depth, &devmode->displayfrequency))
return False;
- if (!prs_uint32("icmmethod", ps, depth, &devmode->icmmethod))
- return False;
- if (!prs_uint32("icmintent", ps, depth, &devmode->icmintent))
- return False;
- if (!prs_uint32("mediatype", ps, depth, &devmode->mediatype))
- return False;
- if (!prs_uint32("dithertype", ps, depth, &devmode->dithertype))
- return False;
- if (!prs_uint32("reserved1", ps, depth, &devmode->reserved1))
- return False;
- if (!prs_uint32("reserved2", ps, depth, &devmode->reserved2))
- return False;
- if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth))
- return False;
- if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight))
- return False;
+
+ /*
+ * Conditional parsing. Assume that the DeviceMode has been
+ * zero'd by the caller.
+ */
+ switch(devmode->specversion) {
+
+ /* Used by spooler when issuing OpenPrinter() calls. NT 3.5x? */
+ case 0x0320:
+ break;
+
+ /* See the comments on the DEVMODE in the msdn GDI documentation */
+ case 0x0400:
+ case 0x0401:
+ if (!prs_uint32("icmmethod", ps, depth, &devmode->icmmethod))
+ return False;
+ if (!prs_uint32("icmintent", ps, depth, &devmode->icmintent))
+ return False;
+ if (!prs_uint32("mediatype", ps, depth, &devmode->mediatype))
+ return False;
+ if (!prs_uint32("dithertype", ps, depth, &devmode->dithertype))
+ return False;
+ if (!prs_uint32("reserved1", ps, depth, &devmode->reserved1))
+ return False;
+ if (!prs_uint32("reserved2", ps, depth, &devmode->reserved2))
+ return False;
+ if (!prs_uint32("panningwidth", ps, depth, &devmode->panningwidth))
+ return False;
+ if (!prs_uint32("panningheight", ps, depth, &devmode->panningheight))
+ return False;
+ break;
+
+ /* log an error if we see something else */
+ default:
+ DEBUG(0,("spoolss_io_devmode: Unknown specversion [0x%x]!\n", devmode->specversion));
+ DEBUG(0,("spoolss_io_devmode: Please report to samba-technical@samba.org\n"));
+ break;
+ }
if (devmode->driverextra!=0) {
if (UNMARSHALLING(ps)) {
@@ -715,6 +739,9 @@ static BOOL spoolss_io_printer_default(char *desc, PRINTER_DEFAULT *pd, prs_stru
if (!spoolss_io_devmode_cont("", &pd->devmode_cont, ps, depth))
return False;
+ if (!prs_align(ps))
+ return False;
+
if (!prs_uint32("access_required", ps, depth, &pd->access_required))
return False;
@@ -871,17 +898,18 @@ BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2
return True;
}
+
/*******************************************************************
* read a structure.
* called from spoolss_q_open_printer_ex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
- prs_debug(ps, depth, desc, "spoolss_io_q_open_printer_ex");
+ prs_debug(ps, depth, desc, "spoolss_io_q_open_printer");
depth++;
if (!prs_align(ps))
@@ -898,36 +926,67 @@ BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_
if (!spoolss_io_printer_default("", &q_u->printer_default, ps, depth))
return False;
- if (!prs_uint32("user_switch", ps, depth, &q_u->user_switch))
- return False;
- if (!spool_io_user_level("", &q_u->user_ctr, ps, depth))
- return False;
-
return True;
}
/*******************************************************************
- * init a structure.
+ * write a structure.
+ * called from static spoolss_r_open_printer_ex (srv_spoolss.c)
+ * called from spoolss_open_printer_ex (cli_spoolss.c)
********************************************************************/
-BOOL make_spoolss_q_deleteprinterdriver(
- TALLOC_CTX *mem_ctx,
- SPOOL_Q_DELETEPRINTERDRIVER *q_u,
- const char *server,
- const char* arch,
- const char* driver
-)
+
+BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth)
{
- DEBUG(5,("make_spoolss_q_deleteprinterdriver\n"));
+ if (r_u == NULL) return False;
+
+ prs_debug(ps, depth, desc, "spoolss_io_r_open_printer");
+ depth++;
- q_u->server_ptr = (server!=NULL)?1:0;
+ if (!prs_align(ps))
+ return False;
- /* these must be NULL terminated or else NT4 will
- complain about invalid parameters --jerry */
- init_unistr2(&q_u->server, server, strlen(server)+1);
- init_unistr2(&q_u->arch, arch, strlen(arch)+1);
- init_unistr2(&q_u->driver, driver, strlen(driver)+1);
+ if (!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth))
+ return False;
+
+ if (!prs_werror("status code", ps, depth, &(r_u->status)))
+ return False;
+
+ return True;
+}
+
+
+/*******************************************************************
+ * read a structure.
+ * called from spoolss_q_open_printer_ex (srv_spoolss.c)
+ ********************************************************************/
+
+BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth)
+{
+ if (q_u == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "spoolss_io_q_open_printer_ex");
+ depth++;
+
+ if (!prs_align(ps))
+ return False;
+ if (!prs_uint32("printername_ptr", ps, depth, &q_u->printername_ptr))
+ return False;
+ if (!smb_io_unistr2("", &q_u->printername, q_u->printername_ptr, ps,depth))
+ return False;
+ if (!prs_align(ps))
+ return False;
+
+ if (!spoolss_io_printer_default("", &q_u->printer_default, ps, depth))
+ return False;
+
+ if (!prs_uint32("user_switch", ps, depth, &q_u->user_switch))
+ return False;
+ if (!spool_io_user_level("", &q_u->user_ctr, ps, depth))
+ return False;
+
return True;
}
@@ -957,6 +1016,32 @@ BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_
}
/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+BOOL make_spoolss_q_deleteprinterdriver(
+ TALLOC_CTX *mem_ctx,
+ SPOOL_Q_DELETEPRINTERDRIVER *q_u,
+ const char *server,
+ const char* arch,
+ const char* driver
+)
+{
+ DEBUG(5,("make_spoolss_q_deleteprinterdriver\n"));
+
+ q_u->server_ptr = (server!=NULL)?1:0;
+
+ /* these must be NULL terminated or else NT4 will
+ complain about invalid parameters --jerry */
+ init_unistr2(&q_u->server, server, strlen(server)+1);
+ init_unistr2(&q_u->arch, arch, strlen(arch)+1);
+ init_unistr2(&q_u->driver, driver, strlen(driver)+1);
+
+
+ return True;
+}
+
+
+/*******************************************************************
* make a structure.
********************************************************************/
@@ -1635,12 +1720,19 @@ static uint32 size_of_relative_string(UNISTR *string)
uint32 size=0;
size=str_len_uni(string); /* the string length */
- size=size+1; /* add the leading zero */
+ size=size+1; /* add the trailing zero */
size=size*2; /* convert in char */
- /* Ensure size is 4 byte multiple (prs_align is being called...). */
- size += ((4 - (size & 3)) & 3);
size=size+4; /* add the size of the ptr */
+#if 0 /* JERRY */
+ /*
+ * Do not include alignment as Win2k does not align relative
+ * strings within a buffer --jerry
+ */
+ /* Ensure size is 4 byte multiple (prs_align is being called...). */
+ /* size += ((4 - (size & 3)) & 3); */
+#endif
+
return size;
}
@@ -1669,32 +1761,6 @@ static uint32 size_of_systemtime(SYSTEMTIME *systime)
}
/*******************************************************************
- * write a UNICODE string.
- * used by all the RPC structs passing a buffer
- ********************************************************************/
-
-static BOOL spoolss_smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth)
-{
- if (uni == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "spoolss_smb_io_unistr");
- depth++;
-
- /* there should be no align here as it can mess up
- parsing a NEW_BUFFER->prs */
-#if 0 /* JERRY */
- if (!prs_align(ps))
- return False;
-#endif
-
- if (!prs_unistr("unistr", ps, depth, uni))
- return False;
-
- return True;
-}
-
-/*******************************************************************
* write a UNICODE string and its relative pointer.
* used by all the RPC structs passing a buffer
*
@@ -1725,8 +1791,14 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str
buffer->string_at_end -= (size_of_relative_string(string) - 4);
if(!prs_set_offset(ps, buffer->string_at_end))
return False;
+#if 0 /* JERRY */
+ /*
+ * Win2k does not align strings in a buffer
+ * Tested against WinNT 4.0 SP 6a & 2k SP2 --jerry
+ */
if (!prs_align(ps))
return False;
+#endif
buffer->string_at_end = prs_offset(ps);
/* write the string */
@@ -1753,7 +1825,7 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str
return False;
/* read the string */
- if (!spoolss_smb_io_unistr(desc, string, ps, depth))
+ if (!smb_io_unistr(desc, string, ps, depth))
return False;
if(!prs_set_offset(ps, old_offset))
@@ -1810,7 +1882,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16
}
/* write the string */
- if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth)) {
+ if (!smb_io_unistr(desc, &chaine, ps, depth)) {
SAFE_FREE(chaine.buffer);
return False;
}
@@ -1849,7 +1921,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16
return False;
do {
- if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth))
+ if (!smb_io_unistr(desc, &chaine, ps, depth))
return False;
l_chaine=str_len_uni(&chaine);
@@ -1999,6 +2071,10 @@ static BOOL smb_io_reldevmode(char *desc, NEW_BUFFER *buffer, int depth, DEVICEM
/* read the offset */
if (!prs_uint32("offset", ps, depth, &buffer->string_at_end))
return False;
+ if (buffer->string_at_end == 0) {
+ *devmode = NULL;
+ return True;
+ }
old_offset = prs_offset(ps);
if(!prs_set_offset(ps, buffer->string_at_end + buffer->struct_start))
@@ -3662,6 +3738,9 @@ BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u,
q_u->info.level = level;
q_u->info.info_ptr = (info != NULL) ? 1 : 0;
switch (level) {
+
+ /* There's no such thing as a setprinter level 1 */
+
case 2:
secdesc = info->printers_2->secdesc;
devmode = info->printers_2->devmode;
@@ -3741,6 +3820,9 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps
if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
return False;
+ if(!prs_align(ps))
+ return False;
+
switch (q_u->level)
{
case 2:
@@ -3943,6 +4025,9 @@ BOOL spoolss_io_q_enumjobs(char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, in
if (!spoolss_io_buffer("", ps, depth, &q_u->buffer))
return False;
+ if(!prs_align(ps))
+ return False;
+
if (!prs_uint32("offered", ps, depth, &q_u->offered))
return False;
@@ -4529,6 +4614,9 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct
if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
return False;
+ if(!prs_align(ps))
+ return False;
+
switch (q_u->level) {
case 2:
ptr_sec_desc = q_u->info.info_2->secdesc_ptr;
@@ -4909,12 +4997,9 @@ BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LE
init a SPOOL_Q_ADDPRINTERDRIVER struct
******************************************************************/
-BOOL make_spoolss_q_addprinterdriver(
- TALLOC_CTX *mem_ctx,
- SPOOL_Q_ADDPRINTERDRIVER *q_u,
- const char* srv_name,
- uint32 level,
- PRINTER_DRIVER_CTR *info)
+BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
+ SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name,
+ uint32 level, PRINTER_DRIVER_CTR *info)
{
DEBUG(5,("make_spoolss_q_addprinterdriver\n"));
@@ -4931,12 +5016,7 @@ BOOL make_spoolss_q_addprinterdriver(
case 3 :
make_spoolss_driver_info_3(mem_ctx, &q_u->info.info_3, info->info3);
break;
-
- /* info level 6 is supported by WinME and Win2k */
- case 6:
- /* WRITEME!! will add later --jerry */
- break;
-
+
default:
DEBUG(0,("make_spoolss_q_addprinterdriver: Unknown info level [%d]\n", level));
break;
@@ -4945,11 +5025,9 @@ BOOL make_spoolss_q_addprinterdriver(
return True;
}
-BOOL make_spoolss_driver_info_3(
- TALLOC_CTX *mem_ctx,
- SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
- DRIVER_INFO_3 *info3
-)
+BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
+ SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
+ DRIVER_INFO_3 *info3)
{
uint32 len = 0;
uint16 *ptr = info3->dependentfiles;
@@ -5726,7 +5804,48 @@ BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_st
/*******************************************************************
********************************************************************/
+BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "spoolss_io_q_resetprinter");
+ depth++;
+
+ if (!prs_align(ps))
+ return False;
+ if (!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
+ return False;
+
+ if (!prs_uint32("datatype_ptr", ps, depth, &q_u->datatype_ptr))
+ return False;
+
+ if (q_u->datatype_ptr) {
+ if (!smb_io_unistr2("datatype", &q_u->datatype, q_u->datatype_ptr?True:False, ps, depth))
+ return False;
+ }
+
+ if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+********************************************************************/
+BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "spoolss_io_r_resetprinter");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+ if(!prs_werror("status", ps, depth, &r_u->status))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+********************************************************************/
BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value,
uint32 type, const uint8 *data, uint32 len)
{
@@ -5836,7 +5955,7 @@ BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps
BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
{
- uint32 useless_ptr=0;
+ uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_addform");
depth++;
@@ -5881,7 +6000,7 @@ BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int
BOOL spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth)
{
- uint32 useless_ptr=0;
+ uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_setform");
depth++;
@@ -6104,6 +6223,73 @@ BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, pr
/*******************************************************************
* init a structure.
********************************************************************/
+BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd,
+ uint32 condition, uint32 change_id)
+{
+
+ memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
+
+ q_u->condition = condition;
+ q_u->change_id = change_id;
+
+ /* magic values */
+ q_u->unknown1 = 0x1;
+ memset(q_u->unknown2, 0x0, 5);
+ q_u->unknown2[0] = 0x1;
+
+ return True;
+}
+
+/*******************************************************************
+ Parse a SPOOL_Q_ROUTERREPLYPRINTER structure.
+********************************************************************/
+BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth)
+{
+
+ prs_debug(ps, depth, desc, "spoolss_io_q_routerreplyprinter");
+ depth++;
+
+ if (!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
+ return False;
+
+ if (!prs_uint32("condition", ps, depth, &q_u->condition))
+ return False;
+
+ if (!prs_uint32("unknown1", ps, depth, &q_u->unknown1))
+ return False;
+
+ if (!prs_uint32("change_id", ps, depth, &q_u->change_id))
+ return False;
+
+ if (!prs_uint8s(False, "private", ps, depth, q_u->unknown2, 5))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Parse a SPOOL_R_ROUTERREPLYPRINTER structure.
+********************************************************************/
+BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "spoolss_io_r_routerreplyprinter");
+ depth++;
+
+ if (!prs_align(ps))
+ return False;
+
+ if (!prs_werror("status", ps, depth, &r_u->status))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd)
{
@@ -6154,12 +6340,79 @@ BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u,
return True;
}
+#if 0 /* JERRY - not currently used but could be :-) */
+
+/*******************************************************************
+ Deep copy a SPOOL_NOTIFY_INFO_DATA structure
+ ******************************************************************/
+static BOOL copy_spool_notify_info_data(SPOOL_NOTIFY_INFO_DATA *dst,
+ SPOOL_NOTIFY_INFO_DATA *src, int n)
+{
+ int i;
+
+ memcpy(dst, src, sizeof(SPOOL_NOTIFY_INFO_DATA)*n);
+
+ for (i=0; i<n; i++) {
+ int len;
+ uint16 *s = NULL;
+
+ if (src->size != POINTER)
+ continue;
+ len = src->notify_data.data.length;
+ s = malloc(sizeof(uint16)*len);
+ if (s == NULL) {
+ DEBUG(0,("copy_spool_notify_info_data: malloc() failed!\n"));
+ return False;
+ }
+
+ memcpy(s, src->notify_data.data.string, len*2);
+ dst->notify_data.data.string = s;
+ }
+
+ return True;
+}
+
+/*******************************************************************
+ Deep copy a SPOOL_NOTIFY_INFO structure
+ ******************************************************************/
+static BOOL copy_spool_notify_info(SPOOL_NOTIFY_INFO *dst, SPOOL_NOTIFY_INFO *src)
+{
+ if (!dst) {
+ DEBUG(0,("copy_spool_notify_info: NULL destination pointer!\n"));
+ return False;
+ }
+
+ dst->version = src->version;
+ dst->flags = src->flags;
+ dst->count = src->count;
+
+ if (dst->count)
+ {
+ dst->data = malloc(dst->count * sizeof(SPOOL_NOTIFY_INFO_DATA));
+
+ DEBUG(10,("copy_spool_notify_info: allocating space for [%d] PRINTER_NOTIFY_INFO_DATA entries\n",
+ dst->count));
+
+ if (dst->data == NULL) {
+ DEBUG(0,("copy_spool_notify_info: malloc() failed for [%d] entries!\n",
+ dst->count));
+ return False;
+ }
+
+ return (copy_spool_notify_info_data(dst->data, src->data, src->count));
+ }
+
+ return True;
+}
+#endif /* JERRY */
+
/*******************************************************************
* init a structure.
********************************************************************/
BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
- uint32 change_low, uint32 change_high)
+ uint32 change_low, uint32 change_high,
+ SPOOL_NOTIFY_INFO *info)
{
if (q_u == NULL)
return False;
@@ -6172,11 +6425,23 @@ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
q_u->unknown0=0x0;
q_u->unknown1=0x0;
- q_u->info_ptr=1;
+ q_u->info_ptr=0xaddee11e;
q_u->info.version=2;
- q_u->info.flags=PRINTER_NOTIFY_INFO_DISCARDED;
- q_u->info.count=0;
+
+ if (info->count) {
+ DEBUG(10,("make_spoolss_q_reply_rrpcn: [%d] PRINTER_NOTIFY_INFO_DATA\n",
+ info->count));
+ q_u->info.version = info->version;
+ q_u->info.flags = info->flags;
+ q_u->info.count = info->count;
+ /* pointer field - be careful! */
+ q_u->info.data = info->data;
+ }
+ else {
+ q_u->info.flags=PRINTER_NOTIFY_INFO_DISCARDED;
+ q_u->info.count=0;
+ }
return True;
}
@@ -6678,3 +6943,78 @@ BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCE
return True;
}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
+ int level, FORM *form)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ q_u->level = level;
+ q_u->level2 = level;
+ memcpy(&q_u->form, form, sizeof(FORM));
+
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
+ int level, char *form_name, FORM *form)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ q_u->level = level;
+ q_u->level2 = level;
+ memcpy(&q_u->form, form, sizeof(FORM));
+ init_unistr2(&q_u->name, form_name, strlen(form_name) + 1);
+
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ init_unistr2(&q_u->name, form, strlen(form) + 1);
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
+ char *formname, uint32 level, NEW_BUFFER *buffer,
+ uint32 offered)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ q_u->level = level;
+ init_unistr2(&q_u->formname, formname, strlen(formname) + 1);
+ q_u->buffer=buffer;
+ q_u->offered=offered;
+
+ return True;
+}
+
+/*******************************************************************
+ * init a structure.
+ ********************************************************************/
+
+BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
+ uint32 level, NEW_BUFFER *buffer,
+ uint32 offered)
+{
+ memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
+ q_u->level = level;
+ q_u->buffer=buffer;
+ q_u->offered=offered;
+
+ return True;
+}
diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c
index fa52b244956..3a1c13c7ea0 100644
--- a/source/rpc_parse/parse_srv.c
+++ b/source/rpc_parse/parse_srv.c
@@ -119,33 +119,34 @@ void init_srv_share_info2_str(SH_INFO_2_STR *sh2,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
+static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL)
return False;
+ if (UNMARSHALLING(ps))
+ ZERO_STRUCTP(sh2);
+
prs_debug(ps, depth, desc, "srv_io_share_info2_str");
depth++;
if(!prs_align(ps))
return False;
- if(!smb_io_unistr2("", &sh2->uni_netname, True, ps, depth))
- return False;
+ if (sh->ptr_netname)
+ if(!smb_io_unistr2("", &sh2->uni_netname, True, ps, depth))
+ return False;
- if(!prs_align(ps))
- return False;
- if(!smb_io_unistr2("", &sh2->uni_remark, True, ps, depth))
- return False;
+ if (sh->ptr_remark)
+ if(!smb_io_unistr2("", &sh2->uni_remark, True, ps, depth))
+ return False;
- if(!prs_align(ps))
- return False;
- if(!smb_io_unistr2("", &sh2->uni_path, True, ps, depth))
- return False;
+ if (sh->ptr_netname)
+ if(!smb_io_unistr2("", &sh2->uni_path, True, ps, depth))
+ return False;
- if(!prs_align(ps))
- return False;
- if(!smb_io_unistr2("", &sh2->uni_passwd, True, ps, depth))
- return False;
+ if (sh->ptr_passwd)
+ if(!smb_io_unistr2("", &sh2->uni_passwd, True, ps, depth))
+ return False;
return True;
}
@@ -208,6 +209,87 @@ static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int d
}
/*******************************************************************
+ Inits a SH_INFO_2 structure
+*******************************************************************/
+
+void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, char *remark, uint32 csc_policy)
+{
+ DEBUG(5,("init_srv_share_info501: %s %8x %s %08x\n", net_name, type,
+ remark, csc_policy));
+
+ ZERO_STRUCTP(sh501);
+
+ sh501->ptr_netname = (net_name != NULL) ? 1 : 0;
+ sh501->type = type;
+ sh501->ptr_remark = (remark != NULL) ? 1 : 0;
+ sh501->csc_policy = csc_policy;
+}
+
+/*******************************************************************
+ Reads of writes a structure.
+*******************************************************************/
+
+static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth)
+{
+ if (sh501 == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_share_info501");
+ depth++;
+
+ if (!prs_align(ps))
+ return False;
+
+ if (!prs_uint32("ptr_netname", ps, depth, &sh501->ptr_netname))
+ return False;
+ if (!prs_uint32("type ", ps, depth, &sh501->type))
+ return False;
+ if (!prs_uint32("ptr_remark ", ps, depth, &sh501->ptr_remark))
+ return False;
+ if (!prs_uint32("csc_policy ", ps, depth, &sh501->csc_policy))
+ return False;
+
+ return True;
+}
+
+/********************************************************************
+ Inits a SH_INFO_501_STR structure
+********************************************************************/
+
+void init_srv_share_info501_str(SH_INFO_501_STR *sh501, char *net_name, char *remark)
+{
+ DEBUG(5,("init_srv_share_info501_str\n"));
+
+ init_unistr2(&sh501->uni_netname, net_name, strlen(net_name)+1);
+ init_unistr2(&sh501->uni_remark, remark, strlen(remark)+1);
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth)
+{
+ if (sh501 == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_share_info501_str");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+ if(!smb_io_unistr2("", &sh501->uni_netname, True, ps, depth))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
+ if(!smb_io_unistr2("", &sh501->uni_remark, True, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
Inits a SH_INFO_502 structure
********************************************************************/
@@ -372,7 +454,7 @@ static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005,
if(!prs_align(ps))
return False;
- if(!prs_uint32("dfs_root_flag", ps, depth, &sh1005->dfs_root_flag))
+ if(!prs_uint32("misc_flags", ps, depth, &sh1005->misc_flags))
return False;
return True;
@@ -495,7 +577,33 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct
}
for (i = 0; i < num_entries; i++) {
- if(!srv_io_share_info2_str("", &info2[i].info_2_str, ps, depth))
+ if(!srv_io_share_info2_str("", &info2[i].info_2, &info2[i].info_2_str, ps, depth))
+ return False;
+ }
+
+ break;
+ }
+
+ case 501:
+ {
+ SRV_SHARE_INFO_501 *info501 = ctr->share.info501;
+ int num_entries = ctr->num_entries;
+ int i;
+
+ if (UNMARSHALLING(ps)) {
+ if (!(info501 = (SRV_SHARE_INFO_501 *) prs_alloc_mem(ps, num_entries *
+ sizeof (SRV_SHARE_INFO_501))))
+ return False;
+ ctr->share.info501 = info501;
+ }
+
+ for (i = 0; i < num_entries; i++) {
+ if (!srv_io_share_info501("", &info501[i].info_501, ps, depth))
+ return False;
+ }
+
+ for (i = 0; i < num_entries; i++) {
+ if (!srv_io_share_info501_str("", &info501[i].info_501_str, ps, depth))
return False;
}
@@ -614,7 +722,7 @@ BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *
return False;
if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -687,10 +795,17 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA
if(!srv_io_share_info2("", &r_n->share.info2.info_2, ps, depth))
return False;
- if(!srv_io_share_info2_str("", &r_n->share.info2.info_2_str, ps, depth))
+ if(!srv_io_share_info2_str("", &r_n->share.info2.info_2, &r_n->share.info2.info_2_str, ps, depth))
return False;
break;
+ case 501:
+ if (!srv_io_share_info501("", &r_n->share.info501.info_501, ps, depth))
+ return False;
+ if (!srv_io_share_info501_str("", &r_n->share.info501.info_501_str, ps, depth))
+ return False;
+ break;
+
case 502:
if(!srv_io_share_info502("", &r_n->share.info502.info_502, ps, depth))
return False;
@@ -739,7 +854,7 @@ BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_
if(!prs_align(ps))
return False;
- if(!prs_ntstatus("status", ps, depth, &r_n->status))
+ if(!prs_werror("status", ps, depth, &r_n->status))
return False;
return True;
@@ -800,7 +915,7 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_
if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value))
return False;
- if(!prs_ntstatus("status ", ps, depth, &q_n->status))
+ if(!prs_werror("status ", ps, depth, &q_n->status))
return False;
return True;
@@ -858,7 +973,7 @@ BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps
if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value))
return False;
- if(!prs_ntstatus("status ", ps, depth, &q_n->status))
+ if(!prs_werror("status ", ps, depth, &q_n->status))
return False;
return True;
@@ -905,7 +1020,7 @@ BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps
if(!prs_align(ps))
return False;
- if(!prs_ntstatus("status ", ps, depth, &q_n->status))
+ if(!prs_werror("status ", ps, depth, &q_n->status))
return False;
return True;
@@ -1308,7 +1423,7 @@ BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps
return False;
if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -1673,7 +1788,7 @@ BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *p
return False;
if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -1951,7 +2066,7 @@ BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps
return False;
if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -2237,13 +2352,13 @@ BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_stru
********************************************************************/
void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
- uint32 switch_value, SRV_INFO_CTR *ctr, NTSTATUS status)
+ uint32 switch_value, SRV_INFO_CTR *ctr, WERROR status)
{
DEBUG(5,("init_srv_r_net_srv_get_info\n"));
srv->ctr = ctr;
- if (NT_STATUS_IS_OK(status)) {
+ if (W_ERROR_IS_OK(status)) {
srv->ctr->switch_value = switch_value;
srv->ctr->ptr_srv_ctr = 1;
} else {
@@ -2259,7 +2374,7 @@ void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
********************************************************************/
void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv,
- uint32 switch_value, NTSTATUS status)
+ uint32 switch_value, WERROR status)
{
DEBUG(5,("init_srv_r_net_srv_set_info\n"));
@@ -2323,7 +2438,7 @@ BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_stru
if(!srv_io_info_ctr("ctr", r_n->ctr, ps, depth))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -2345,7 +2460,7 @@ BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n,
if(!prs_uint32("switch_value ", ps, depth, &r_n->switch_value))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -2464,7 +2579,7 @@ BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *
if(!srv_io_time_of_day_info("tod", r_n->tod, ps, depth))
return False;
- if(!prs_ntstatus("status ", ps, depth, &r_n->status))
+ if(!prs_werror("status ", ps, depth, &r_n->status))
return False;
return True;
@@ -2563,7 +2678,7 @@ BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps
if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
return False;
- if(!prs_ntstatus("status", ps, depth, &r_n->status))
+ if(!prs_werror("status", ps, depth, &r_n->status))
return False;
return True;
@@ -2623,7 +2738,7 @@ BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_st
if(!prs_align(ps))
return False;
- if(!prs_ntstatus("status", ps, depth, &r_n->status))
+ if(!prs_werror("status", ps, depth, &r_n->status))
return False;
return True;
@@ -2710,7 +2825,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r
if(!prs_align(ps))
return False;
- if(!prs_ntstatus("status", ps, depth, &r_n->status))
+ if(!prs_werror("status", ps, depth, &r_n->status))
return False;
return True;
@@ -2788,7 +2903,7 @@ BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n,
if(!prs_align(ps))
return False;
- if(!prs_ntstatus("status", ps, depth, &r_n->status))
+ if(!prs_werror("status", ps, depth, &r_n->status))
return False;
return True;
diff --git a/source/rpc_server/srv_dfs_nt.c b/source/rpc_server/srv_dfs_nt.c
index 5dcf7894f33..81763b447d1 100644
--- a/source/rpc_server/srv_dfs_nt.c
+++ b/source/rpc_server/srv_dfs_nt.c
@@ -22,7 +22,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* This is the implementation of the dfs pipe. */
+/* This is the implementation of the dfs pipe.
+ * $Id: srv_dfs_nt.c,v 1.1.2.3.2.4 2002/04/30 13:28:00 jra Exp $
+ */
#include "includes.h"
#include "nterr.h"
@@ -361,8 +363,8 @@ WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u,
if(!create_junction(path, &jn))
return WERR_DFS_NO_SUCH_SERVER;
- return WERR_DFS_NO_SUCH_VOL;
if(!get_referred_path(path, &jn, NULL, NULL))
+ return WERR_DFS_NO_SUCH_VOL;
r_u->level = level;
r_u->ptr_ctr = 1;
diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c
index 5504e4cf9c1..59bbc5263fa 100644
--- a/source/rpc_server/srv_lsa_hnd.c
+++ b/source/rpc_server/srv_lsa_hnd.c
@@ -29,6 +29,16 @@
#endif
/****************************************************************************
+ Hack as handles need to be persisant over lsa pipe closes so long as a samr
+ pipe is open. JRA.
+****************************************************************************/
+
+static BOOL is_samr_lsa_pipe(const char *pipe_name)
+{
+ return (strstr(pipe_name, "samr") || strstr(pipe_name, "lsa"));
+}
+
+/****************************************************************************
Initialise a policy handle list on a pipe. Handle list is shared between all
pipes of the same name.
****************************************************************************/
@@ -39,7 +49,8 @@ BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name)
struct handle_list *hl = NULL;
for (plist = get_first_pipe(); plist; plist = get_next_pipe(plist)) {
- if (strequal( plist->name, pipe_name)) {
+ if (strequal( plist->name, pipe_name) ||
+ (is_samr_lsa_pipe(plist->name) && is_samr_lsa_pipe(pipe_name))) {
if (!plist->pipe_handles) {
pstring msg;
slprintf(msg, sizeof(msg)-1, "init_pipe_handles: NULL pipe_handle pointer in pipe %s",
diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c
index 916850e1490..6c33d47bb06 100644
--- a/source/rpc_server/srv_lsa_nt.c
+++ b/source/rpc_server/srv_lsa_nt.c
@@ -263,8 +263,8 @@ static void init_lsa_trans_names(TALLOC_CTX *ctx, DOM_R_REF *ref, LSA_TRANS_NAME
/* unistr routines take dos codepage strings */
- unix_to_dos(dom_name, True);
- unix_to_dos(name, True);
+ unix_to_dos(dom_name);
+ unix_to_dos(name);
dom_idx = init_dom_ref(ref, dom_name, &find_sid);
@@ -371,10 +371,10 @@ NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INF
return NT_STATUS_INVALID_HANDLE;
fstrcpy(dos_myname, global_myname);
- unix_to_dos(dos_myname, True);
+ unix_to_dos(dos_myname);
fstrcpy(dos_domain, global_myworkgroup);
- unix_to_dos(dos_domain, True);
+ unix_to_dos(dos_domain);
switch (q_u->info_class) {
case 0x02:
@@ -481,14 +481,14 @@ NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_
LSA_TRANS_NAME_ENUM *names = NULL;
uint32 mapped_count = 0;
- if (!find_policy_by_hnd(p, &q_u->pol, NULL))
- return NT_STATUS_INVALID_HANDLE;
-
ref = (DOM_R_REF *)talloc_zero(p->mem_ctx, sizeof(DOM_R_REF));
names = (LSA_TRANS_NAME_ENUM *)talloc_zero(p->mem_ctx, sizeof(LSA_TRANS_NAME_ENUM));
- if (!ref || !names)
- return NT_STATUS_NO_MEMORY;
+ if (!find_policy_by_hnd(p, &q_u->pol, NULL))
+ r_u->status = NT_STATUS_INVALID_HANDLE;
+
+ if ((!ref || !names) && NT_STATUS_IS_OK(r_u->status))
+ r_u->status = NT_STATUS_NO_MEMORY;
/* set up the LSA Lookup SIDs response */
init_lsa_trans_names(p->mem_ctx, ref, names, num_entries, sid, &mapped_count);
@@ -509,14 +509,14 @@ NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP
DOM_RID2 *rids;
uint32 mapped_count = 0;
- if (!find_policy_by_hnd(p, &q_u->pol, NULL))
- return NT_STATUS_INVALID_HANDLE;
-
ref = (DOM_R_REF *)talloc_zero(p->mem_ctx, sizeof(DOM_R_REF));
rids = (DOM_RID2 *)talloc_zero(p->mem_ctx, sizeof(DOM_RID2)*MAX_LOOKUP_SIDS);
- if (!ref || !rids)
- return NT_STATUS_NO_MEMORY;
+ if (!find_policy_by_hnd(p, &q_u->pol, NULL))
+ r_u->status = NT_STATUS_INVALID_HANDLE;
+
+ if ((!ref || !rids) && NT_STATUS_IS_OK(r_u->status))
+ r_u->status = NT_STATUS_NO_MEMORY;
/* set up the LSA Lookup RIDs response */
init_lsa_rid2s(ref, rids, num_entries, names, &mapped_count, p->endian);
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index baec307b888..5882f9a5cc7 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -577,6 +577,12 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
if (!usr_info)
return NT_STATUS_NO_MEMORY;
ZERO_STRUCTP(usr_info);
+
+ /* store the user information, if there is any. */
+ r_u->user = usr_info;
+ r_u->switch_value = 0; /* indicates no info */
+ r_u->auth_resp = 1; /* authoritative response */
+ r_u->switch_value = 3; /* indicates type of validation user info */
if (!get_valid_user_struct(p->vuid))
return NT_STATUS_NO_SUCH_USER;
@@ -590,12 +596,6 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
r_u->buffer_creds = 1; /* yes, we have valid server credentials */
memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
- /* store the user information, if there is any. */
- r_u->user = usr_info;
- r_u->switch_value = 0; /* indicates no info */
- r_u->auth_resp = 1; /* authoritative response */
- r_u->switch_value = 3; /* indicates type of validation user info */
-
/* find the username */
switch (q_u->sam_id.logon_level) {
diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c
index 65725bc2baa..61b608c0e82 100644
--- a/source/rpc_server/srv_pipe_hnd.c
+++ b/source/rpc_server/srv_pipe_hnd.c
@@ -40,10 +40,13 @@ static int pipes_open;
* writers more than I hate the Windows spooler service driver
* writers. This gets around a combination of bugs in the spooler
* and the HP 8500 PCL driver that causes a spooler spin. JRA.
+ *
+ * bumped up from 20 -> 64 after viewing traffic from WordPerfect
+ * 2002 running on NT 4.- SP6
*/
#ifndef MAX_OPEN_SPOOLSS_PIPES
-#define MAX_OPEN_SPOOLSS_PIPES 20
+#define MAX_OPEN_SPOOLSS_PIPES 64
#endif
static int current_spoolss_pipes_open;
@@ -267,6 +270,9 @@ pipes_struct *open_rpc_pipe_p(char *pipe_name,
if (is_spoolss_pipe)
current_spoolss_pipes_open++;
+ /* Ensure the connection isn't idled whilst this pipe is open. */
+ conn->num_files_open++;
+
return chain_p;
}
@@ -497,13 +503,13 @@ authentication failed. Denying the request.\n", p->name));
}
/*
- * Check the data length doesn't go over the 10Mb limit.
+ * Check the data length doesn't go over the 15Mb limit.
* increased after observing a bug in the Windows NT 4.0 SP6a
* spoolsv.exe when the response to a GETPRINTERDRIVER2 RPC
* will not fit in the initial buffer of size 0x1068 --jerry 22/01/2002
*/
- if(prs_data_size(&p->in_data.data) + data_len > 15*1024*1024) {
+ if(prs_offset(&p->in_data.data) + data_len > 15*1024*1024) {
DEBUG(0,("process_request_pdu: rpc data buffer too large (%u) + (%u)\n",
(unsigned int)prs_data_size(&p->in_data.data), (unsigned int)data_len ));
set_incoming_fault(p);
@@ -957,7 +963,9 @@ BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn)
ZERO_STRUCTP(p);
SAFE_FREE(p);
-
+
+ conn->num_files_open--;
+
return True;
}
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 2f1f6bce8c2..68f010beea7 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -975,10 +975,10 @@ NTSTATUS _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_
}
/* calculate the size and limit on the number of entries we will return */
- temp_size=(enum_context+max_entries)*struct_size;
+ temp_size=max_entries*struct_size;
if (temp_size>max_size) {
- max_entries=max_size/struct_size;
+ max_entries=MIN((max_size/struct_size),max_entries);
DEBUG(5, ("samr_reply_query_dispinfo: buffer size limits to only %d entries\n", max_entries));
}
@@ -2031,16 +2031,27 @@ NTSTATUS _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u
NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_LOOKUP_DOMAIN *r_u)
{
- r_u->status = NT_STATUS_OK;
+ fstring domain_name;
+ DOM_SID sid;
+
+ r_u->status = NT_STATUS_OK;
- if (!find_policy_by_hnd(p, &q_u->connect_pol, NULL))
- return NT_STATUS_INVALID_HANDLE;
+ if (!find_policy_by_hnd(p, &q_u->connect_pol, NULL))
+ return NT_STATUS_INVALID_HANDLE;
- /* assume the domain name sent is our global_myname and
- send global_sam_sid */
- init_samr_r_lookup_domain(r_u, &global_sam_sid, r_u->status);
+ fstrcpy(domain_name, dos_unistrn2( q_u->uni_domain.buffer, q_u->uni_domain.uni_str_len));
- return r_u->status;
+ ZERO_STRUCT(sid);
+
+ if (!secrets_fetch_domain_sid(domain_name, &sid)) {
+ r_u->status = NT_STATUS_NO_SUCH_DOMAIN;
+ }
+
+ DEBUG(2,("Returning domain sid for domain %s -> %s\n", domain_name, sid_string_static(&sid)));
+
+ init_samr_r_lookup_domain(r_u, &sid, r_u->status);
+
+ return r_u->status;
}
/******************************************************************
@@ -2089,10 +2100,21 @@ NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_EN
{
uint32 num_entries = 2;
fstring dom[2];
+ char *name;
r_u->status = NT_STATUS_OK;
- fstrcpy(dom[0],global_myworkgroup);
+ switch (lp_server_role()) {
+ case ROLE_DOMAIN_PDC:
+ case ROLE_DOMAIN_BDC:
+ name = global_myworkgroup;
+ break;
+ default:
+ name = global_myname;
+ }
+
+ fstrcpy(dom[0],name);
+ strupper(dom[0]);
fstrcpy(dom[1],"Builtin");
if (!make_enum_domains(p->mem_ctx, &r_u->sam, &r_u->uni_dom_name, num_entries, dom))
diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c
index e71bcd36a9a..226345b22d1 100755
--- a/source/rpc_server/srv_spoolss.c
+++ b/source/rpc_server/srv_spoolss.c
@@ -25,6 +25,36 @@
#include "includes.h"
/********************************************************************
+ * api_spoolss_open_printer_ex (rarely seen - older call)
+ ********************************************************************/
+
+static BOOL api_spoolss_open_printer(pipes_struct *p)
+{
+ SPOOL_Q_OPEN_PRINTER q_u;
+ SPOOL_R_OPEN_PRINTER r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ if (!spoolss_io_q_open_printer("", &q_u, data, 0)) {
+ DEBUG(0,("spoolss_io_q_open_printer: unable to unmarshall SPOOL_Q_OPEN_PRINTER.\n"));
+ return False;
+ }
+
+ r_u.status = _spoolss_open_printer( p, &q_u, &r_u);
+
+ if (!spoolss_io_r_open_printer("",&r_u,rdata,0)){
+ DEBUG(0,("spoolss_io_r_open_printer: unable to marshall SPOOL_R_OPEN_PRINTER.\n"));
+ return False;
+ }
+
+ return True;
+}
+
+
+/********************************************************************
* api_spoolss_open_printer_ex
********************************************************************/
@@ -976,7 +1006,33 @@ static BOOL api_spoolss_setprinterdata(pipes_struct *p)
/****************************************************************************
****************************************************************************/
+static BOOL api_spoolss_reset_printer(pipes_struct *p)
+{
+ SPOOL_Q_RESETPRINTER q_u;
+ SPOOL_R_RESETPRINTER r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+ if(!spoolss_io_q_resetprinter("", &q_u, data, 0)) {
+ DEBUG(0,("spoolss_io_q_setprinterdata: unable to unmarshall SPOOL_Q_SETPRINTERDATA.\n"));
+ return False;
+ }
+
+ r_u.status = _spoolss_resetprinter(p, &q_u, &r_u);
+
+ if(!spoolss_io_r_resetprinter("", &r_u, rdata, 0)) {
+ DEBUG(0,("spoolss_io_r_setprinterdata: unable to marshall SPOOL_R_RESETPRINTER.\n"));
+ return False;
+ }
+
+ return True;
+}
+
+/****************************************************************************
+****************************************************************************/
static BOOL api_spoolss_addform(pipes_struct *p)
{
SPOOL_Q_ADDFORM q_u;
@@ -1319,11 +1375,6 @@ static BOOL api_spoolss_enumprinterdataex(pipes_struct *p)
/****************************************************************************
****************************************************************************/
-/* Disabled because it doesn't fix the bug I am looking at but it would be
- a shame to throw away the code. -tpot */
-
-#if 0
-
static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p)
{
SPOOL_Q_GETPRINTPROCESSORDIRECTORY q_u;
@@ -1349,14 +1400,13 @@ static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p)
return True;
}
-#endif
-
/*******************************************************************
\pipe\spoolss commands
********************************************************************/
struct api_struct api_spoolss_cmds[] =
{
+ {"SPOOLSS_OPENPRINTER", SPOOLSS_OPENPRINTER, api_spoolss_open_printer },
{"SPOOLSS_OPENPRINTEREX", SPOOLSS_OPENPRINTEREX, api_spoolss_open_printer_ex },
{"SPOOLSS_GETPRINTERDATA", SPOOLSS_GETPRINTERDATA, api_spoolss_getprinterdata },
{"SPOOLSS_CLOSEPRINTER", SPOOLSS_CLOSEPRINTER, api_spoolss_closeprinter },
@@ -1387,6 +1437,7 @@ struct api_struct api_spoolss_cmds[] =
{"SPOOLSS_GETPRINTERDRIVERDIRECTORY", SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_getprinterdriverdirectory },
{"SPOOLSS_ENUMPRINTERDATA", SPOOLSS_ENUMPRINTERDATA, api_spoolss_enumprinterdata },
{"SPOOLSS_SETPRINTERDATA", SPOOLSS_SETPRINTERDATA, api_spoolss_setprinterdata },
+ {"SPOOLSS_RESETPRINTER", SPOOLSS_RESETPRINTER, api_spoolss_reset_printer },
{"SPOOLSS_DELETEPRINTERDATA", SPOOLSS_DELETEPRINTERDATA, api_spoolss_deleteprinterdata },
{"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform },
{"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform },
@@ -1401,11 +1452,7 @@ struct api_struct api_spoolss_cmds[] =
{"SPOOLSS_SETPRINTERDATAEX", SPOOLSS_SETPRINTERDATAEX, api_spoolss_setprinterdataex },
{"SPOOLSS_ENUMPRINTERKEY", SPOOLSS_ENUMPRINTERKEY, api_spoolss_enumprinterkey },
{"SPOOLSS_ENUMPRINTERDATAEX", SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_enumprinterdataex },
-#if 0
- /* Disabled because it doesn't fix the bug I am looking at but it would be
- a shame to throw away the code. -tpot */
{"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory},
-#endif
{ NULL, 0, NULL }
};
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index 521fbbe306e..6288ef2916c 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -1,12 +1,12 @@
/*
- * Unix SMB/Netbios implementation.
- * Version 1.9.
+ * Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-2000,
* Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
- * Copyright (C) Jean François Micouleau 1998-2000.
- * Copyright (C) Jeremy Allison 2001.
- * Copyright (C) Gerald Carter 2000-2001.
+ * Copyright (C) Jean François Micouleau 1998-2000,
+ * Copyright (C) Jeremy Allison 2001,
+ * Copyright (C) Gerald Carter 2000-2001,
+ * Copyright (C) Tim Potter 2001-2002.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ typedef struct _Printer{
fstring printerservername;
} dev;
uint32 type;
- uint32 access;
+ uint32 access_granted;
struct {
uint32 flags;
uint32 options;
@@ -90,6 +90,11 @@ static ubi_dlList counter_list;
static struct cli_state cli;
static uint32 smb_connections=0;
+
+/* in printing/nt_printing.c */
+
+extern STANDARD_MAPPING printer_std_mapping, printserver_std_mapping;
+
#define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \
((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid())
@@ -157,7 +162,7 @@ static void free_spool_notify_option(SPOOL_NOTIFY_OPTION **pp)
static void srv_spoolss_replycloseprinter(POLICY_HND *handle)
{
- WERROR status;
+ WERROR result;
/* weird if the test succeds !!! */
if (smb_connections==0) {
@@ -165,8 +170,11 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle)
return;
}
- if(!cli_spoolss_reply_close_printer(&cli, handle, &status))
- DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed.\n"));
+ result = cli_spoolss_reply_close_printer(&cli, cli.mem_ctx, handle);
+
+ if (!W_ERROR_IS_OK(result))
+ DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n",
+ dos_errstr(result)));
/* if it's the last connection, deconnect the IPC$ share */
if (smb_connections==1) {
@@ -305,7 +313,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)
/* Printer->dev.handlename equals portname equals sharename */
slprintf(command, sizeof(command)-1, "%s \"%s\"", cmd,
Printer->dev.handlename);
- dos_to_unix(command, True); /* Convert printername to unix-codepage */
+ dos_to_unix(command); /* Convert printername to unix-codepage */
DEBUG(10,("Running [%s]\n", command));
ret = smbrun(command, NULL);
@@ -328,8 +336,9 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)
}
/****************************************************************************
- return the snum of a printer corresponding to an handle
+ Return the snum of a printer corresponding to an handle.
****************************************************************************/
+
static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number)
{
Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
@@ -352,23 +361,6 @@ static BOOL get_printer_snum(pipes_struct *p, POLICY_HND *hnd, int *number)
}
/****************************************************************************
- set printer handle type.
-****************************************************************************/
-static BOOL set_printer_hnd_accesstype(pipes_struct *p, POLICY_HND *hnd, uint32 access_required)
-{
- Printer_entry *Printer = find_printer_index_by_hnd(p, hnd);
-
- if (!Printer) {
- DEBUG(2,("set_printer_hnd_accesstype: Invalid handle (%s:%u:%u)", OUR_HANDLE(hnd)));
- return False;
- }
-
- DEBUG(4,("Setting printer access=%x\n", access_required));
- Printer->access = access_required;
- return True;
-}
-
-/****************************************************************************
Set printer handle type.
Check if it's \\server or \\server\printer
****************************************************************************/
@@ -402,10 +394,10 @@ static BOOL set_printer_hnd_printertype(Printer_entry *Printer, char *handlename
static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename)
{
- NT_PRINTER_INFO_LEVEL *printer = NULL;
int snum;
int n_services=lp_numservices();
char *aprinter;
+ fstring sname;
BOOL found=False;
DEBUG(4,("Setting printer name=%s (len=%d)\n", handlename, strlen(handlename)));
@@ -430,106 +422,49 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename)
DEBUGADD(5,("searching for [%s] (len=%d)\n", aprinter, strlen(aprinter)));
/*
- * store the Samba share name in it
- * in back we have the long printer name
- * need to iterate all the snum and do a
- * get_a_printer each time to find the printer
- * faster to do it here than later.
+ * The original code allowed smbd to store a printer name that
+ * was different from the share name. This is not possible
+ * anymore, so I've simplified this loop greatly. Here
+ * we are just verifying that the printer name is a valid
+ * printer service defined in smb.conf
+ * --jerry [Fri Feb 15 11:17:46 CST 2002]
*/
- for (snum=0;snum<n_services && found==False;snum++) {
- char *printername;
-
+ for (snum=0; snum<n_services; snum++) {
+
if ( !(lp_snum_ok(snum) && lp_print_ok(snum) ) )
continue;
- DEBUGADD(5,("share:%s\n",lp_servicename(snum)));
-
- if (!W_ERROR_IS_OK(get_a_printer(&printer, 2, lp_servicename(snum))))
- continue;
+ fstrcpy(sname, lp_servicename(snum));
- printername=strchr(printer->info_2->printername+2, '\\');
- printername++;
-
- DEBUG(10,("set_printer_hnd_name: name [%s], aprinter [%s]\n",
- printer->info_2->printername, aprinter ));
-
- if ( strlen(printername) != strlen(aprinter) ) {
- free_a_printer(&printer, 2);
- continue;
- }
+ DEBUGADD(5,("share:%s\n",sname));
- if ( strncasecmp(printername, aprinter, strlen(aprinter))) {
- free_a_printer(&printer, 2);
- continue;
+ if (! StrCaseCmp(sname, aprinter)) {
+ found = True;
+ break;
}
-
- found=True;
- }
-
- /*
- * if we haven't found a printer with the given handlename
- * then it can be a share name as you can open both \\server\printer and
- * \\server\share
- */
-
- /*
- * we still check if the printer description file exists as NT won't be happy
- * if we reply OK in the openprinter call and can't reply in the subsequent RPC calls
- */
-
- if (found==False) {
- DEBUGADD(5,("Printer not found, checking for share now\n"));
-
- for (snum=0;snum<n_services && found==False;snum++) {
-
- if ( !(lp_snum_ok(snum) && lp_print_ok(snum) ) )
- continue;
-
- DEBUGADD(5,("set_printer_hnd_name: share:%s\n",lp_servicename(snum)));
-
- if (!W_ERROR_IS_OK(get_a_printer(&printer, 2, lp_servicename(snum))))
- continue;
-
- DEBUG(10,("set_printer_hnd_name: printername [%s], aprinter [%s]\n",
- printer->info_2->printername, aprinter ));
- if ( strlen(lp_servicename(snum)) != strlen(aprinter) ) {
- free_a_printer(&printer, 2);
- continue;
- }
-
- if ( strncasecmp(lp_servicename(snum), aprinter, strlen(aprinter))) {
- free_a_printer(&printer, 2);
- continue;
- }
-
- found=True;
- }
}
+
- if (found==False) {
+ if (!found) {
DEBUGADD(4,("Printer not found\n"));
return False;
}
- snum--;
- DEBUGADD(4,("set_printer_hnd_name: Printer found: %s -> %s[%x]\n",
- printer->info_2->printername, lp_servicename(snum),snum));
+ DEBUGADD(4,("set_printer_hnd_name: Printer found: %s -> %s\n", aprinter, sname));
ZERO_STRUCT(Printer->dev.handlename);
- strncpy(Printer->dev.handlename, lp_servicename(snum), strlen(lp_servicename(snum)));
-
- free_a_printer(&printer, 2);
+ fstrcpy(Printer->dev.handlename, sname);
return True;
}
/****************************************************************************
- find first available printer slot. creates a printer handle for you.
+ Find first available printer slot. creates a printer handle for you.
****************************************************************************/
-static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name)
+static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name, uint32 access_granted)
{
Printer_entry *new_printer;
@@ -560,31 +495,17 @@ static BOOL open_printer_hnd(pipes_struct *p, POLICY_HND *hnd, char *name)
return False;
}
- DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count ));
-
- return True;
-}
-
-/********************************************************************
- Return True if the handle is a print server.
- ********************************************************************/
+ new_printer->access_granted = access_granted;
-static BOOL handle_is_printserver(pipes_struct *p, POLICY_HND *handle)
-{
- Printer_entry *Printer=find_printer_index_by_hnd(p,handle);
+ DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count ));
- if (!Printer)
- return False;
-
- if (Printer->printer_type != PRINTER_HANDLE_IS_PRINTSERVER)
- return False;
-
return True;
}
/****************************************************************************
- allocate more memory for a BUFFER.
+ Allocate more memory for a BUFFER.
****************************************************************************/
+
static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size)
{
prs_struct *ps;
@@ -615,79 +536,431 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size)
return True;
}
+/***************************************************************************
+ Always give preference Printer_entry.notify.option over
+ Printer_entry.notify.flags. Return True if we should send notification
+ events using SPOOLSS_RRPCN. False means that we should use
+ SPOOLSS_ROUTERREPLYPRINTER.
+ **************************************************************************/
+static BOOL valid_notify_options(Printer_entry *printer)
+{
+ if (printer->notify.option == NULL)
+ return False;
+
+ return True;
+}
+
+/***************************************************************************
+ Simple check to see if the client motify handle is set to watch for events
+ represented by 'flags'
+
+ FIXME!!!! only a stub right now --jerry
+ **************************************************************************/
+
+static BOOL is_client_monitoring_event(Printer_entry *p, uint32 flags)
+{
+
+ return True;
+}
/***************************************************************************
- Receive the notify message.
-****************************************************************************/
+ Server wrapper for cli_spoolss_routerreplyprinter() since the client
+ function can only send a single change notification at a time.
+
+ FIXME!!! only handles one change currently (PRINTER_CHANGE_SET_PRINTER_DRIVER)
+ --jerry
+ **************************************************************************/
+
+static WERROR srv_spoolss_routerreplyprinter (struct cli_state *reply_cli, TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol, PRINTER_MESSAGE_INFO *info,
+ NT_PRINTER_INFO_LEVEL *printer)
+{
+ WERROR result;
+ uint32 condition = 0x0;
+
+ if (info->flags & PRINTER_MESSAGE_DRIVER)
+ condition = PRINTER_CHANGE_SET_PRINTER_DRIVER;
+
+ result = cli_spoolss_routerreplyprinter(reply_cli, mem_ctx, pol, condition,
+ printer->info_2->changeid);
-static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len)
+ return result;
+}
+
+/***********************************************************************
+ Wrapper around the decision of which RPC use to in the change
+ notification
+ **********************************************************************/
+
+static WERROR srv_spoolss_send_event_to_client(Printer_entry* Printer,
+ struct cli_state *send_cli, PRINTER_MESSAGE_INFO *msg,
+ NT_PRINTER_INFO_LEVEL *info)
{
- Printer_entry *find_printer;
- WERROR status;
- char msg[8];
- uint32 low, high;
+ WERROR result;
+
+ if (valid_notify_options(Printer)) {
+ /* This is a single call that can send information about multiple changes */
+ if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER)
+ msg->flags |= PRINTER_MESSAGE_ATTRIBUTES;
- if (len != sizeof(msg)) {
- DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len));
- return;
+ result = cli_spoolss_reply_rrpcn(send_cli, send_cli->mem_ctx, &Printer->notify.client_hnd,
+ msg, info);
}
+ else {
+ /* This requires that the server send an individual event notification for each change */
+ result = srv_spoolss_routerreplyprinter(send_cli, send_cli->mem_ctx, &Printer->notify.client_hnd,
+ msg, info);
+ }
+
+ return result;
+}
- memcpy(msg, buf, len);
- low = IVAL(msg,0);
- high = IVAL(msg,4);
-
- DEBUG(10,("srv_spoolss_receive_message: Got message printer change low=0x%x high=0x%x\n", (unsigned int)low,
- (unsigned int)high ));
- find_printer = printers_list;
+/***********************************************************************
+ Send a change notication message on all handles which have a call
+ back registered
+ **********************************************************************/
- /* Iterate the printer list */
- for(; find_printer; find_printer = find_printer->next) {
+static void send_spoolss_event_notification(PRINTER_MESSAGE_INFO *msg)
+{
+ Printer_entry *find_printer;
+ WERROR result;
+ NT_PRINTER_INFO_LEVEL *printer = NULL;
+
+ if (!msg) {
+ DEBUG(0,("send_spoolss_event_notification: NULL msg pointer!\n"));
+ return;
+ }
+
+ for(find_printer = printers_list; find_printer; find_printer = find_printer->next) {
/*
- * If the entry has a connected client we send the message.
+ * If the entry has a connected client we send the message. There should
+ * only be one of these normally when dealing with the NT/2k spooler.
+ * However, iterate over all to make sure we deal with user applications
+ * in addition to spooler service.
+ *
+ * While we are only maintaining a single connection to the client,
+ * the FindFirstPrinterChangeNotification() call is made on a printer
+ * handle, so "client_connected" represents the whether or not the
+ * client asked for change notication on this handle.
+ *
+ * --jerry
*/
-
if (find_printer->notify.client_connected==True) {
- DEBUG(10,("srv_spoolss_receive_message: printerserver [%s]\n", find_printer->dev.printerservername ));
- if (cli_spoolss_reply_rrpcn(&cli, &find_printer->notify.client_hnd, low, high, &status))
- DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn status = 0x%x\n",
- (unsigned int)W_ERROR_V(status)));
+
+ /* does the client care about what changed? */
+
+ if (msg->flags && !is_client_monitoring_event(find_printer, msg->flags)) {
+ DEBUG(10,("send_spoolss_event_notification: Client [%s] not monitoring these events\n",
+ find_printer->client.machine));
+ continue;
+ }
+
+ if (find_printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER)
+ DEBUG(10,("send_spoolss_event_notification: printserver [%s]\n", find_printer->dev.printerservername ));
else
- DEBUG(10,("srv_spoolss_receive_message: cli_spoolss_reply_rrpcn failed\n"));
+ DEBUG(10,("send_spoolss_event_notification: printer [%s]\n", find_printer->dev.handlename));
+
+ /*
+ * if handle is a printer, only send if the printer_name matches.
+ * ...else if handle is a printerserver, send to all
+ */
+
+ if (*msg->printer_name && (find_printer->printer_type==PRINTER_HANDLE_IS_PRINTER)
+ && !strequal(msg->printer_name, find_printer->dev.handlename))
+ {
+ DEBUG(10,("send_spoolss_event_notification: ignoring message sent to %s [%s]\n",
+ msg->printer_name, find_printer->dev.handlename ));
+ continue;
+ }
+
+
+ /* lookup the printer if we have a name if we don't already have a
+ valid NT_PRINTER_INFO_LEVEL structure. And yes I'm assuming we
+ will always have a non-empty msg.printer_name */
+
+ if (!printer || !printer->info_2 || strcmp(msg->printer_name, printer->info_2->printername))
+ {
+
+ if (printer) {
+ free_a_printer(&printer, 2);
+ printer = NULL;
+ }
+
+ result = get_a_printer(&printer, 2, msg->printer_name);
+ if (!W_ERROR_IS_OK(result))
+ continue;
+ }
+
+ /* issue the client call */
+
+ result = srv_spoolss_send_event_to_client(find_printer, &cli, msg, printer);
+
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(5,("send_spoolss_event_notification: Event notification failed [%s]\n",
+ dos_errstr(result)));
+ }
}
}
+
+ return;
+}
+/***************************************************************************
+ Receive the notify message and decode the message. Do not send
+ notification if we sent this originally as that would result in
+ duplicates.
+****************************************************************************/
+
+static void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len)
+{
+ PRINTER_MESSAGE_INFO msg;
+
+ if (len < sizeof(msg)) {
+ DEBUG(2,("srv_spoolss_receive_message: got incorrect message size (%u)!\n", (unsigned int)len));
+ return;
+ }
+
+ memcpy(&msg, buf, sizeof(PRINTER_MESSAGE_INFO));
+
+ DEBUG(10,("srv_spoolss_receive_message: Got message printer change [queue = %s] low=0x%x high=0x%x flags=0x%x\n",
+ msg.printer_name, (unsigned int)msg.low, (unsigned int)msg.high, msg.flags ));
+
+ /* Iterate the printer list */
+
+ send_spoolss_event_notification(&msg);
+
}
/***************************************************************************
Send a notify event.
****************************************************************************/
-static BOOL srv_spoolss_sendnotify(uint32 high, uint32 low)
+static BOOL srv_spoolss_sendnotify(char* printer_name, uint32 high, uint32 low, uint32 flags)
{
- char msg[8];
-
- SIVAL(msg,0,low);
- SIVAL(msg,4,high);
- DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x\n", low, high));
+ char msg[sizeof(PRINTER_MESSAGE_INFO)];
+ PRINTER_MESSAGE_INFO info;
+
+ ZERO_STRUCT(info);
- message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(msg), False);
+ info.low = low;
+ info.high = high;
+ info.flags = flags;
+ fstrcpy(info.printer_name, printer_name);
+
+ memcpy(msg, &info, sizeof(PRINTER_MESSAGE_INFO));
+
+ DEBUG(10,("srv_spoolss_sendnotify: printer change low=0x%x high=0x%x [%s], flags=0x%x\n",
+ low, high, printer_name, flags));
+
+ message_send_all(conn_tdb_ctx(), MSG_PRINTER_NOTIFY, msg, sizeof(PRINTER_MESSAGE_INFO),
+ False, NULL);
+
return True;
}
/********************************************************************
+ Send a message to ourself about new driver being installed
+ so we can upgrade the information for each printer bound to this
+ driver
+ ********************************************************************/
+
+static BOOL srv_spoolss_drv_upgrade_printer(char* drivername)
+{
+ int len = strlen(drivername);
+
+ if (!len)
+ return False;
+
+ DEBUG(10,("srv_spoolss_drv_upgrade_printer: Sending message about driver upgrade [%s]\n",
+ drivername));
+
+ message_send_pid(sys_getpid(), MSG_PRINTER_DRVUPGRADE, drivername, len+1, False);
+
+ return True;
+}
+
+/**********************************************************************
+ callback to receive a MSG_PRINTER_DRVUPGRADE message and interate
+ over all printers, upgrading ones as neessary
+ **********************************************************************/
+
+void do_drv_upgrade_printer(int msg_type, pid_t src, void *buf, size_t len)
+{
+ fstring drivername;
+ int snum;
+ int n_services = lp_numservices();
+
+ len = MIN(len,sizeof(drivername)-1);
+ strncpy(drivername, buf, len);
+
+ DEBUG(10,("do_drv_upgrade_printer: Got message for new driver [%s]\n", drivername ));
+
+ /* Iterate the printer list */
+
+ for (snum=0; snum<n_services; snum++)
+ {
+ if (lp_snum_ok(snum) && lp_print_ok(snum) )
+ {
+ WERROR result;
+ NT_PRINTER_INFO_LEVEL *printer = NULL;
+
+ result = get_a_printer(&printer, 2, lp_servicename(snum));
+ if (!W_ERROR_IS_OK(result))
+ continue;
+
+ if (printer && printer->info_2 && !strcmp(drivername, printer->info_2->drivername))
+ {
+ DEBUG(6,("Updating printer [%s]\n", printer->info_2->printername));
+
+ /* all we care about currently is the change_id */
+
+ result = mod_a_printer(*printer, 2);
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(3,("do_drv_upgrade_printer: mod_a_printer() failed with status [%s]\n",
+ dos_errstr(result)));
+ }
+ }
+
+ free_a_printer(&printer, 2);
+ }
+ }
+
+ /* all done */
+}
+
+/********************************************************************
+ Copy routines used by convert_to_openprinterex()
+ *******************************************************************/
+
+static DEVICEMODE* dup_devicemode(TALLOC_CTX *ctx, DEVICEMODE *devmode)
+{
+ DEVICEMODE *d;
+ int len;
+
+ if (!devmode)
+ return NULL;
+
+ DEBUG (8,("dup_devmode\n"));
+
+ /* bulk copy first */
+
+ d = talloc_memdup(ctx, devmode, sizeof(DEVICEMODE));
+ if (!d)
+ return NULL;
+
+ /* dup the pointer members separately */
+
+ len = unistrlen(devmode->devicename.buffer);
+ if (len != -1) {
+ d->devicename.buffer = talloc(ctx, len*2);
+ if (unistrcpy(d->devicename.buffer, devmode->devicename.buffer) != len)
+ return NULL;
+ }
+
+
+ len = unistrlen(devmode->formname.buffer);
+ if (len != -1) {
+ d->devicename.buffer = talloc(ctx, len*2);
+ if (unistrcpy(d->formname.buffer, devmode->formname.buffer) != len)
+ return NULL;
+ }
+
+ d->private = talloc_memdup(ctx, devmode->private, devmode->driverextra);
+
+ return d;
+}
+
+static void copy_devmode_ctr(TALLOC_CTX *ctx, DEVMODE_CTR *new_ctr, DEVMODE_CTR *ctr)
+{
+ if (!new_ctr || !ctr)
+ return;
+
+ DEBUG(8,("copy_devmode_ctr\n"));
+
+ new_ctr->size = ctr->size;
+ new_ctr->devmode_ptr = ctr->devmode_ptr;
+
+ if(ctr->devmode_ptr)
+ new_ctr->devmode = dup_devicemode(ctx, ctr->devmode);
+}
+
+static void copy_printer_default(TALLOC_CTX *ctx, PRINTER_DEFAULT *new_def, PRINTER_DEFAULT *def)
+{
+ if (!new_def || !def)
+ return;
+
+ DEBUG(8,("copy_printer_defaults\n"));
+
+ new_def->datatype_ptr = def->datatype_ptr;
+
+ if (def->datatype_ptr)
+ copy_unistr2(&new_def->datatype, &def->datatype);
+
+ copy_devmode_ctr(ctx, &new_def->devmode_cont, &def->devmode_cont);
+
+ new_def->access_required = def->access_required;
+}
+
+/********************************************************************
+ * Convert a SPOOL_Q_OPEN_PRINTER structure to a
+ * SPOOL_Q_OPEN_PRINTER_EX structure
+ ********************************************************************/
+
+static void convert_to_openprinterex(TALLOC_CTX *ctx, SPOOL_Q_OPEN_PRINTER_EX *q_u_ex, SPOOL_Q_OPEN_PRINTER *q_u)
+{
+ if (!q_u_ex || !q_u)
+ return;
+
+ DEBUG(8,("convert_to_openprinterex\n"));
+
+ q_u_ex->printername_ptr = q_u->printername_ptr;
+
+ if (q_u->printername_ptr)
+ copy_unistr2(&q_u_ex->printername, &q_u->printername);
+
+ copy_printer_default(ctx, &q_u_ex->printer_default, &q_u->printer_default);
+}
+
+/********************************************************************
* spoolss_open_printer
*
* called from the spoolss dispatcher
********************************************************************/
-WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u)
+WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u)
{
-#if 0
- WERROR result = WERR_OK;
-#endif
+ SPOOL_Q_OPEN_PRINTER_EX q_u_ex;
+ SPOOL_R_OPEN_PRINTER_EX r_u_ex;
+
+ if (!q_u || !r_u)
+ return WERR_NOMEM;
+
+ ZERO_STRUCT(q_u_ex);
+ ZERO_STRUCT(r_u_ex);
+
+ /* convert the OpenPrinter() call to OpenPrinterEx() */
+
+ convert_to_openprinterex(p->mem_ctx, &q_u_ex, q_u);
+
+ r_u_ex.status = _spoolss_open_printer_ex(p, &q_u_ex, &r_u_ex);
+
+ /* convert back to OpenPrinter() */
+
+ memcpy(r_u, &r_u_ex, sizeof(*r_u));
+
+ return r_u->status;
+}
+
+/********************************************************************
+ * spoolss_open_printer
+ *
+ * called from the spoolss dispatcher
+ ********************************************************************/
+WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u)
+{
UNISTR2 *printername = NULL;
PRINTER_DEFAULT *printer_default = &q_u->printer_default;
/* uint32 user_switch = q_u->user_switch; - notused */
@@ -697,6 +970,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
fstring name;
int snum;
struct current_user user;
+ Printer_entry *Printer=NULL;
if (q_u->printername_ptr != 0)
printername = &q_u->printername;
@@ -710,24 +984,17 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
DEBUGADD(3,("checking name: %s\n",name));
- if (!open_printer_hnd(p, handle, name))
+ if (!open_printer_hnd(p, handle, name, 0))
return WERR_INVALID_PRINTER_NAME;
-/*
- if (printer_default->datatype_ptr != NULL)
- {
- unistr2_to_ascii(datatype, printer_default->datatype, sizeof(datatype)-1);
- set_printer_hnd_datatype(handle, datatype);
- }
- else
- set_printer_hnd_datatype(handle, "");
-*/
-
- if (!set_printer_hnd_accesstype(p, handle, printer_default->access_required)) {
- close_printer_handle(p, handle);
- return WERR_ACCESS_DENIED;
+ Printer=find_printer_index_by_hnd(p, handle);
+ if (!Printer) {
+ DEBUG(0,(" _spoolss_open_printer_ex: logic error. \
+Can't find printer handle we created for printer %s\n", name ));
+ close_printer_handle(p,handle);
+ return WERR_INVALID_PRINTER_NAME;
}
-
+
/*
First case: the user is opening the print server:
@@ -753,27 +1020,51 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
get_current_user(&user, p);
- if (handle_is_printserver(p, handle)) {
- if (printer_default->access_required == 0) {
- return WERR_OK;
+ if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) {
+
+ /* Printserver handles use global struct... */
+
+ snum = -1;
+
+ /* Map standard access rights to object specific access
+ rights */
+
+ se_map_standard(&printer_default->access_required,
+ &printserver_std_mapping);
+
+ /* Deny any object specific bits that don't apply to print
+ servers (i.e printer and job specific bits) */
+
+ printer_default->access_required &= SPECIFIC_RIGHTS_MASK;
+
+ if (printer_default->access_required &
+ ~(SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE)) {
+ DEBUG(3, ("access DENIED for non-printserver bits"));
+ close_printer_handle(p, handle);
+ return WERR_ACCESS_DENIED;
}
- else if ((printer_default->access_required & SERVER_ACCESS_ADMINISTER ) == SERVER_ACCESS_ADMINISTER) {
- /* Printserver handles use global struct... */
- snum = -1;
+ /* Allow admin access */
+
+ if (printer_default->access_required &
+ SERVER_ACCESS_ADMINISTER) {
if (!lp_ms_add_printer_wizard()) {
close_printer_handle(p, handle);
return WERR_ACCESS_DENIED;
}
- else if (user.uid == 0 || user_in_list(uidtoname(user.uid), lp_printer_admin(snum))) {
+
+ if (user.uid == 0 ||
+ user_in_list(uidtoname(user.uid),
+ lp_printer_admin(snum)))
return WERR_OK;
- }
- else {
- close_printer_handle(p, handle);
- return WERR_ACCESS_DENIED;
- }
+
+ close_printer_handle(p, handle);
+ return WERR_ACCESS_DENIED;
}
+
+ /* We fall through to return WERR_OK */
+
}
else
{
@@ -783,10 +1074,11 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
if (!get_printer_snum(p, handle, &snum))
return WERR_BADFID;
+ se_map_standard(&printer_default->access_required, &printer_std_mapping);
+
/* map an empty access mask to the minimum access mask */
if (printer_default->access_required == 0x0)
printer_default->access_required = PRINTER_ACCESS_USE;
-
/*
* If we are not serving the printer driver for this printer,
@@ -806,6 +1098,20 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
return WERR_ACCESS_DENIED;
}
+ if ((printer_default->access_required & SPECIFIC_RIGHTS_MASK)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) {
+ DEBUG(3, ("access DENIED for printer open - unknown bits\n"));
+ close_printer_handle(p, handle);
+ return WERR_ACCESS_DENIED;
+ }
+
+ if (printer_default->access_required & PRINTER_ACCESS_ADMINISTER)
+ printer_default->access_required = PRINTER_ACCESS_ADMINISTER;
+ else
+ printer_default->access_required = PRINTER_ACCESS_USE;
+
+ DEBUG(4,("Setting printer access=%x\n", printer_default->access_required));
+ Printer->access_granted = printer_default->access_required;
+
/*
* If we have a default device pointer in the
* printer_default struct, then we need to get
@@ -887,6 +1193,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
/****************************************************************************
****************************************************************************/
+
static BOOL convert_printer_info(const SPOOL_PRINTER_INFO_LEVEL *uni,
NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
@@ -1060,10 +1367,10 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL
result = delete_printer_handle(p, handle);
- update_c_setprinter(FALSE);
+ update_c_setprinter(False);
if (W_ERROR_IS_OK(result)) {
- srv_spoolss_sendnotify(0, PRINTER_CHANGE_DELETE_PRINTER);
+ srv_spoolss_sendnotify(Printer->dev.handlename, 0, PRINTER_CHANGE_DELETE_PRINTER, 0x0);
}
return result;
@@ -1073,6 +1380,7 @@ WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL
* static function to lookup the version id corresponding to an
* long architecture string
******************************************************************/
+
static int get_version_id (char * arch)
{
int i;
@@ -1141,10 +1449,10 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
return delete_printer_driver(info.info_3);
}
-
/********************************************************************
GetPrinterData on a printer server Handle.
********************************************************************/
+
static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32 *type, uint8 **data, uint32 *needed, uint32 in_size)
{
int i;
@@ -1163,7 +1471,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32
*type = 0x4;
if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
return False;
- SIVAL(*data, 0, 0x01);
+ SIVAL(*data, 0, 0x00);
*needed = 0x4;
return True;
}
@@ -1172,7 +1480,8 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32
*type = 0x4;
if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
return False;
- SIVAL(*data, 0, 0x1B);
+ /* formally was 0x1b */
+ SIVAL(*data, 0, 0x0);
*needed = 0x4;
return True;
}
@@ -1181,7 +1490,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32
*type = 0x4;
if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
return False;
- SIVAL(*data, 0, 0x01);
+ SIVAL(*data, 0, 0x00);
*needed = 0x4;
return True;
}
@@ -1190,13 +1499,15 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32
*type = 0x4;
if((*data = (uint8 *)talloc(ctx, 4*sizeof(uint8) )) == NULL)
return False;
- SIVAL(*data, 0, 0x02);
+ SIVAL(*data, 0, 2);
*needed = 0x4;
return True;
}
- if (!strcmp(value, "DefaultSpoolDirectory")) {
- pstring string="You are using a Samba server";
+ if (!strcmp(value, "DefaultSpoolDirectory")) {
+ fstring string;
+
+ fstrcpy(string, string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH));
*type = 0x1;
*needed = 2*(strlen(string)+1);
if((*data = (uint8 *)talloc(ctx, ((*needed > in_size) ? *needed:in_size) *sizeof(uint8))) == NULL)
@@ -1231,6 +1542,7 @@ static BOOL getprinterdata_printer_server(TALLOC_CTX *ctx, fstring value, uint32
/********************************************************************
GetPrinterData on a printer Handle.
********************************************************************/
+
static BOOL getprinterdata_printer(pipes_struct *p, TALLOC_CTX *ctx, POLICY_HND *handle,
fstring value, uint32 *type,
uint8 **data, uint32 *needed, uint32 in_size )
@@ -1341,21 +1653,27 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO
*data = NULL;
}
- return WERR_INVALID_PARAM;
+ /* error depends on handle type */
+
+ if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER)
+ return WERR_INVALID_PARAM;
+ else
+ return WERR_BADFILE;
}
if (*needed > *out_size)
- return WERR_STATUS_MORE_ENTRIES;
+ return WERR_MORE_DATA;
else
return WERR_OK;
}
/***************************************************************************
- connect to the client
+ Connect to the client.
****************************************************************************/
+
static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uint32 type, POLICY_HND *handle)
{
- WERROR status;
+ WERROR result;
/*
* If it's the first connection, contact the client
@@ -1365,20 +1683,25 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin
fstring unix_printer;
fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */
- dos_to_unix(unix_printer, True);
+ dos_to_unix(unix_printer);
if(!spoolss_connect_to_client(&cli, unix_printer))
return False;
+
message_register(MSG_PRINTER_NOTIFY, srv_spoolss_receive_message);
}
smb_connections++;
- if(!cli_spoolss_reply_open_printer(&cli, printer, localprinter, type, &status, handle))
- return False;
+ result = cli_spoolss_reply_open_printer(&cli, cli.mem_ctx, printer, localprinter,
+ type, handle);
+
+ if (!W_ERROR_IS_OK(result))
+ DEBUG(5,("srv_spoolss_reply_open_printer: Client RPC returned [%s]\n",
+ dos_errstr(result)));
- return True;
+ return (W_ERROR_IS_OK(result));
}
/********************************************************************
@@ -1425,8 +1748,10 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE
/* connect to the client machine and send a ReplyOpenPrinter */
if(srv_spoolss_replyopenprinter(Printer->notify.localmachine,
Printer->notify.printerlocal, 1,
- &Printer->notify.client_hnd))
+ &Printer->notify.client_hnd))
+ {
Printer->notify.client_connected=True;
+ }
return WERR_OK;
}
@@ -1435,7 +1760,7 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE
* fill a notify_info_data with the servername
********************************************************************/
-static void spoolss_notify_server_name(int snum,
+void spoolss_notify_server_name(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1462,7 +1787,8 @@ static void spoolss_notify_server_name(int snum,
/*******************************************************************
* fill a notify_info_data with the printername (not including the servername).
********************************************************************/
-static void spoolss_notify_printer_name(int snum,
+
+void spoolss_notify_printer_name(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1496,7 +1822,8 @@ static void spoolss_notify_printer_name(int snum,
/*******************************************************************
* fill a notify_info_data with the servicename
********************************************************************/
-static void spoolss_notify_share_name(int snum,
+
+void spoolss_notify_share_name(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1522,7 +1849,8 @@ static void spoolss_notify_share_name(int snum,
/*******************************************************************
* fill a notify_info_data with the port name
********************************************************************/
-static void spoolss_notify_port_name(int snum,
+
+void spoolss_notify_port_name(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1549,10 +1877,10 @@ static void spoolss_notify_port_name(int snum,
/*******************************************************************
* fill a notify_info_data with the printername
- * jfmxxxx: it's incorrect, should be lp_printerdrivername()
* but it doesn't exist, have to see what to do
********************************************************************/
-static void spoolss_notify_driver_name(int snum,
+
+void spoolss_notify_driver_name(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1578,7 +1906,8 @@ static void spoolss_notify_driver_name(int snum,
/*******************************************************************
* fill a notify_info_data with the comment
********************************************************************/
-static void spoolss_notify_comment(int snum,
+
+void spoolss_notify_comment(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1607,10 +1936,10 @@ static void spoolss_notify_comment(int snum,
/*******************************************************************
* fill a notify_info_data with the comment
- * jfm:xxxx incorrect, have to create a new smb.conf option
* location = "Room 1, floor 2, building 3"
********************************************************************/
-static void spoolss_notify_location(int snum,
+
+void spoolss_notify_location(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1637,6 +1966,7 @@ static void spoolss_notify_location(int snum,
* fill a notify_info_data with the device mode
* jfm:xxxx don't to it for know but that's a real problem !!!
********************************************************************/
+
static void spoolss_notify_devmode(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1647,10 +1977,9 @@ static void spoolss_notify_devmode(int snum,
/*******************************************************************
* fill a notify_info_data with the separator file name
- * jfm:xxxx just return no file could add an option to smb.conf
- * separator file = "separator.txt"
********************************************************************/
-static void spoolss_notify_sepfile(int snum,
+
+void spoolss_notify_sepfile(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1677,7 +2006,8 @@ static void spoolss_notify_sepfile(int snum,
* fill a notify_info_data with the print processor
* jfm:xxxx return always winprint to indicate we don't do anything to it
********************************************************************/
-static void spoolss_notify_print_processor(int snum,
+
+void spoolss_notify_print_processor(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1704,7 +2034,8 @@ static void spoolss_notify_print_processor(int snum,
* fill a notify_info_data with the print processor options
* jfm:xxxx send an empty string
********************************************************************/
-static void spoolss_notify_parameters(int snum,
+
+void spoolss_notify_parameters(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1731,7 +2062,8 @@ static void spoolss_notify_parameters(int snum,
* fill a notify_info_data with the data type
* jfm:xxxx always send RAW as data type
********************************************************************/
-static void spoolss_notify_datatype(int snum,
+
+void spoolss_notify_datatype(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1759,6 +2091,7 @@ static void spoolss_notify_datatype(int snum,
* jfm:xxxx send an null pointer to say no security desc
* have to implement security before !
********************************************************************/
+
static void spoolss_notify_security_desc(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1773,7 +2106,8 @@ static void spoolss_notify_security_desc(int snum,
* fill a notify_info_data with the attributes
* jfm:xxxx a samba printer is always shared
********************************************************************/
-static void spoolss_notify_attributes(int snum,
+
+void spoolss_notify_attributes(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1786,6 +2120,7 @@ static void spoolss_notify_attributes(int snum,
/*******************************************************************
* fill a notify_info_data with the priority
********************************************************************/
+
static void spoolss_notify_priority(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1799,6 +2134,7 @@ static void spoolss_notify_priority(int snum,
/*******************************************************************
* fill a notify_info_data with the default priority
********************************************************************/
+
static void spoolss_notify_default_priority(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1812,6 +2148,7 @@ static void spoolss_notify_default_priority(int snum,
/*******************************************************************
* fill a notify_info_data with the start time
********************************************************************/
+
static void spoolss_notify_start_time(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1825,6 +2162,7 @@ static void spoolss_notify_start_time(int snum,
/*******************************************************************
* fill a notify_info_data with the until time
********************************************************************/
+
static void spoolss_notify_until_time(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1838,6 +2176,7 @@ static void spoolss_notify_until_time(int snum,
/*******************************************************************
* fill a notify_info_data with the status
********************************************************************/
+
static void spoolss_notify_status(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1854,7 +2193,8 @@ static void spoolss_notify_status(int snum,
/*******************************************************************
* fill a notify_info_data with the number of jobs queued
********************************************************************/
-static void spoolss_notify_cjobs(int snum,
+
+void spoolss_notify_cjobs(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
NT_PRINTER_INFO_LEVEL *printer,
@@ -1867,6 +2207,7 @@ static void spoolss_notify_cjobs(int snum,
/*******************************************************************
* fill a notify_info_data with the average ppm
********************************************************************/
+
static void spoolss_notify_average_ppm(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1882,6 +2223,7 @@ static void spoolss_notify_average_ppm(int snum,
/*******************************************************************
* fill a notify_info_data with username
********************************************************************/
+
static void spoolss_notify_username(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1891,7 +2233,7 @@ static void spoolss_notify_username(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, queue->user,
+ len = (uint32)dos_PutUniCode(temp, queue->fs_user,
sizeof(temp) - 2, True);
data->notify_data.data.length = len / 2 - 1;
@@ -1908,6 +2250,7 @@ static void spoolss_notify_username(int snum,
/*******************************************************************
* fill a notify_info_data with job status
********************************************************************/
+
static void spoolss_notify_job_status(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1921,6 +2264,7 @@ static void spoolss_notify_job_status(int snum,
/*******************************************************************
* fill a notify_info_data with job name
********************************************************************/
+
static void spoolss_notify_job_name(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1930,7 +2274,7 @@ static void spoolss_notify_job_name(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, queue->file, sizeof(temp) - 2,
+ len = (uint32)dos_PutUniCode(temp, queue->fs_file, sizeof(temp) - 2,
True);
data->notify_data.data.length = len / 2 - 1;
@@ -1947,6 +2291,7 @@ static void spoolss_notify_job_name(int snum,
/*******************************************************************
* fill a notify_info_data with job status
********************************************************************/
+
static void spoolss_notify_job_status_string(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -1996,6 +2341,7 @@ static void spoolss_notify_job_status_string(int snum,
/*******************************************************************
* fill a notify_info_data with job time
********************************************************************/
+
static void spoolss_notify_job_time(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -2009,6 +2355,7 @@ static void spoolss_notify_job_time(int snum,
/*******************************************************************
* fill a notify_info_data with job size
********************************************************************/
+
static void spoolss_notify_job_size(int snum,
SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -2020,6 +2367,32 @@ static void spoolss_notify_job_size(int snum,
}
/*******************************************************************
+ * fill a notify_info_data with page info
+ ********************************************************************/
+static void spoolss_notify_total_pages(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx)
+{
+ data->notify_data.value[0]=queue->page_count;
+ data->notify_data.value[1]=0;
+}
+
+/*******************************************************************
+ * fill a notify_info_data with pages printed info.
+ ********************************************************************/
+static void spoolss_notify_pages_printed(int snum,
+ SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer,
+ TALLOC_CTX *mem_ctx)
+{
+ data->notify_data.value[0]=0; /* Add code when back-end tracks this */
+ data->notify_data.value[1]=0;
+}
+
+/*******************************************************************
Fill a notify_info_data with job position.
********************************************************************/
@@ -2139,16 +2512,17 @@ struct s_notify_info_data_table notify_info_data_table[] =
{ JOB_NOTIFY_TYPE, JOB_NOTIFY_START_TIME, "JOB_NOTIFY_START_TIME", ONE_VALUE, spoolss_notify_start_time },
{ JOB_NOTIFY_TYPE, JOB_NOTIFY_UNTIL_TIME, "JOB_NOTIFY_UNTIL_TIME", ONE_VALUE, spoolss_notify_until_time },
{ JOB_NOTIFY_TYPE, JOB_NOTIFY_TIME, "JOB_NOTIFY_TIME", ONE_VALUE, spoolss_notify_job_time },
-{ JOB_NOTIFY_TYPE, JOB_NOTIFY_TOTAL_PAGES, "JOB_NOTIFY_TOTAL_PAGES", ONE_VALUE, NULL },
-{ JOB_NOTIFY_TYPE, JOB_NOTIFY_PAGES_PRINTED, "JOB_NOTIFY_PAGES_PRINTED", ONE_VALUE, NULL },
+{ JOB_NOTIFY_TYPE, JOB_NOTIFY_TOTAL_PAGES, "JOB_NOTIFY_TOTAL_PAGES", ONE_VALUE, spoolss_notify_total_pages },
+{ JOB_NOTIFY_TYPE, JOB_NOTIFY_PAGES_PRINTED, "JOB_NOTIFY_PAGES_PRINTED", ONE_VALUE, spoolss_notify_pages_printed },
{ JOB_NOTIFY_TYPE, JOB_NOTIFY_TOTAL_BYTES, "JOB_NOTIFY_TOTAL_BYTES", ONE_VALUE, spoolss_notify_job_size },
{ JOB_NOTIFY_TYPE, JOB_NOTIFY_BYTES_PRINTED, "JOB_NOTIFY_BYTES_PRINTED", ONE_VALUE, NULL },
{ END, END, "", END, NULL }
};
/*******************************************************************
-return the size of info_data structure
+ Return the size of info_data structure.
********************************************************************/
+
static uint32 size_of_notify_info_data(uint16 type, uint16 field)
{
int i=0;
@@ -2166,8 +2540,9 @@ static uint32 size_of_notify_info_data(uint16 type, uint16 field)
}
/*******************************************************************
-return the type of notify_info_data
+ Return the type of notify_info_data.
********************************************************************/
+
static BOOL type_of_notify_info_data(uint16 type, uint16 field)
{
int i=0;
@@ -2193,6 +2568,7 @@ static BOOL type_of_notify_info_data(uint16 type, uint16 field)
/****************************************************************************
****************************************************************************/
+
static int search_notify(uint16 type, uint16 field, int *value)
{
int j;
@@ -2214,7 +2590,8 @@ static int search_notify(uint16 type, uint16 field, int *value)
/****************************************************************************
****************************************************************************/
-static void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id)
+
+void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id)
{
info_data->type = type;
info_data->field = field;
@@ -2230,6 +2607,7 @@ static void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type,
* fill a notify_info struct with info asked
*
********************************************************************/
+
static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int
snum, SPOOL_NOTIFY_OPTION_TYPE
*option_type, uint32 id,
@@ -2267,7 +2645,7 @@ static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int
current_data=&info->data[info->count];
- construct_info_data(current_data, type, field, id);
+ construct_info_data(current_data, type, field, id);
DEBUG(10,("construct_notify_printer_info: calling [%s] snum=%d printername=[%s])\n",
notify_info_data_table[j].name, snum, printer->info_2->printername ));
@@ -2287,6 +2665,7 @@ static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int
* fill a notify_info struct with info asked
*
********************************************************************/
+
static BOOL construct_notify_jobs_info(print_queue_struct *queue,
SPOOL_NOTIFY_INFO *info,
NT_PRINTER_INFO_LEVEL *printer,
@@ -2420,6 +2799,7 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd,
* fill a notify_info struct with info asked
*
********************************************************************/
+
static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY_INFO *info,
TALLOC_CTX *mem_ctx)
{
@@ -2439,7 +2819,7 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY
return WERR_BADFID;
option=Printer->notify.option;
- id=0xffffffff;
+ id = 0x0;
info->version=2;
info->data=NULL;
info->count=0;
@@ -2556,6 +2936,7 @@ WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCN
* construct_printer_info_0
* fill a printer_info_0 struct
********************************************************************/
+
static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum)
{
pstring chaine;
@@ -2626,8 +3007,13 @@ static BOOL construct_printer_info_0(PRINTER_INFO_0 *printer, int snum)
printer->global_counter = global_counter;
printer->total_pages = 0;
+#if 0 /* JERRY */
printer->major_version = 0x0004; /* NT 4 */
printer->build_version = 0x0565; /* build 1381 */
+#else
+ printer->major_version = 0x0005; /* NT 5 */
+ printer->build_version = 0x0893; /* build 2195 */
+#endif
printer->unknown7 = 0x1;
printer->unknown8 = 0x0;
printer->unknown9 = 0x0;
@@ -2673,12 +3059,12 @@ static BOOL construct_printer_info_1(uint32 flags, PRINTER_INFO_1 *printer, int
if (*ntprinter->info_2->comment == '\0') {
init_unistr(&printer->comment, lp_comment(snum));
- slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername,
+ slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername,
ntprinter->info_2->drivername, lp_comment(snum));
}
else {
init_unistr(&printer->comment, ntprinter->info_2->comment); /* saved comment. */
- slprintf(chaine,sizeof(chaine)-1,"%s%s,%s,%s",get_called_name(), ntprinter->info_2->printername,
+ slprintf(chaine,sizeof(chaine)-1,"%s,%s,%s", ntprinter->info_2->printername,
ntprinter->info_2->drivername, ntprinter->info_2->comment);
}
@@ -2857,6 +3243,7 @@ static BOOL construct_printer_info_2(PRINTER_INFO_2 *printer, int snum)
* construct_printer_info_3
* fill a printer_info_3 struct
********************************************************************/
+
static BOOL construct_printer_info_3(PRINTER_INFO_3 **pp_printer, int snum)
{
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
@@ -2949,10 +3336,10 @@ static BOOL construct_printer_info_5(PRINTER_INFO_5 *printer, int snum)
return True;
}
-
/********************************************************************
Spoolss_enumprinters.
********************************************************************/
+
static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
int snum;
@@ -2966,7 +3353,7 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32
for (snum=0; snum<n_services; snum++) {
if (lp_browseable(snum) && lp_snum_ok(snum) && lp_print_ok(snum) ) {
DEBUG(4,("Found a printer in smb.conf: %s[%x]\n", lp_servicename(snum), snum));
-
+
if (construct_printer_info_1(flags, &current_prt, snum)) {
if((tp=Realloc(printers, (*returned +1)*sizeof(PRINTER_INFO_1))) == NULL) {
DEBUG(2,("enum_all_printers_info_1: failed to enlarge printers buffer!\n"));
@@ -2976,6 +3363,7 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32
}
else printers = tp;
DEBUG(4,("ReAlloced memory for [%d] PRINTER_INFO_1\n", *returned));
+
memcpy(&printers[*returned], &current_prt, sizeof(PRINTER_INFO_1));
(*returned)++;
}
@@ -3007,6 +3395,7 @@ static WERROR enum_all_printers_info_1(uint32 flags, NEW_BUFFER *buffer, uint32
/********************************************************************
enum_all_printers_info_1_local.
*********************************************************************/
+
static WERROR enum_all_printers_info_1_local(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
DEBUG(4,("enum_all_printers_info_1_local\n"));
@@ -3017,6 +3406,7 @@ static WERROR enum_all_printers_info_1_local(NEW_BUFFER *buffer, uint32 offered,
/********************************************************************
enum_all_printers_info_1_name.
*********************************************************************/
+
static WERROR enum_all_printers_info_1_name(fstring name, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
char *s = name;
@@ -3036,6 +3426,7 @@ static WERROR enum_all_printers_info_1_name(fstring name, NEW_BUFFER *buffer, ui
/********************************************************************
enum_all_printers_info_1_remote.
*********************************************************************/
+
static WERROR enum_all_printers_info_1_remote(fstring name, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
PRINTER_INFO_1 *printer;
@@ -3164,6 +3555,7 @@ static WERROR enum_all_printers_info_2(NEW_BUFFER *buffer, uint32 offered, uint3
/********************************************************************
* handle enumeration of printers at level 1
********************************************************************/
+
static WERROR enumprinters_level1( uint32 flags, fstring name,
NEW_BUFFER *buffer, uint32 offered,
uint32 *needed, uint32 *returned)
@@ -3188,6 +3580,7 @@ static WERROR enumprinters_level1( uint32 flags, fstring name,
/********************************************************************
* handle enumeration of printers at level 2
********************************************************************/
+
static WERROR enumprinters_level2( uint32 flags, fstring servername,
NEW_BUFFER *buffer, uint32 offered,
uint32 *needed, uint32 *returned)
@@ -3216,6 +3609,7 @@ static WERROR enumprinters_level2( uint32 flags, fstring servername,
/********************************************************************
* handle enumeration of printers at level 5
********************************************************************/
+
static WERROR enumprinters_level5( uint32 flags, fstring servername,
NEW_BUFFER *buffer, uint32 offered,
uint32 *needed, uint32 *returned)
@@ -3283,6 +3677,7 @@ WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_
/****************************************************************************
****************************************************************************/
+
static WERROR getprinter_level_0(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
PRINTER_INFO_0 *printer=NULL;
@@ -3315,6 +3710,7 @@ static WERROR getprinter_level_0(int snum, NEW_BUFFER *buffer, uint32 offered, u
/****************************************************************************
****************************************************************************/
+
static WERROR getprinter_level_1(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
PRINTER_INFO_1 *printer=NULL;
@@ -3347,6 +3743,7 @@ static WERROR getprinter_level_1(int snum, NEW_BUFFER *buffer, uint32 offered, u
/****************************************************************************
****************************************************************************/
+
static WERROR getprinter_level_2(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
PRINTER_INFO_2 *printer=NULL;
@@ -3382,6 +3779,7 @@ static WERROR getprinter_level_2(int snum, NEW_BUFFER *buffer, uint32 offered, u
/****************************************************************************
****************************************************************************/
+
static WERROR getprinter_level_3(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
PRINTER_INFO_3 *printer=NULL;
@@ -3412,6 +3810,7 @@ static WERROR getprinter_level_3(int snum, NEW_BUFFER *buffer, uint32 offered, u
/****************************************************************************
****************************************************************************/
+
static WERROR getprinter_level_4(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
PRINTER_INFO_4 *printer=NULL;
@@ -3445,6 +3844,7 @@ static WERROR getprinter_level_4(int snum, NEW_BUFFER *buffer, uint32 offered, u
/****************************************************************************
****************************************************************************/
+
static WERROR getprinter_level_5(int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
PRINTER_INFO_5 *printer=NULL;
@@ -3518,6 +3918,7 @@ WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GET
/********************************************************************
* fill a DRIVER_INFO_1 struct
********************************************************************/
+
static void fill_printer_driver_info_1(DRIVER_INFO_1 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername, fstring architecture)
{
init_unistr( &info->name, driver.info_3->name);
@@ -3526,6 +3927,7 @@ static void fill_printer_driver_info_1(DRIVER_INFO_1 *info, NT_PRINTER_DRIVER_IN
/********************************************************************
* construct_printer_driver_info_1
********************************************************************/
+
static WERROR construct_printer_driver_info_1(DRIVER_INFO_1 *info, int snum, fstring servername, fstring architecture, uint32 version)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
@@ -3550,6 +3952,7 @@ static WERROR construct_printer_driver_info_1(DRIVER_INFO_1 *info, int snum, fst
* construct_printer_driver_info_2
* fill a printer_info_2 struct
********************************************************************/
+
static void fill_printer_driver_info_2(DRIVER_INFO_2 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername)
{
pstring temp;
@@ -3583,6 +3986,7 @@ static void fill_printer_driver_info_2(DRIVER_INFO_2 *info, NT_PRINTER_DRIVER_IN
* construct_printer_driver_info_2
* fill a printer_info_2 struct
********************************************************************/
+
static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fstring servername, fstring architecture, uint32 version)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
@@ -3609,6 +4013,7 @@ static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fst
*
* convert an array of ascii string to a UNICODE string
********************************************************************/
+
static void init_unistr_array(uint16 **uni_array, fstring *char_array, char *servername)
{
int i=0;
@@ -3650,6 +4055,7 @@ static void init_unistr_array(uint16 **uni_array, fstring *char_array, char *ser
* construct_printer_info_3
* fill a printer_info_3 struct
********************************************************************/
+
static void fill_printer_driver_info_3(DRIVER_INFO_3 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername)
{
pstring temp;
@@ -3696,6 +4102,7 @@ static void fill_printer_driver_info_3(DRIVER_INFO_3 *info, NT_PRINTER_DRIVER_IN
* construct_printer_info_3
* fill a printer_info_3 struct
********************************************************************/
+
static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, fstring servername, fstring architecture, uint32 version)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
@@ -3704,12 +4111,12 @@ static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, fst
ZERO_STRUCT(driver);
status=get_a_printer(&printer, 2, lp_servicename(snum) );
- DEBUG(8,("construct_printer_driver_info_3: status: %s\n", werror_str(status)));
+ DEBUG(8,("construct_printer_driver_info_3: status: %s\n", dos_errstr(status)));
if (!W_ERROR_IS_OK(status))
return WERR_INVALID_PRINTER_NAME;
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
- DEBUG(8,("construct_printer_driver_info_3: status: %s\n", werror_str(status)));
+ DEBUG(8,("construct_printer_driver_info_3: status: %s\n", dos_errstr(status)));
#if 0 /* JERRY */
@@ -3729,7 +4136,7 @@ static WERROR construct_printer_driver_info_3(DRIVER_INFO_3 *info, int snum, fst
/* Yes - try again with a WinNT driver. */
version = 2;
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
- DEBUG(8,("construct_printer_driver_info_3: status: %s\n", werror_str(status)));
+ DEBUG(8,("construct_printer_driver_info_3: status: %s\n", dos_errstr(status)));
}
#endif
@@ -3818,6 +4225,7 @@ static void fill_printer_driver_info_6(DRIVER_INFO_6 *info, NT_PRINTER_DRIVER_IN
* construct_printer_info_6
* fill a printer_info_6 struct
********************************************************************/
+
static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, fstring servername, fstring architecture, uint32 version)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
@@ -3826,12 +4234,12 @@ static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, fst
ZERO_STRUCT(driver);
status=get_a_printer(&printer, 2, lp_servicename(snum) );
- DEBUG(8,("construct_printer_driver_info_6: status: %s\n", werror_str(status)));
+ DEBUG(8,("construct_printer_driver_info_6: status: %s\n", dos_errstr(status)));
if (!W_ERROR_IS_OK(status))
return WERR_INVALID_PRINTER_NAME;
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
- DEBUG(8,("construct_printer_driver_info_6: status: %s\n", werror_str(status)));
+ DEBUG(8,("construct_printer_driver_info_6: status: %s\n", dos_errstr(status)));
if (!W_ERROR_IS_OK(status)) {
/*
* Is this a W2k client ?
@@ -3845,7 +4253,7 @@ static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, fst
/* Yes - try again with a WinNT driver. */
version = 2;
status=get_a_printer_driver(&driver, 3, printer->info_2->drivername, architecture, version);
- DEBUG(8,("construct_printer_driver_info_6: status: %s\n", werror_str(status)));
+ DEBUG(8,("construct_printer_driver_info_6: status: %s\n", dos_errstr(status)));
if (!W_ERROR_IS_OK(status)) {
free_a_printer(&printer,2);
return WERR_UNKNOWN_PRINTER_DRIVER;
@@ -3878,6 +4286,7 @@ static void free_printer_driver_info_6(DRIVER_INFO_6 *info)
/****************************************************************************
****************************************************************************/
+
static WERROR getprinterdriver2_level1(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
DRIVER_INFO_1 *info=NULL;
@@ -3914,6 +4323,7 @@ static WERROR getprinterdriver2_level1(fstring servername, fstring architecture,
/****************************************************************************
****************************************************************************/
+
static WERROR getprinterdriver2_level2(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
DRIVER_INFO_2 *info=NULL;
@@ -3950,6 +4360,7 @@ static WERROR getprinterdriver2_level2(fstring servername, fstring architecture,
/****************************************************************************
****************************************************************************/
+
static WERROR getprinterdriver2_level3(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
DRIVER_INFO_3 info;
@@ -3983,6 +4394,7 @@ static WERROR getprinterdriver2_level3(fstring servername, fstring architecture,
/****************************************************************************
****************************************************************************/
+
static WERROR getprinterdriver2_level6(fstring servername, fstring architecture, uint32 version, int snum, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
DRIVER_INFO_6 info;
@@ -4097,6 +4509,7 @@ WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPO
}
Printer->page_started=False;
+ print_job_endpage(Printer->jobid);
return WERR_OK;
}
@@ -4214,6 +4627,7 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R
* called from the spoolss dispatcher
*
********************************************************************/
+
static WERROR control_printer(POLICY_HND *handle, uint32 command,
pipes_struct *p)
{
@@ -4271,6 +4685,7 @@ WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R
* called by spoolss_api_setprinter
* when updating a printer description
********************************************************************/
+
static WERROR update_printer_sec(POLICY_HND *handle, uint32 level,
const SPOOL_PRINTER_INFO_LEVEL *info,
pipes_struct *p, SEC_DESC_BUF *secdesc_ctr)
@@ -4374,9 +4789,9 @@ static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum)
/* we force some elements to "correct" values */
slprintf(info->servername, sizeof(info->servername)-1, "\\\\%s", get_called_name());
- slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s",
- get_called_name(), lp_servicename(snum));
fstrcpy(info->sharename, lp_servicename(snum));
+ slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s",
+ get_called_name(), info->sharename);
info->attributes = PRINTER_ATTRIBUTE_SHARED | PRINTER_ATTRIBUTE_NETWORK;
return True;
@@ -4384,6 +4799,7 @@ static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum)
/****************************************************************************
****************************************************************************/
+
static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
{
char *cmd = lp_addprinter_cmd();
@@ -4407,7 +4823,7 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
printer->info_2->location, driverlocation, remote_machine);
/* Convert script args to unix-codepage */
- dos_to_unix(command, True);
+ dos_to_unix(command);
DEBUG(10,("Running [%s]\n", command));
ret = smbrun(command, &fd);
DEBUGADD(10,("returned [%d]\n", ret));
@@ -4438,6 +4854,8 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
return True;
}
+#if 0 /* JERRY */
+
/* Return true if two devicemodes are equal */
#define DEVMODE_CHECK_INT(field) \
@@ -4447,6 +4865,10 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
return False; \
}
+/************************************************************************
+ Handy, but currently unused functions
+ ***********************************************************************/
+
static BOOL nt_devicemode_equal(NT_DEVICEMODE *d1, NT_DEVICEMODE *d2)
{
if (!d1 && !d2) goto equal; /* if both are NULL they are equal */
@@ -4678,6 +5100,8 @@ static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1,
return True;
}
+#endif
+
/********************************************************************
* Called by spoolss_api_setprinter
* when updating a printer description.
@@ -4690,9 +5114,12 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
int snum;
NT_PRINTER_INFO_LEVEL *printer = NULL, *old_printer = NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
+ PRINTER_MESSAGE_INFO msg;
WERROR result;
DEBUG(8,("update_printer\n"));
+
+ ZERO_STRUCT(msg);
result = WERR_OK;
@@ -4732,7 +5159,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
goto done;
}
- if (info->info_2->devmode_ptr != 0) {
+ if (devmode) {
/* we have a valid devmode
convert it and link it*/
@@ -4751,9 +5178,13 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
goto done;
}
- /* NT likes to call this function even though nothing has actually
- changed. Check this so the user doesn't end up with an
- annoying permission denied dialog box. */
+#if 0 /* JERRY */
+
+ /*
+ * Another one of those historical misunderstandings...
+ * This is reminisent of a similar call we had in _spoolss_setprinterdata()
+ * I'm leaving it here as a reminder. --jerry
+ */
if (nt_printer_info_level_equal(printer, old_printer)) {
DEBUG(3, ("update_printer: printer info has not changed\n"));
@@ -4761,10 +5192,12 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
goto done;
}
+#endif
+
/* Check calling user has permission to update printer description */
- if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
- DEBUG(3, ("update_printer: printer property change denied by security descriptor\n"));
+ if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(3, ("update_printer: printer property change denied by handle\n"));
result = WERR_ACCESS_DENIED;
goto done;
}
@@ -4800,18 +5233,47 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
* lookup previously saved driver initialization info, which is then
* bound to the printer, simulating what happens in the Windows arch.
*/
- if (strequal(printer->info_2->drivername, old_printer->info_2->drivername))
- set_driver_init(printer, 2);
+ if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)){
+ if (!set_driver_init(printer, 2)) {
+ DEBUG(5,("update_printer: Error restoring driver initialization data for driver [%s]!\n",
+ printer->info_2->drivername));
+ }
+ msg.flags |= PRINTER_MESSAGE_DRIVER;
+ }
}
/* Update printer info */
result = mod_a_printer(*printer, 2);
- done:
+ /* flag which changes actually occured. This is a small subset of
+ all the possible changes */
+
+ if (!strequal(printer->info_2->comment, old_printer->info_2->comment))
+ msg.flags |= PRINTER_MESSAGE_COMMENT;
+
+ if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename))
+ msg.flags |= PRINTER_MESSAGE_SHARENAME;
+
+ if (!strequal(printer->info_2->portname, old_printer->info_2->portname))
+ msg.flags |= PRINTER_MESSAGE_PORT;
+
+ if (!strequal(printer->info_2->location, old_printer->info_2->location))
+ msg.flags |= PRINTER_MESSAGE_LOCATION;
+
+ ZERO_STRUCT(msg);
+
+ msg.low = PRINTER_CHANGE_ADD_PRINTER;
+ fstrcpy(msg.printer_name, printer->info_2->printername);
+
+ /* only send a notify if something changed */
+ if (msg.flags) {
+ srv_spoolss_sendnotify(msg.printer_name, 0, PRINTER_CHANGE_ADD_PRINTER, msg.flags);
+ }
+
+done:
free_a_printer(&printer, 2);
free_a_printer(&old_printer, 2);
- srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER);
return result;
}
@@ -4894,6 +5356,7 @@ WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u
/****************************************************************************
****************************************************************************/
+
static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue,
int position, int snum)
{
@@ -4907,14 +5370,14 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue,
job_info->jobid=queue->job;
init_unistr(&job_info->printername, lp_servicename(snum));
init_unistr(&job_info->machinename, temp_name);
- init_unistr(&job_info->username, queue->user);
- init_unistr(&job_info->document, queue->file);
+ init_unistr(&job_info->username, queue->fs_user);
+ init_unistr(&job_info->document, queue->fs_file);
init_unistr(&job_info->datatype, "RAW");
init_unistr(&job_info->text_status, "");
job_info->status=nt_printj_status(queue->status);
job_info->priority=queue->priority;
job_info->position=position;
- job_info->totalpages=0;
+ job_info->totalpages=queue->page_count;
job_info->pagesprinted=0;
make_systemtime(&job_info->submitted, t);
@@ -4922,9 +5385,11 @@ static void fill_job_info_1(JOB_INFO_1 *job_info, print_queue_struct *queue,
/****************************************************************************
****************************************************************************/
+
static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue,
int position, int snum,
- NT_PRINTER_INFO_LEVEL *ntprinter)
+ NT_PRINTER_INFO_LEVEL *ntprinter,
+ DEVICEMODE *devmode)
{
pstring temp_name;
pstring chaine;
@@ -4940,9 +5405,9 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue,
init_unistr(&job_info->printername, chaine);
init_unistr(&job_info->machinename, temp_name);
- init_unistr(&job_info->username, queue->user);
- init_unistr(&job_info->document, queue->file);
- init_unistr(&job_info->notifyname, queue->user);
+ init_unistr(&job_info->username, queue->fs_user);
+ init_unistr(&job_info->document, queue->fs_file);
+ init_unistr(&job_info->notifyname, queue->fs_user);
init_unistr(&job_info->datatype, "RAW");
init_unistr(&job_info->printprocessor, "winprint");
init_unistr(&job_info->parameters, "");
@@ -4956,15 +5421,13 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue,
job_info->position=position;
job_info->starttime=0;
job_info->untiltime=0;
- job_info->totalpages=0;
+ job_info->totalpages=queue->page_count;
job_info->size=queue->size;
make_systemtime(&(job_info->submitted), t);
job_info->timeelapsed=0;
job_info->pagesprinted=0;
- if((job_info->devmode = construct_dev_mode(snum)) == NULL) {
- return False;
- }
+ job_info->devmode = devmode;
return (True);
}
@@ -4972,6 +5435,7 @@ static BOOL fill_job_info_2(JOB_INFO_2 *job_info, print_queue_struct *queue,
/****************************************************************************
Enumjobs at level 1.
****************************************************************************/
+
static WERROR enumjobs_level1(print_queue_struct *queue, int snum,
NEW_BUFFER *buffer, uint32 offered,
uint32 *needed, uint32 *returned)
@@ -5018,29 +5482,39 @@ static WERROR enumjobs_level1(print_queue_struct *queue, int snum,
/****************************************************************************
Enumjobs at level 2.
****************************************************************************/
+
static WERROR enumjobs_level2(print_queue_struct *queue, int snum,
NEW_BUFFER *buffer, uint32 offered,
uint32 *needed, uint32 *returned)
{
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
- JOB_INFO_2 *info;
+ JOB_INFO_2 *info = NULL;
int i;
WERROR result;
+ DEVICEMODE *devmode = NULL;
info=(JOB_INFO_2 *)malloc(*returned*sizeof(JOB_INFO_2));
if (info==NULL) {
*returned=0;
- return WERR_NOMEM;
+ result = WERR_NOMEM;
+ goto done;
}
result = get_a_printer(&ntprinter, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(result)) {
*returned = 0;
- return result;
+ goto done;
}
+ if (!(devmode = construct_dev_mode(snum))) {
+ *returned = 0;
+ result = WERR_NOMEM;
+ goto done;
+ }
+
for (i=0; i<*returned; i++)
- fill_job_info_2(&(info[i]), &queue[i], i, snum, ntprinter);
+ fill_job_info_2(&(info[i]), &queue[i], i, snum, ntprinter,
+ devmode);
free_a_printer(&ntprinter, 2);
SAFE_FREE(queue);
@@ -5049,27 +5523,32 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum,
for (i=0; i<*returned; i++)
(*needed) += spoolss_size_job_info_2(&info[i]);
+ if (*needed > offered) {
+ *returned=0;
+ result = WERR_INSUFFICIENT_BUFFER;
+ goto done;
+ }
+
if (!alloc_buffer_size(buffer, *needed)) {
SAFE_FREE(info);
- return WERR_INSUFFICIENT_BUFFER;
+ result = WERR_INSUFFICIENT_BUFFER;
+ goto done;
}
/* fill the buffer with the structures */
for (i=0; i<*returned; i++)
smb_io_job_info_2("", buffer, &info[i], 0);
- /* clear memory */
- for (i = 0; i < *returned; i++)
- free_job_info_2(&info[i]);
+ result = WERR_OK;
+ done:
+ free_a_printer(&ntprinter, 2);
+ free_devmode(devmode);
+ SAFE_FREE(queue);
SAFE_FREE(info);
- if (*needed > offered) {
- *returned=0;
- return WERR_INSUFFICIENT_BUFFER;
- }
+ return result;
- return WERR_OK;
}
/****************************************************************************
@@ -5184,6 +5663,7 @@ WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u
/****************************************************************************
Enumerates all printer drivers at level 1.
****************************************************************************/
+
static WERROR enumprinterdrivers_level1(fstring servername, fstring architecture, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
int i;
@@ -5264,6 +5744,7 @@ static WERROR enumprinterdrivers_level1(fstring servername, fstring architecture
/****************************************************************************
Enumerates all printer drivers at level 2.
****************************************************************************/
+
static WERROR enumprinterdrivers_level2(fstring servername, fstring architecture, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
int i;
@@ -5345,6 +5826,7 @@ static WERROR enumprinterdrivers_level2(fstring servername, fstring architecture
/****************************************************************************
Enumerates all printer drivers at level 3.
****************************************************************************/
+
static WERROR enumprinterdrivers_level3(fstring servername, fstring architecture, NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
int i;
@@ -5673,6 +6155,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
/****************************************************************************
****************************************************************************/
+
static void fill_port_1(PORT_INFO_1 *port, char *name)
{
init_unistr(&port->port_name, name);
@@ -5680,6 +6163,7 @@ static void fill_port_1(PORT_INFO_1 *port, char *name)
/****************************************************************************
****************************************************************************/
+
static void fill_port_2(PORT_INFO_2 *port, char *name)
{
init_unistr(&port->port_name, name);
@@ -5693,6 +6177,7 @@ static void fill_port_2(PORT_INFO_2 *port, char *name)
/****************************************************************************
enumports level 1.
****************************************************************************/
+
static WERROR enumports_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
PORT_INFO_1 *ports=NULL;
@@ -5726,7 +6211,7 @@ static WERROR enumports_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *need
if(numlines) {
if((ports=(PORT_INFO_1 *)malloc( numlines * sizeof(PORT_INFO_1) )) == NULL) {
DEBUG(10,("Returning WERR_NOMEM [%s]\n",
- werror_str(WERR_NOMEM)));
+ dos_errstr(WERR_NOMEM)));
file_lines_free(qlines);
return WERR_NOMEM;
}
@@ -5911,6 +6396,7 @@ WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUM
/****************************************************************************
****************************************************************************/
+
static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_srv_name,
const SPOOL_PRINTER_INFO_LEVEL *info,
DEVICEMODE *devmode, SEC_DESC_BUF *sec_desc_buf,
@@ -6000,18 +6486,18 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_
return err;
}
- if (!open_printer_hnd(p, handle, name)) {
+ if (!open_printer_hnd(p, handle, name, PRINTER_ACCESS_ADMINISTER)) {
/* Handle open failed - remove addition. */
del_a_printer(printer->info_2->sharename);
free_a_printer(&printer,2);
return WERR_ACCESS_DENIED;
}
- free_a_printer(&printer,2);
-
update_c_setprinter(False);
- srv_spoolss_sendnotify(0, PRINTER_CHANGE_ADD_PRINTER);
+ srv_spoolss_sendnotify(printer->info_2->printername, 0, PRINTER_CHANGE_ADD_PRINTER, 0x0);
+
+ free_a_printer(&printer,2);
return WERR_OK;
}
@@ -6055,6 +6541,7 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u,
WERROR err = WERR_OK;
NT_PRINTER_DRIVER_INFO_LEVEL driver;
struct current_user user;
+ fstring driver_name;
ZERO_STRUCT(driver);
@@ -6082,13 +6569,36 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u,
goto done;
}
- done:
+ switch(level)
+ {
+ case 3:
+ fstrcpy(driver_name, driver.info_3->name);
+ break;
+ case 6:
+ fstrcpy(driver_name, driver.info_6->name);
+ break;
+ }
+
+ /*
+ * I think this is where he DrvUpgradePrinter() hook would be
+ * be called in a driver's interface DLL on a Windows NT 4.0/2k
+ * server. Right now, we just need to send ourselves a message
+ * to update each printer bound to this driver. --jerry
+ */
+
+ if (!srv_spoolss_drv_upgrade_printer(driver_name)) {
+ DEBUG(0,("_spoolss_addprinterdriver: Failed to send message about upgrading driver [%s]!\n",
+ driver_name));
+ }
+
+done:
free_a_printer_driver(driver, level);
return err;
}
/****************************************************************************
****************************************************************************/
+
static void fill_driverdir_1(DRIVER_DIRECTORY_1 *info, char *name)
{
init_unistr(&info->name, name);
@@ -6096,15 +6606,14 @@ static void fill_driverdir_1(DRIVER_DIRECTORY_1 *info, char *name)
/****************************************************************************
****************************************************************************/
+
static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environment, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
pstring path;
pstring long_archi;
pstring short_archi;
DRIVER_DIRECTORY_1 *info=NULL;
-#if 0
- fstring asc_name, servername;
-#endif
+
unistr2_to_ascii(long_archi, uni_environment, sizeof(long_archi)-1);
if (get_short_archi(short_archi, long_archi)==False)
@@ -6113,20 +6622,6 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen
if((info=(DRIVER_DIRECTORY_1 *)malloc(sizeof(DRIVER_DIRECTORY_1))) == NULL)
return WERR_NOMEM;
-#if 0 /* JERRY */
- /* use the name the client sent us */
-
- unistr2_to_ascii(asc_name, name, sizeof(asc_name)-1);
- if (asc_name[0] == '\\' && asc_name[1] == '\\')
- fstrcpy(servername, asc_name);
- else {
- fstrcpy(servername, "\\\\");
- fstrcat(servername, asc_name);
- }
-
- slprintf(path, sizeof(path)-1, "%s\\print$\\%s", servername, short_archi);
-#endif
-
slprintf(path, sizeof(path)-1, "\\\\%s\\print$\\%s", get_called_name(), short_archi);
DEBUG(4,("printer driver directory: [%s]\n", path));
@@ -6239,23 +6734,6 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S
if ( (in_value_len==0) && (in_data_len==0) ) {
DEBUGADD(6,("Activating NT mega-hack to find sizes\n"));
-#if 0
- /*
- * NT can ask for a specific parameter size - we need to return NO_MORE_ITEMS
- * if this parameter size doesn't exist.
- * Ok - my opinion here is that the client is not asking for the greatest
- * possible size of all the parameters, but is asking specifically for the size needed
- * for this specific parameter. In that case we can remove the loop below and
- * simplify this lookup code considerably. JF - comments welcome. JRA.
- */
-
- if (!get_specific_param_by_index(*printer, 2, idx, value, &data, &type, &data_len)) {
- SAFE_FREE(data);
- free_a_printer(&printer, 2);
- return WERR_NO_MORE_ITEMS;
- }
-#endif
-
SAFE_FREE(data);
param_index=0;
@@ -6385,9 +6863,8 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP
* when connecting to a printer --jerry
*/
- if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
- DEBUG(3, ("security descriptor change denied by existing "
- "security descriptor\n"));
+ if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(3, ("_spoolss_setprinterdata: change denied by handle access permissions\n"));
status = WERR_ACCESS_DENIED;
goto done;
}
@@ -6403,24 +6880,6 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP
convert_specific_param(&param, value , type, data, real_len);
-#if 0
- /* JRA. W2K always changes changeid. */
-
- if (get_specific_param(*printer, 2, param->value, &old_param.data,
- &old_param.type, (uint32 *)&old_param.data_len)) {
-
- if (param->type == old_param.type &&
- param->data_len == old_param.data_len &&
- memcmp(param->data, old_param.data,
- old_param.data_len) == 0) {
-
- DEBUG(3, ("setprinterdata hasn't changed\n"));
- status = WERR_OK;
- goto done;
- }
- }
-#endif
-
unlink_specific_param_if_exist(printer->info_2, param);
/*
@@ -6445,17 +6904,40 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP
free_nt_printer_param(&param);
SAFE_FREE(old_param.data);
-#if 0
- /* Is this correct. JRA ? */
- srv_spoolss_sendnotify(0, PRINTER_CHANGE_SET_PRINTER);
-#endif
-
return status;
}
/****************************************************************************
****************************************************************************/
+WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u)
+{
+ POLICY_HND *handle = &q_u->handle;
+ Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
+ int snum;
+
+ DEBUG(5,("_spoolss_resetprinter\n"));
+
+ /*
+ * All we do is to check to see if the handle and queue is valid.
+ * This call really doesn't mean anything to us because we only
+ * support RAW printing. --jerry
+ */
+
+ if (!Printer) {
+ DEBUG(2,("_spoolss_resetprinter: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ return WERR_BADFID;
+ }
+
+ if (!get_printer_snum(p,handle, &snum))
+ return WERR_BADFID;
+
+
+ /* blindly return success */
+ return WERR_OK;
+}
+
+
WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u)
{
POLICY_HND *handle = &q_u->handle;
@@ -6477,9 +6959,8 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
if (!get_printer_snum(p, handle, &snum))
return WERR_BADFID;
- if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
- DEBUG(3, ("_spoolss_deleteprinterdata: printer properties "
- "change denied by existing security descriptor\n"));
+ if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(3, ("_spoolss_deleteprinterdata: printer properties change denied by handle\n"));
return WERR_ACCESS_DENIED;
}
@@ -6523,14 +7004,14 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
return WERR_BADFID;
}
- /*
- * FIXME!! Feels like there should be an access check here, but haven't
- * had time to verify. --jerry
- */
-
-
if (!get_printer_snum(p,handle, &snum))
return WERR_BADFID;
+
+ if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(2,("_spoolss_addform: denied by handle permissions.\n"));
+ status = WERR_ACCESS_DENIED;
+ goto done;
+ }
/* can't add if builtin */
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
@@ -6546,9 +7027,6 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
* ChangeID must always be set
*/
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
status = get_a_printer(&printer, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(status))
goto done;
@@ -6587,6 +7065,14 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
return WERR_BADFID;
}
+ if (!get_printer_snum(p, handle, &snum))
+ return WERR_BADFID;
+
+ if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(2,("_spoolss_deleteform: denied by handle permissions\n"));
+ return WERR_ACCESS_DENIED;
+ }
+
/* can't delete if builtin */
if (get_a_builtin_ntform(form_name,&tmpForm)) {
return WERR_INVALID_PARAM;
@@ -6600,9 +7086,6 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
* ChangeID must always be set
*/
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
status = get_a_printer(&printer, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(status))
goto done;
@@ -6642,6 +7125,15 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
DEBUG(2,("_spoolss_setform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
return WERR_BADFID;
}
+
+ if (!get_printer_snum(p, handle, &snum))
+ return WERR_BADFID;
+
+ if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(2,("_spoolss_setform: denied by handle permissions\n"));
+ return WERR_ACCESS_DENIED;
+ }
+
/* can't set if builtin */
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
return WERR_INVALID_PARAM;
@@ -6655,9 +7147,6 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
* ChangeID must always be set
*/
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
status = get_a_printer(&printer, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(status))
goto done;
@@ -6676,6 +7165,7 @@ done:
/****************************************************************************
enumprintprocessors level 1.
****************************************************************************/
+
static WERROR enumprintprocessors_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
PRINTPROCESSOR_1 *info_1=NULL;
@@ -6744,6 +7234,7 @@ WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS
/****************************************************************************
enumprintprocdatatypes level 1.
****************************************************************************/
+
static WERROR enumprintprocdatatypes_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
PRINTPROCDATATYPE_1 *info_1=NULL;
@@ -6837,6 +7328,7 @@ static WERROR enumprintmonitors_level_1(NEW_BUFFER *buffer, uint32 offered, uint
/****************************************************************************
enumprintmonitors level 2.
****************************************************************************/
+
static WERROR enumprintmonitors_level_2(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned)
{
PRINTMONITOR_2 *info_2=NULL;
@@ -6907,6 +7399,7 @@ WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_
/****************************************************************************
****************************************************************************/
+
static WERROR getjob_level_1(print_queue_struct *queue, int count, int snum, uint32 jobid, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
int i=0;
@@ -6953,9 +7446,9 @@ static WERROR getjob_level_1(print_queue_struct *queue, int count, int snum, uin
return WERR_OK;
}
-
/****************************************************************************
****************************************************************************/
+
static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uint32 jobid, NEW_BUFFER *buffer, uint32 offered, uint32 *needed)
{
int i=0;
@@ -6963,14 +7456,15 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin
JOB_INFO_2 *info_2;
NT_PRINTER_INFO_LEVEL *ntprinter = NULL;
WERROR ret;
+ DEVICEMODE *devmode = NULL;
info_2=(JOB_INFO_2 *)malloc(sizeof(JOB_INFO_2));
ZERO_STRUCTP(info_2);
if (info_2 == NULL) {
- SAFE_FREE(queue);
- return WERR_NOMEM;
+ ret = WERR_NOMEM;
+ goto done;
}
for (i=0; i<count && found==False; i++) {
@@ -6979,39 +7473,47 @@ static WERROR getjob_level_2(print_queue_struct *queue, int count, int snum, uin
}
if (found==False) {
- SAFE_FREE(queue);
- SAFE_FREE(info_2);
- /* NT treats not found as bad param... yet another bad choice */
- return WERR_INVALID_PARAM;
+ /* NT treats not found as bad param... yet another bad
+ choice */
+ ret = WERR_INVALID_PARAM;
+ goto done;
}
ret = get_a_printer(&ntprinter, 2, lp_servicename(snum));
- if (!W_ERROR_IS_OK(ret)) {
- SAFE_FREE(queue);
- return ret;
+ if (!W_ERROR_IS_OK(ret))
+ goto done;
+ if (construct_dev_mode(snum) == NULL) {
+ ret = WERR_NOMEM;
+ goto done;
}
- fill_job_info_2(info_2, &(queue[i-1]), i, snum, ntprinter);
-
- free_a_printer(&ntprinter, 2);
- SAFE_FREE(queue);
+ fill_job_info_2(info_2, &(queue[i-1]), i, snum, ntprinter, devmode);
*needed += spoolss_size_job_info_2(info_2);
if (!alloc_buffer_size(buffer, *needed)) {
- SAFE_FREE(info_2);
- return WERR_INSUFFICIENT_BUFFER;
+ ret = WERR_INSUFFICIENT_BUFFER;
+ goto done;
}
smb_io_job_info_2("", buffer, info_2, 0);
- free_job_info_2(info_2);
- SAFE_FREE(info_2);
+ if (*needed > offered) {
+ ret = WERR_INSUFFICIENT_BUFFER;
+ goto done;
+ }
- if (*needed > offered)
- return WERR_INSUFFICIENT_BUFFER;
+ ret = WERR_OK;
+
+ done:
+ /* Cleanup allocated memory */
- return WERR_OK;
+ SAFE_FREE(queue);
+ free_job_info_2(info_2); /* Also frees devmode */
+ SAFE_FREE(info_2);
+ free_a_printer(&ntprinter, 2);
+
+ return ret;
}
/****************************************************************************
@@ -7113,7 +7615,7 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u,
*/
if (strcmp(key, "PrinterDriverData") != 0)
- return WERR_INVALID_PARAM;
+ return WERR_BADFILE;
DEBUG(10, ("_spoolss_getprinterdataex: pass me to getprinterdata\n"));
found = getprinterdata_printer(p, p->mem_ctx, handle, value,
@@ -7158,7 +7660,7 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u,
unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1);
- if (strcmp(key, "PrinterDriverData") == 0)
+ if (strcmp(key, "PrinterDriverData") != 0)
return WERR_INVALID_PARAM;
ZERO_STRUCT(q_u_local);
@@ -7325,22 +7827,6 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
enum_values[num_entries].value_len = (strlen(value)+1) * 2;
enum_values[num_entries].type = type;
- /*
- * NULL terminate REG_SZ
- * FIXME!!! We should not be correctly problems in the way
- * we store PrinterData here. Need to investogate
- * SetPrinterData[Ex] --jerry
- */
-
- if (type == REG_SZ) {
- /* fix alignment if the string was stored
- in a bizarre fashion */
- if ((data_len % 2) == 0)
- add_len = 2;
- else
- add_len = data_len % 2;
- }
-
if (!(enum_values[num_entries].data=talloc_zero(p->mem_ctx, data_len+add_len))) {
DEBUG(0,("talloc_realloc failed to allocate more memory for data!\n"));
result = WERR_NOMEM;
@@ -7382,11 +7868,6 @@ done:
/****************************************************************************
****************************************************************************/
-/* Disabled because it doesn't fix the bug I am looking at but it would be
- a shame to throw away the code. -tpot */
-
-#if 0
-
static void fill_printprocessordirectory_1(PRINTPROCESSOR_DIRECTORY_1 *info, char *name)
{
init_unistr(&info->name, name);
@@ -7411,13 +7892,7 @@ static WERROR getprintprocessordirectory_level_1(UNISTR2 *name,
if((info=(PRINTPROCESSOR_DIRECTORY_1 *)malloc(sizeof(PRINTPROCESSOR_DIRECTORY_1))) == NULL)
return WERR_NOMEM;
- /* Not sure what to return here - are UNC names valid here?.
- Windows returns the string: C:\WINNT\System32\spool\PRTPROCS\W32X86
- which is pretty bogus for a RPC. */
-
- slprintf(path, sizeof(path)-1, "\\\\%s\\print$\\%s", get_called_name(), short_archi);
-
- DEBUG(4,("print processor directory: [%s]\n", path));
+ pstrcpy(path, "C:\\WINNT\\System32\\spool\\PRTPROCS\\W32X86");
fill_printprocessordirectory_1(info, path);
@@ -7464,4 +7939,3 @@ WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROC
return WERR_ACCESS_DENIED;
}
-#endif
diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c
index d1fa83ce437..7680a212978 100644
--- a/source/rpc_server/srv_srvsvc_nt.c
+++ b/source/rpc_server/srv_srvsvc_nt.c
@@ -174,8 +174,8 @@ static SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, int snum, size_t *
se_map_generic(&def_access, &file_generic_mapping);
- init_sec_access(&sa, GENERIC_ALL_ACCESS | def_access );
- init_sec_ace(&ace, &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, sa, 0);
+ init_sec_access(&sa, GENERIC_ALL_ACCESS | def_access );
+ init_sec_ace(&ace, &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, sa, 0);
if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, 1, &ace)) != NULL) {
psd = make_sec_desc(ctx, SEC_DESC_REVISION, NULL, NULL, NULL, psa, psize);
@@ -205,13 +205,13 @@ static SEC_DESC *get_share_security( TALLOC_CTX *ctx, int snum, size_t *psize)
slprintf(key, sizeof(key)-1, "SECDESC/%s", lp_servicename(snum));
- if (tdb_prs_fetch(share_tdb, key, &ps, ctx)!=0 ||
- !sec_io_desc("get_share_security", &psd, &ps, 1)) {
+ if (tdb_prs_fetch(share_tdb, key, &ps, ctx)!=0 ||
+ !sec_io_desc("get_share_security", &psd, &ps, 1)) {
- DEBUG(4,("get_share_security: using default secdesc for %s\n", lp_servicename(snum) ));
+ DEBUG(4,("get_share_security: using default secdesc for %s\n", lp_servicename(snum) ));
- return get_share_security_default(ctx, snum, psize);
- }
+ return get_share_security_default(ctx, snum, psize);
+ }
if (psd)
*psize = sec_desc_size(psd);
@@ -237,27 +237,26 @@ static BOOL set_share_security(TALLOC_CTX *ctx, const char *share_name, SEC_DESC
prs_init(&ps, (uint32)sec_desc_size(psd), mem_ctx, MARSHALL);
- if (!sec_io_desc("share_security", &psd, &ps, 1)) {
- goto out;
- }
+ if (!sec_io_desc("share_security", &psd, &ps, 1))
+ goto out;
slprintf(key, sizeof(key)-1, "SECDESC/%s", share_name);
- if (tdb_prs_store(share_tdb, key, &ps)==0) {
- ret = True;
- DEBUG(5,("set_share_security: stored secdesc for %s\n", share_name ));
- } else {
- DEBUG(1,("set_share_security: Failed to store secdesc for %s\n", share_name ));
- }
-
- /* Free malloc'ed memory */
+ if (tdb_prs_store(share_tdb, key, &ps)==0) {
+ ret = True;
+ DEBUG(5,("set_share_security: stored secdesc for %s\n", share_name ));
+ } else {
+ DEBUG(1,("set_share_security: Failed to store secdesc for %s\n", share_name ));
+ }
+
+ /* Free malloc'ed memory */
out:
- prs_mem_free(&ps);
- if (mem_ctx)
- talloc_destroy(mem_ctx);
- return ret;
+ prs_mem_free(&ps);
+ if (mem_ctx)
+ talloc_destroy(mem_ctx);
+ return ret;
}
/*******************************************************************
@@ -347,6 +346,37 @@ BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 d
}
/*******************************************************************
+ Fill in a share info level 501 structure.
+********************************************************************/
+
+static void init_srv_share_info_501(pipes_struct *p, SRV_SHARE_INFO_501 *sh501, int snum)
+{
+ int len_net_name;
+ pstring net_name;
+ pstring remark;
+ uint32 type;
+
+ pstrcpy(net_name, lp_servicename(snum));
+ pstrcpy(remark, lp_comment(snum));
+ standard_sub_conn(p->conn, remark);
+
+ len_net_name = strlen(net_name);
+
+ /* work out the share type */
+ type = STYPE_DISKTREE;
+
+ if (lp_print_ok(snum))
+ type = STYPE_PRINTQ;
+ if (strequal("IPC$", net_name) || strequal("ADMIN$", net_name))
+ type = STYPE_IPC;
+ if (net_name[len_net_name] == '$')
+ type |= STYPE_HIDDEN;
+
+ init_srv_share_info501(&sh501->info_501, net_name, type, remark, (lp_csc_policy(snum) << 4));
+ init_srv_share_info501_str(&sh501->info_501_str, net_name, remark);
+}
+
+/*******************************************************************
Fill in a share info level 502 structure.
********************************************************************/
@@ -403,12 +433,14 @@ static void init_srv_share_info_502(pipes_struct *p, SRV_SHARE_INFO_502 *sh502,
static void init_srv_share_info_1005(SRV_SHARE_INFO_1005* sh1005, int snum)
{
- sh1005->dfs_root_flag = 0;
+ sh1005->misc_flags = 0;
#ifdef WITH_MSDFS
if(lp_host_msdfs() && lp_msdfs_root(snum))
- sh1005->dfs_root_flag = 3;
+ sh1005->misc_flags = 3;
#endif
+
+ sh1005->misc_flags |= (lp_csc_policy(snum) << 4);
}
@@ -491,6 +523,23 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr,
break;
}
+ case 501:
+ {
+ SRV_SHARE_INFO_501 *info501;
+ int i = 0;
+
+ info501 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_501));
+
+ for (snum = *resume_hnd; snum < num_services; snum++) {
+ if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) {
+ init_srv_share_info_501(p, &info501[i++], snum);
+ }
+ }
+
+ ctr->share.info501 = info501;
+ break;
+ }
+
case 502:
{
SRV_SHARE_INFO_502 *info502;
@@ -527,9 +576,9 @@ static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n
if (init_srv_share_info_ctr(p, &r_n->ctr, info_level,
&resume_hnd, &r_n->total_entries, all)) {
- r_n->status = NT_STATUS_OK;
+ r_n->status = WERR_OK;
} else {
- r_n->status = NT_STATUS_INVALID_INFO_CLASS;
+ r_n->status = WERR_UNKNOWN_LEVEL;
}
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@@ -542,7 +591,7 @@ static void init_srv_r_net_share_enum(pipes_struct *p, SRV_R_NET_SHARE_ENUM *r_n
static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_INFO *r_n,
char *share_name, uint32 info_level)
{
- NTSTATUS status = NT_STATUS_OK;
+ WERROR status = WERR_OK;
int snum;
DEBUG(5,("init_srv_r_net_share_get_info: %d\n", __LINE__));
@@ -559,6 +608,9 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I
case 2:
init_srv_share_info_2(p, &r_n->info.share.info2, snum);
break;
+ case 501:
+ init_srv_share_info_501(p, &r_n->info.share.info501, snum);
+ break;
case 502:
init_srv_share_info_502(p, &r_n->info.share.info502, snum);
break;
@@ -567,14 +619,14 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I
break;
default:
DEBUG(5,("init_srv_net_share_get_info: unsupported switch value %d\n", info_level));
- status = NT_STATUS_INVALID_INFO_CLASS;
+ status = WERR_UNKNOWN_LEVEL;
break;
}
} else {
- status = NT_STATUS_BAD_NETWORK_NAME;
+ status = WERR_INVALID_NAME;
}
- r_n->info.ptr_share_ctr = NT_STATUS_IS_OK(status) ? 1 : 0;
+ r_n->info.ptr_share_ctr = W_ERROR_IS_OK(status) ? 1 : 0;
r_n->status = status;
}
@@ -691,10 +743,10 @@ static void init_srv_sess_info_1(SRV_SESS_INFO_1 *ss1, uint32 *snum, uint32 *sto
makes a SRV_R_NET_SESS_ENUM structure.
********************************************************************/
-static NTSTATUS init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr,
+static WERROR init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr,
int switch_value, uint32 *resume_hnd, uint32 *total_entries)
{
- NTSTATUS status = NT_STATUS_OK;
+ WERROR status = WERR_OK;
DEBUG(5,("init_srv_sess_info_ctr: %d\n", __LINE__));
ctr->switch_value = switch_value;
@@ -713,7 +765,7 @@ static NTSTATUS init_srv_sess_info_ctr(SRV_SESS_INFO_CTR *ctr,
(*resume_hnd) = 0;
(*total_entries) = 0;
ctr->ptr_sess_ctr = 0;
- status = NT_STATUS_INVALID_INFO_CLASS;
+ status = WERR_UNKNOWN_LEVEL;
break;
}
@@ -732,11 +784,11 @@ static void init_srv_r_net_sess_enum(SRV_R_NET_SESS_ENUM *r_n,
r_n->sess_level = sess_level;
if (sess_level == -1)
- r_n->status = NT_STATUS_INVALID_INFO_CLASS;
+ r_n->status = WERR_UNKNOWN_LEVEL;
else
r_n->status = init_srv_sess_info_ctr(r_n->ctr, switch_value, &resume_hnd, &r_n->total_entries);
- if (NT_STATUS_IS_ERR(r_n->status))
+ if (!W_ERROR_IS_OK(r_n->status))
resume_hnd = 0;
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@@ -847,10 +899,10 @@ static void init_srv_conn_info_1(SRV_CONN_INFO_1 *ss1, uint32 *snum, uint32 *sto
makes a SRV_R_NET_CONN_ENUM structure.
********************************************************************/
-static NTSTATUS init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr,
+static WERROR init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr,
int switch_value, uint32 *resume_hnd, uint32 *total_entries)
{
- NTSTATUS status = NT_STATUS_OK;
+ WERROR status = WERR_OK;
DEBUG(5,("init_srv_conn_info_ctr: %d\n", __LINE__));
ctr->switch_value = switch_value;
@@ -869,7 +921,7 @@ static NTSTATUS init_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr,
(*resume_hnd = 0);
(*total_entries) = 0;
ctr->ptr_conn_ctr = 0;
- status = NT_STATUS_INVALID_INFO_CLASS;
+ status = WERR_UNKNOWN_LEVEL;
break;
}
@@ -887,11 +939,11 @@ static void init_srv_r_net_conn_enum(SRV_R_NET_CONN_ENUM *r_n,
r_n->conn_level = conn_level;
if (conn_level == -1)
- r_n->status = NT_STATUS_INVALID_INFO_CLASS;
+ r_n->status = WERR_UNKNOWN_LEVEL;
else
r_n->status = init_srv_conn_info_ctr(r_n->ctr, switch_value, &resume_hnd, &r_n->total_entries);
- if (NT_STATUS_IS_ERR(r_n->status))
+ if (!W_ERROR_IS_OK(r_n->status))
resume_hnd = 0;
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@@ -947,10 +999,10 @@ static void init_srv_file_info_3(SRV_FILE_INFO_3 *fl3, uint32 *fnum, uint32 *fto
makes a SRV_R_NET_FILE_ENUM structure.
********************************************************************/
-static NTSTATUS init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr,
+static WERROR init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr,
int switch_value, uint32 *resume_hnd, uint32 *total_entries)
{
- NTSTATUS status = NT_STATUS_OK;
+ WERROR status = WERR_OK;
DEBUG(5,("init_srv_file_info_ctr: %d\n", __LINE__));
ctr->switch_value = switch_value;
@@ -965,7 +1017,7 @@ static NTSTATUS init_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr,
(*resume_hnd = 0);
(*total_entries) = 0;
ctr->ptr_file_ctr = 0;
- status = NT_STATUS_INVALID_INFO_CLASS;
+ status = WERR_UNKNOWN_LEVEL;
break;
}
@@ -983,11 +1035,11 @@ static void init_srv_r_net_file_enum(SRV_R_NET_FILE_ENUM *r_n,
r_n->file_level = file_level;
if (file_level == 0)
- r_n->status = NT_STATUS_INVALID_INFO_CLASS;
+ r_n->status = WERR_UNKNOWN_LEVEL;
else
r_n->status = init_srv_file_info_ctr(r_n->ctr, switch_value, &resume_hnd, &(r_n->total_entries));
- if (NT_STATUS_IS_ERR(r_n->status))
+ if (!W_ERROR_IS_OK(r_n->status))
resume_hnd = 0;
init_enum_hnd(&r_n->enum_hnd, resume_hnd);
@@ -997,13 +1049,13 @@ static void init_srv_r_net_file_enum(SRV_R_NET_FILE_ENUM *r_n,
net server get info
********************************************************************/
-NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u)
+WERROR _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u)
{
- NTSTATUS status = NT_STATUS_OK;
+ WERROR status = WERR_OK;
SRV_INFO_CTR *ctr = (SRV_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_INFO_CTR));
if (!ctr)
- return NT_STATUS_NO_MEMORY;
+ return WERR_NOMEM;
ZERO_STRUCTP(ctr);
@@ -1035,7 +1087,7 @@ NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV
init_srv_info_100(&ctr->srv.sv100, 500, global_myname);
break;
default:
- status = NT_STATUS_INVALID_INFO_CLASS;
+ status = WERR_UNKNOWN_LEVEL;
break;
}
@@ -1051,12 +1103,9 @@ NTSTATUS _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV
net server set info
********************************************************************/
-NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u)
+WERROR _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u)
{
- /* NT gives "Windows NT error 0xc00000022" if we return
- NT_STATUS_ACCESS_DENIED here so just pretend everything is OK. */
-
- NTSTATUS status = NT_STATUS_OK;
+ WERROR status = WERR_OK;
DEBUG(5,("srv_net_srv_set_info: %d\n", __LINE__));
@@ -1073,11 +1122,11 @@ NTSTATUS _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV
net file enum
********************************************************************/
-NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u)
+WERROR _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u)
{
r_u->ctr = (SRV_FILE_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_FILE_INFO_CTR));
if (!r_u->ctr)
- return NT_STATUS_NO_MEMORY;
+ return WERR_NOMEM;
ZERO_STRUCTP(r_u->ctr);
@@ -1098,13 +1147,13 @@ NTSTATUS _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET
net conn enum
********************************************************************/
-NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u)
+WERROR _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u)
{
DEBUG(5,("srv_net_conn_enum: %d\n", __LINE__));
r_u->ctr = (SRV_CONN_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_CONN_INFO_CTR));
if (!r_u->ctr)
- return NT_STATUS_NO_MEMORY;
+ return WERR_NOMEM;
ZERO_STRUCTP(r_u->ctr);
@@ -1123,13 +1172,13 @@ NTSTATUS _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET
net sess enum
********************************************************************/
-NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u)
+WERROR _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u)
{
DEBUG(5,("_srv_net_sess_enum: %d\n", __LINE__));
r_u->ctr = (SRV_SESS_INFO_CTR *)talloc(p->mem_ctx, sizeof(SRV_SESS_INFO_CTR));
if (!r_u->ctr)
- return NT_STATUS_NO_MEMORY;
+ return WERR_NOMEM;
ZERO_STRUCTP(r_u->ctr);
@@ -1148,7 +1197,7 @@ NTSTATUS _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET
Net share enum all.
********************************************************************/
-NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
+WERROR _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
{
DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__));
@@ -1166,7 +1215,7 @@ NTSTATUS _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV
Net share enum.
********************************************************************/
-NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
+WERROR _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u)
{
DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__));
@@ -1184,7 +1233,7 @@ NTSTATUS _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_N
Net share get info.
********************************************************************/
-NTSTATUS _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u)
+WERROR _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u)
{
fstring share_name;
@@ -1244,7 +1293,7 @@ static char *valid_share_pathname(char *dos_pathname)
Net share set info. Modify share details.
********************************************************************/
-NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u)
+WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u)
{
struct current_user user;
pstring command;
@@ -1264,27 +1313,27 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u,
r_u->switch_value = 0;
if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
snum = find_service(share_name);
/* Does this share exist ? */
if (snum < 0)
- return NT_STATUS_BAD_NETWORK_NAME;
+ return WERR_INVALID_NAME;
/* No change to printer shares. */
if (lp_print_ok(snum))
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
get_current_user(&user,p);
if (user.uid != 0)
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
switch (q_u->info_level) {
case 1:
/* Not enough info in a level 1 to do anything. */
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
case 2:
unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name));
unistr2_to_ascii(pathname, &q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name));
@@ -1299,7 +1348,7 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u,
map_generic_share_sd_bits(psd);
break;
case 1005:
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
case 1501:
fstrcpy(pathname, lp_pathname(snum));
fstrcpy(comment, lp_comment(snum));
@@ -1309,16 +1358,16 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u,
break;
default:
DEBUG(5,("_srv_net_share_set_info: unsupported switch value %d\n", q_u->info_level));
- return NT_STATUS_INVALID_INFO_CLASS;
+ return WERR_UNKNOWN_LEVEL;
}
/* We can only modify disk shares. */
if (type != STYPE_DISKTREE)
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
/* Check if the pathname is valid. */
if (!(ptr = valid_share_pathname( pathname )))
- return NT_STATUS_OBJECT_PATH_INVALID;
+ return WERR_OBJECT_PATH_INVALID;
/* Ensure share name, pathname and comment don't contain '"' characters. */
string_replace(share_name, '"', ' ');
@@ -1332,7 +1381,7 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u,
if (strcmp(ptr, lp_pathname(snum)) || strcmp(comment, lp_comment(snum)) ) {
if (!lp_change_share_cmd() || !*lp_change_share_cmd())
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
lp_change_share_cmd(), CONFIGFILE, share_name, ptr, comment);
@@ -1340,11 +1389,11 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u,
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
DEBUG(0,("_srv_net_share_set_info: Running [%s] returned (%d)\n", command, ret ));
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
}
/* Tell everyone we updated smb.conf. */
- message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False);
+ message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
} else {
DEBUG(10,("_srv_net_share_set_info: No change to share name (%s)\n", share_name ));
@@ -1366,14 +1415,14 @@ NTSTATUS _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u,
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*******************************************************************
Net share add. Call 'add_share_command "sharename" "pathname" "comment" "read only = xxx"'
********************************************************************/
-NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u)
+WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u)
{
struct current_user user;
pstring command;
@@ -1394,18 +1443,18 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET
if (user.uid != 0) {
DEBUG(10,("_srv_net_share_add: uid != 0. Access denied.\n"));
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
}
if (!lp_add_share_cmd() || !*lp_add_share_cmd()) {
DEBUG(10,("_srv_net_share_add: No add share command\n"));
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
}
switch (q_u->info_level) {
case 1:
/* Not enough info in a level 1 to do anything. */
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
case 2:
unistr2_to_ascii(share_name, &q_u->info.share.info2.info_2_str.uni_netname, sizeof(share_name));
unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name));
@@ -1422,28 +1471,28 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET
break;
case 1005:
/* DFS only level. */
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
default:
DEBUG(5,("_srv_net_share_add: unsupported switch value %d\n", q_u->info_level));
- return NT_STATUS_INVALID_INFO_CLASS;
+ return WERR_UNKNOWN_LEVEL;
}
if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
snum = find_service(share_name);
/* Share already exists. */
if (snum >= 0)
- return NT_STATUS_OBJECT_NAME_COLLISION;
+ return WERR_ALREADY_EXISTS;
/* We can only add disk shares. */
if (type != STYPE_DISKTREE)
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
/* Check if the pathname is valid. */
if (!(ptr = valid_share_pathname( pathname )))
- return NT_STATUS_OBJECT_PATH_INVALID;
+ return WERR_OBJECT_PATH_INVALID;
/* Ensure share name, pathname and comment don't contain '"' characters. */
string_replace(share_name, '"', ' ');
@@ -1456,7 +1505,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET
DEBUG(10,("_srv_net_share_add: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
DEBUG(0,("_srv_net_share_add: Running [%s] returned (%d)\n", command, ret ));
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
}
if (psd) {
@@ -1466,7 +1515,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET
}
/* Tell everyone we updated smb.conf. */
- message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False);
+ message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
/*
* We don't call reload_services() here, the message will
@@ -1476,7 +1525,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*******************************************************************
@@ -1484,7 +1533,7 @@ NTSTATUS _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET
a parameter.
********************************************************************/
-NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u)
+WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u)
{
struct current_user user;
pstring command;
@@ -1497,24 +1546,24 @@ NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET
unistr2_to_ascii(share_name, &q_u->uni_share_name, sizeof(share_name));
if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
snum = find_service(share_name);
if (snum < 0)
- return NT_STATUS_BAD_NETWORK_NAME;
+ return WERR_NO_SUCH_SHARE;
/* No change to printer shares. */
if (lp_print_ok(snum))
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
get_current_user(&user,p);
if (user.uid != 0)
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
if (!lp_delete_share_cmd() || !*lp_delete_share_cmd())
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\"",
lp_delete_share_cmd(), CONFIGFILE, lp_servicename(snum));
@@ -1522,25 +1571,25 @@ NTSTATUS _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET
DEBUG(10,("_srv_net_share_del: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
DEBUG(0,("_srv_net_share_del: Running [%s] returned (%d)\n", command, ret ));
- return NT_STATUS_ACCESS_DENIED;
+ return WERR_ACCESS_DENIED;
}
/* Delete the SD in the database. */
delete_share_security(snum);
/* Tell everyone we updated smb.conf. */
- message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False);
+ message_send_all(conn_tdb_ctx(), MSG_SMB_CONF_UPDATED, NULL, 0, False, NULL);
lp_killservice(snum);
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*******************************************************************
time of day
********************************************************************/
-NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u)
+WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u)
{
TIME_OF_DAY_INFO *tod;
struct tm *t;
@@ -1548,13 +1597,13 @@ NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_N
tod = (TIME_OF_DAY_INFO *)talloc(p->mem_ctx, sizeof(TIME_OF_DAY_INFO));
if (!tod)
- return NT_STATUS_NO_MEMORY;
+ return WERR_NOMEM;
ZERO_STRUCTP(tod);
r_u->tod = tod;
r_u->ptr_srv_tod = 0x1;
- r_u->status = NT_STATUS_OK;
+ r_u->status = WERR_OK;
DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
@@ -1584,7 +1633,7 @@ NTSTATUS _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_N
Win9x NT tools get security descriptor.
***********************************************************************************/
-NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u,
+WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u,
SRV_R_NET_FILE_QUERY_SECDESC *r_u)
{
SEC_DESC *psd = NULL;
@@ -1597,7 +1646,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
BOOL bad_path;
int access_mode;
int action;
- uint32 ecode;
+ int ecode;
struct current_user user;
fstring user_name;
connection_struct *conn = NULL;
@@ -1605,7 +1654,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
ZERO_STRUCT(st);
- r_u->status = NT_STATUS_OK;
+ r_u->status = WERR_OK;
unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname));
@@ -1621,13 +1670,13 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
if (conn == NULL) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to connect to %s\n", qualname));
- r_u->status = NT_STATUS(ecode);
+ r_u->status = W_ERROR(ecode);
goto error_exit;
}
if (!become_user(conn, conn->vuid)) {
DEBUG(0,("_srv_net_file_query_secdesc: Can't become connected user!\n"));
- r_u->status = NT_STATUS_ACCESS_DENIED;
+ r_u->status = WERR_ACCESS_DENIED;
goto error_exit;
}
became_user = True;
@@ -1640,12 +1689,12 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
if (!fsp) {
/* Perhaps it is a directory */
if (errno == EISDIR)
- fsp = open_directory(conn, filename, &st,0,
+ fsp = open_directory(conn, filename, &st,FILE_READ_ATTRIBUTES,0,
(FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action);
if (!fsp) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename));
- r_u->status = NT_STATUS_ACCESS_DENIED;
+ r_u->status = WERR_ACCESS_DENIED;
goto error_exit;
}
}
@@ -1654,7 +1703,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
if (sd_size == 0) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to get NT ACL for file %s\n", filename));
- r_u->status = NT_STATUS_ACCESS_DENIED;
+ r_u->status = WERR_ACCESS_DENIED;
goto error_exit;
}
@@ -1690,7 +1739,7 @@ NTSTATUS _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDE
Win9x NT tools set security descriptor.
***********************************************************************************/
-NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
+WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
SRV_R_NET_FILE_SET_SECDESC *r_u)
{
BOOL ret;
@@ -1710,7 +1759,7 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *
ZERO_STRUCT(st);
- r_u->status = NT_STATUS_OK;
+ r_u->status = WERR_OK;
unistr2_to_ascii(qualname, &q_u->uni_qual_name, sizeof(qualname));
@@ -1726,13 +1775,13 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *
if (conn == NULL) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to connect to %s\n", qualname));
- r_u->status = NT_STATUS(ecode);
+ r_u->status = W_ERROR(ecode);
goto error_exit;
}
if (!become_user(conn, conn->vuid)) {
DEBUG(0,("_srv_net_file_set_secdesc: Can't become connected user!\n"));
- r_u->status = NT_STATUS_ACCESS_DENIED;
+ r_u->status = WERR_ACCESS_DENIED;
goto error_exit;
}
became_user = True;
@@ -1746,12 +1795,12 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *
if (!fsp) {
/* Perhaps it is a directory */
if (errno == EISDIR)
- fsp = open_directory(conn, filename, &st,0,
+ fsp = open_directory(conn, filename, &st,FILE_READ_ATTRIBUTES,0,
(FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, &action);
if (!fsp) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to open file %s\n", filename));
- r_u->status = NT_STATUS_ACCESS_DENIED;
+ r_u->status = WERR_ACCESS_DENIED;
goto error_exit;
}
}
@@ -1760,7 +1809,7 @@ NTSTATUS _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *
if (ret == False) {
DEBUG(3,("_srv_net_file_set_secdesc: Unable to set NT ACL on file %s\n", filename));
- r_u->status = NT_STATUS_ACCESS_DENIED;
+ r_u->status = WERR_ACCESS_DENIED;
goto error_exit;
}
@@ -1830,13 +1879,13 @@ static const char *next_server_disk_enum(uint32 *resume)
return disk;
}
-NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u)
+WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u)
{
uint32 i;
const char *disk_name;
uint32 resume=get_enum_hnd(&q_u->enum_hnd);
- r_u->status=NT_STATUS_OK;
+ r_u->status=WERR_OK;
r_u->total_entries = init_server_disk_enum(&resume);
@@ -1866,12 +1915,12 @@ NTSTATUS _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET
return r_u->status;
}
-NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u)
+WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u)
{
int snum;
fstring share_name;
- r_u->status=NT_STATUS_OK;
+ r_u->status=WERR_OK;
switch(q_u->type) {
@@ -1885,12 +1934,12 @@ NTSTATUS _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, S
/* Share already exists. */
if (snum >= 0)
- r_u->status = NT_STATUS_OBJECT_NAME_INVALID;
+ r_u->status = WERR_ALREADY_EXISTS;
break;
default:
/*unsupported type*/
- r_u->status = NT_STATUS_INVALID_LEVEL;
+ r_u->status = WERR_UNKNOWN_LEVEL;
break;
}
diff --git a/source/rpc_server/srv_util.c b/source/rpc_server/srv_util.c
index a1e85d80f45..67f5e99c3b6 100644
--- a/source/rpc_server/srv_util.c
+++ b/source/rpc_server/srv_util.c
@@ -76,6 +76,8 @@ rid_name domain_group_rids[] =
{ 0 , NULL }
};
+#define LSA_MAX_GROUPS 96
+
int make_dom_gids(TALLOC_CTX *ctx, char *gids_str, DOM_GID **ppgids)
{
char *ptr;
diff --git a/source/rpc_server/srv_wkssvc_nt.c b/source/rpc_server/srv_wkssvc_nt.c
index 74753021828..ea3b48887df 100644
--- a/source/rpc_server/srv_wkssvc_nt.c
+++ b/source/rpc_server/srv_wkssvc_nt.c
@@ -49,7 +49,7 @@ static void create_wks_info_100(WKS_INFO_100 *inf)
0x000001f4, /* platform id info */
lp_major_announce_version(),
lp_minor_announce_version(),
- my_name, unix_to_dos(domain,False));
+ my_name, unix_to_dos_static(domain));
}
/*******************************************************************
diff --git a/source/rpcclient/cmd_dfs.c b/source/rpcclient/cmd_dfs.c
index 78f68dcc86b..8a3c3e9db33 100644
--- a/source/rpcclient/cmd_dfs.c
+++ b/source/rpcclient/cmd_dfs.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000
diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c
index 8b3e49051ed..17180e237f7 100644
--- a/source/rpcclient/cmd_lsarpc.c
+++ b/source/rpcclient/cmd_lsarpc.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000
@@ -79,7 +78,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
DOM_SID *sids;
uint32 *types;
- int num_names, i;
+ int i;
if (argc == 1) {
printf("Usage: %s [name1 [name2 [...]]]\n", argv[0]);
@@ -93,17 +92,18 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- /* Lookup the names */
-
- result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1,
- &argv[1], &sids, &types, &num_names);
+ result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1,
+ (const char**)(argv + 1), &sids, &types);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) !=
+ NT_STATUS_V(STATUS_SOME_UNMAPPED))
goto done;
+ result = NT_STATUS_OK;
+
/* Print results */
- for (i = 0; i < num_names; i++) {
+ for (i = 0; i < (argc - 1); i++) {
fstring sid_str;
sid_to_string(sid_str, &sids[i]);
@@ -123,9 +123,10 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
DOM_SID *sids;
+ char **domains;
char **names;
uint32 *types;
- int num_names, i;
+ int i;
if (argc == 1) {
printf("Usage: %s [sid1 [sid2 [...]]]\n", argv[0]);
@@ -153,20 +154,24 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Lookup the SIDs */
- result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids,
- &names, &types, &num_names);
+ result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids,
+ &domains, &names, &types);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) !=
+ NT_STATUS_V(STATUS_SOME_UNMAPPED))
goto done;
+ result = NT_STATUS_OK;
+
/* Print results */
- for (i = 0; i < num_names; i++) {
+ for (i = 0; i < (argc - 1); i++) {
fstring sid_str;
sid_to_string(sid_str, &sids[i]);
- printf("%s %s (%d)\n", sid_str, names[i] ? names[i] :
- "*unknown*", types[i]);
+ printf("%s %s\\%s (%d)\n", sid_str,
+ domains[i] ? domains[i] : "*unknown*",
+ names[i] ? names[i] : "*unknown*", types[i]);
}
done:
@@ -222,6 +227,273 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli,
return result;
}
+/* Enumerates privileges */
+
+static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ uint32 enum_context=0;
+ uint32 pref_max_length=0x1000;
+ uint32 count=0;
+ char **privs_name;
+ uint32 *privs_high;
+ uint32 *privs_low;
+ int i;
+
+ if (argc > 3) {
+ printf("Usage: %s [enum context] [max length]\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ if (argc>=2)
+ enum_context=atoi(argv[1]);
+
+ if (argc==3)
+ pref_max_length=atoi(argv[2]);
+
+ result = cli_lsa_open_policy(cli, mem_ctx, True,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_enum_privilege(cli, mem_ctx, &pol, &enum_context, pref_max_length,
+ &count, &privs_name, &privs_high, &privs_low);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Print results */
+ printf("found %d privileges\n\n", count);
+
+ for (i = 0; i < count; i++) {
+ printf("%s \t\t%d:%d (0x%x:0x%x)\n", privs_name[i] ? privs_name[i] : "*unknown*",
+ privs_high[i], privs_low[i], privs_high[i], privs_low[i]);
+ }
+
+ done:
+ return result;
+}
+
+/* Get privilege name */
+
+static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ uint16 lang_id=0;
+ uint16 lang_id_sys=0;
+ uint16 lang_id_desc;
+ fstring description;
+
+ if (argc != 2) {
+ printf("Usage: %s privilege name\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ result = cli_lsa_open_policy(cli, mem_ctx, True,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_get_dispname(cli, mem_ctx, &pol, argv[1], lang_id, lang_id_sys, description, &lang_id_desc);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Print results */
+ printf("%s -> %s (language: 0x%x)\n", argv[1], description, lang_id_desc);
+
+ done:
+ return result;
+}
+
+/* Enumerate the LSA SIDS */
+
+static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ uint32 enum_context=0;
+ uint32 pref_max_length=0x1000;
+ DOM_SID *sids;
+ uint32 count=0;
+ int i;
+
+ if (argc > 3) {
+ printf("Usage: %s [enum context] [max length]\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ if (argc>=2)
+ enum_context=atoi(argv[1]);
+
+ if (argc==3)
+ pref_max_length=atoi(argv[2]);
+
+ result = cli_lsa_open_policy(cli, mem_ctx, True,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_enum_sids(cli, mem_ctx, &pol, &enum_context, pref_max_length,
+ &count, &sids);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Print results */
+ printf("found %d SIDs\n\n", count);
+
+ for (i = 0; i < count; i++) {
+ fstring sid_str;
+
+ sid_to_string(sid_str, &sids[i]);
+ printf("%s\n", sid_str);
+ }
+
+ done:
+ return result;
+}
+
+/* Enumerate the privileges of an SID */
+
+static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND dom_pol;
+ POLICY_HND user_pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ uint32 access_desired = 0x000f000f;
+
+ DOM_SID sid;
+ uint32 count=0;
+ LUID_ATTR *set;
+ int i;
+
+ if (argc != 2 ) {
+ printf("Usage: %s SID\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ string_to_sid(&sid, argv[1]);
+
+ result = cli_lsa_open_policy2(cli, mem_ctx, True,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &dom_pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_open_account(cli, mem_ctx, &dom_pol, &sid, access_desired, &user_pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_enum_privsaccount(cli, mem_ctx, &user_pol, &count, &set);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Print results */
+ printf("found %d privileges for SID %s\n\n", count, argv[1]);
+ printf("high\tlow\tattribute\n");
+
+ for (i = 0; i < count; i++) {
+ printf("%u\t%u\t%u\n", set[i].luid.high, set[i].luid.low, set[i].attr);
+ }
+
+ done:
+ return result;
+}
+
+/* Get a privilege value given its name */
+
+static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ LUID luid;
+
+ if (argc != 2 ) {
+ printf("Usage: %s name\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ result = cli_lsa_open_policy2(cli, mem_ctx, True,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_lookupprivvalue(cli, mem_ctx, &pol, argv[1], &luid);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Print results */
+
+ printf("%u:%u (0x%x:0x%x)\n", luid.high, luid.low, luid.high, luid.low);
+
+ done:
+ return result;
+}
+
+/* Query LSA security object */
+
+static NTSTATUS cmd_lsa_query_secobj(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ SEC_DESC_BUF *sdb;
+ uint32 sec_info = 0x00000004; /* ??? */
+
+ if (argc != 1 ) {
+ printf("Usage: %s\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ result = cli_lsa_open_policy2(cli, mem_ctx, True,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = cli_lsa_query_secobj(cli, mem_ctx, &pol, sec_info, &sdb);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Print results */
+
+ display_sec_desc(sdb->sec);
+
+ done:
+ return result;
+}
+
/* List of commands exported by this module */
struct cmd_set lsarpc_commands[] = {
@@ -232,6 +504,12 @@ struct cmd_set lsarpc_commands[] = {
{ "lookupsids", cmd_lsa_lookup_sids, PIPE_LSARPC, "Convert SIDs to names", "" },
{ "lookupnames", cmd_lsa_lookup_names, PIPE_LSARPC, "Convert names to SIDs", "" },
{ "enumtrust", cmd_lsa_enum_trust_dom, PIPE_LSARPC, "Enumerate trusted domains", "" },
+ { "enumprivs", cmd_lsa_enum_privilege, PIPE_LSARPC, "Enumerate privileges", "" },
+ { "getdispname", cmd_lsa_get_dispname, PIPE_LSARPC, "Get the privilege name", "" },
+ { "lsaenumsid", cmd_lsa_enum_sids, PIPE_LSARPC, "Enumerate the LSA SIDS", "" },
+ { "lsaenumprivsaccount", cmd_lsa_enum_privsaccounts, PIPE_LSARPC, "Enumerate the privileges of an SID", "" },
+ { "lsalookupprivvalue", cmd_lsa_lookupprivvalue, PIPE_LSARPC, "Get a privilege value given its name", "" },
+ { "lsaquerysecobj", cmd_lsa_query_secobj, PIPE_LSARPC, "Query LSA security object", "" },
{ NULL }
};
diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c
index 524ff5fb49f..4d67cba1b52 100644
--- a/source/rpcclient/cmd_netlogon.c
+++ b/source/rpcclient/cmd_netlogon.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000
@@ -152,6 +151,7 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli,
uint32 database_id = 0, num_deltas;
SAM_DELTA_HDR *hdr_deltas;
SAM_DELTA_CTR *deltas;
+ DOM_CRED ret_creds;
if (argc > 2) {
fprintf(stderr, "Usage: %s [database_id]\n", argv[0]);
@@ -181,9 +181,12 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli,
goto done;
}
+ /* on first call the returnAuthenticator is empty */
+ memset(&ret_creds, 0, sizeof(ret_creds));
+
/* Synchronise sam database */
- result = cli_netlogon_sam_sync(cli, mem_ctx, database_id,
+ result = cli_netlogon_sam_sync(cli, mem_ctx, &ret_creds, database_id,
&num_deltas, &hdr_deltas, &deltas);
if (!NT_STATUS_IS_OK(result))
diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c
index 68a75a70c91..ed152b9f5c8 100644
--- a/source/rpcclient/cmd_samr.c
+++ b/source/rpcclient/cmd_samr.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Andrew Tridgell 1992-2000,
@@ -95,6 +94,54 @@ static void display_sam_user_info_21(SAM_USER_INFO_21 *usr)
}
}
+static char *display_time(NTTIME nttime)
+{
+ static fstring string;
+
+ float high;
+ float low;
+ int sec;
+ int days, hours, mins, secs;
+
+ if (nttime.high==0 && nttime.low==0)
+ return "Now";
+
+ if (nttime.high==0x80000000 && nttime.low==0)
+ return "Never";
+
+ high = 65536;
+ high = high/10000;
+ high = high*65536;
+ high = high/1000;
+ high = high * (~nttime.high);
+
+ low = ~nttime.low;
+ low = low/(1000*1000*10);
+
+ sec=high+low;
+
+ days=sec/(60*60*24);
+ hours=(sec - (days*60*60*24)) / (60*60);
+ mins=(sec - (days*60*60*24) - (hours*60*60) ) / 60;
+ secs=sec - (days*60*60*24) - (hours*60*60) - (mins*60);
+
+ snprintf(string, sizeof(string)-1, "%u days, %u hours, %u minutes, %u seconds", days, hours, mins, secs);
+ return (string);
+}
+
+static void display_sam_unk_info_1(SAM_UNK_INFO_1 *info1)
+{
+
+ printf("Minimum password length: %d\n", info1->min_length_password);
+ printf("Password uniqueness (remember x passwords): %d\n", info1->password_history);
+ printf("flag: ");
+ if(info1->flag&&2==2) printf("users must open a session to change password ");
+ printf("\n");
+
+ printf("password expire in: %s\n", display_time(info1->expire));
+ printf("Min password age (allow changing in x days): %s\n", display_time(info1->min_passwordage));
+}
+
static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2)
{
fstring name;
@@ -120,11 +167,13 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2)
printf("Unknown 6:\t0x%x\n", info2->unknown_6);
}
-void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1)
+static void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1)
{
fstring tmp;
+ printf("index: 0x%x ", e1->user_idx);
printf("RID: 0x%x ", e1->rid_user);
+ printf("acb: 0x%x ", e1->acb_info);
unistr2_to_ascii(tmp, &s1->uni_acct_name, sizeof(tmp)-1);
printf("Account: %s\t", tmp);
@@ -136,7 +185,39 @@ void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1)
printf("Desc: %s\n", tmp);
}
-void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4)
+static void display_sam_info_2(SAM_ENTRY2 *e2, SAM_STR2 *s2)
+{
+ fstring tmp;
+
+ printf("index: 0x%x ", e2->user_idx);
+ printf("RID: 0x%x ", e2->rid_user);
+ printf("acb: 0x%x ", e2->acb_info);
+
+ unistr2_to_ascii(tmp, &s2->uni_srv_name, sizeof(tmp)-1);
+ printf("Account: %s\t", tmp);
+
+ unistr2_to_ascii(tmp, &s2->uni_srv_desc, sizeof(tmp)-1);
+ printf("Name: %s\n", tmp);
+
+}
+
+static void display_sam_info_3(SAM_ENTRY3 *e3, SAM_STR3 *s3)
+{
+ fstring tmp;
+
+ printf("index: 0x%x ", e3->grp_idx);
+ printf("RID: 0x%x ", e3->rid_grp);
+ printf("attr: 0x%x ", e3->attr);
+
+ unistr2_to_ascii(tmp, &s3->uni_grp_name, sizeof(tmp)-1);
+ printf("Account: %s\t", tmp);
+
+ unistr2_to_ascii(tmp, &s3->uni_grp_desc, sizeof(tmp)-1);
+ printf("Name: %s\n", tmp);
+
+}
+
+static void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4)
{
int i;
@@ -148,6 +229,20 @@ void display_sam_info_4(SAM_ENTRY4 *e4, SAM_STR4 *s4)
printf("\n");
}
+
+static void display_sam_info_5(SAM_ENTRY5 *e5, SAM_STR5 *s5)
+{
+ int i;
+
+ printf("index: 0x%x ", e5->grp_idx);
+
+ printf("Account: ");
+ for (i=0; i<s5->grp_name.str_str_len; i++)
+ printf("%c", s5->grp_name.buffer[i]);
+ printf("\n");
+
+}
+
/**********************************************************************
* Query user information
*/
@@ -368,6 +463,71 @@ static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli,
return result;
}
+/* Query aliases a user is a member of */
+
+static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ POLICY_HND connect_pol, domain_pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ uint32 user_rid, num_aliases, *alias_rids;
+ int i;
+ fstring server;
+ DOM_SID tmp_sid;
+ DOM_SID2 sid;
+ DOM_SID global_sid_Builtin;
+
+ string_to_sid(&global_sid_Builtin, "S-1-5-32");
+
+ if (argc != 3) {
+ printf("Usage: %s builtin|domain rid\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ sscanf(argv[2], "%i", &user_rid);
+
+ slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
+ strupper (server);
+
+ result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
+ &connect_pol);
+ if (!NT_STATUS_IS_OK(result)) {
+ goto done;
+ }
+
+ if (StrCaseCmp(argv[1], "domain")==0)
+ result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ &domain_sid, &domain_pol);
+ else if (StrCaseCmp(argv[1], "builtin")==0)
+ result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ &global_sid_Builtin, &domain_pol);
+ else
+ return NT_STATUS_OK;
+
+ if (!NT_STATUS_IS_OK(result)) {
+ goto done;
+ }
+
+ sid_copy(&tmp_sid, &domain_sid);
+ sid_append_rid(&tmp_sid, user_rid);
+ init_dom_sid2(&sid, &tmp_sid);
+
+ result = cli_samr_query_useraliases(cli, mem_ctx, &domain_pol, 1, &sid, &num_aliases, &alias_rids);
+ if (!NT_STATUS_IS_OK(result)) {
+ goto done;
+ }
+
+ for (i = 0; i < num_aliases; i++) {
+ printf("\tgroup rid:[0x%x]\n", alias_rids[i]);
+ }
+
+ done:
+ return result;
+}
+
/* Query members of a group */
static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli,
@@ -476,6 +636,66 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli,
return result;
}
+/* Enumerate domain groups */
+
+static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ POLICY_HND connect_pol, domain_pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ uint32 start_idx, size, num_dom_groups, i;
+ struct acct_info *dom_groups;
+ DOM_SID global_sid_Builtin;
+
+ string_to_sid(&global_sid_Builtin, "S-1-5-32");
+
+ if (argc != 2) {
+ printf("Usage: %s builtin|domain\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ /* Get sam policy handle */
+
+ result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
+ &connect_pol);
+ if (!NT_STATUS_IS_OK(result)) {
+ goto done;
+ }
+
+ /* Get domain policy handle */
+
+ if (StrCaseCmp(argv[1], "domain")==0)
+ result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ &domain_sid, &domain_pol);
+ else if (StrCaseCmp(argv[1], "builtin")==0)
+ result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ &global_sid_Builtin, &domain_pol);
+ else
+ return NT_STATUS_OK;
+ if (!NT_STATUS_IS_OK(result)) {
+ goto done;
+ }
+
+ /* Enumerate domain groups */
+
+ start_idx = 0;
+ size = 0xffff;
+
+ result = cli_samr_enum_als_groups(cli, mem_ctx, &domain_pol,
+ &start_idx, size,
+ &dom_groups, &num_dom_groups);
+
+ for (i = 0; i < num_dom_groups; i++)
+ printf("group:[%s] rid:[0x%x]\n", dom_groups[i].acct_name,
+ dom_groups[i].rid);
+
+ done:
+ return result;
+}
+
/* Query alias membership */
static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli,
@@ -549,6 +769,10 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli,
int info_level = 1;
SAM_DISPINFO_CTR ctr;
SAM_DISPINFO_1 info1;
+ SAM_DISPINFO_2 info2;
+ SAM_DISPINFO_3 info3;
+ SAM_DISPINFO_4 info4;
+ SAM_DISPINFO_5 info5;
if (argc > 4) {
printf("Usage: %s [info level] [start index] [max entries]\n", argv[0]);
@@ -585,26 +809,55 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli,
ZERO_STRUCT(ctr);
ZERO_STRUCT(info1);
+ switch (info_level) {
+ case 1:
+ ZERO_STRUCT(info1);
ctr.sam.info1 = &info1;
+ break;
+ case 2:
+ ZERO_STRUCT(info2);
+ ctr.sam.info2 = &info2;
+ break;
+ case 3:
+ ZERO_STRUCT(info3);
+ ctr.sam.info3 = &info3;
+ break;
+ case 4:
+ ZERO_STRUCT(info4);
+ ctr.sam.info4 = &info4;
+ break;
+ case 5:
+ ZERO_STRUCT(info5);
+ ctr.sam.info5 = &info5;
+ break;
+ }
+
+ do {
result = cli_samr_query_dispinfo(cli, mem_ctx, &domain_pol,
&start_idx, info_level,
&num_entries, max_entries, &ctr);
- if (!NT_STATUS_IS_OK(result))
- goto done;
-
for (i = 0; i < num_entries; i++) {
switch (info_level) {
case 1:
display_sam_info_1(&ctr.sam.info1->sam[i], &ctr.sam.info1->str[i]);
break;
+ case 2:
+ display_sam_info_2(&ctr.sam.info2->sam[i], &ctr.sam.info2->str[i]);
+ break;
+ case 3:
+ display_sam_info_3(&ctr.sam.info3->sam[i], &ctr.sam.info3->str[i]);
+ break;
case 4:
display_sam_info_4(&ctr.sam.info4->sam[i], &ctr.sam.info4->str[i]);
break;
+ case 5:
+ display_sam_info_5(&ctr.sam.info5->sam[i], &ctr.sam.info5->str[i]);
+ break;
}
}
-
+ } while (!NT_STATUS_IS_OK(result));
done:
return result;
}
@@ -656,6 +909,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli,
/* Display domain info */
switch (switch_value) {
+ case 1:
+ display_sam_unk_info_1(&ctr.info.inf1);
+ break;
case 2:
display_sam_unk_info_2(&ctr.info.inf2);
break;
@@ -666,6 +922,9 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli,
}
done:
+
+ cli_samr_close(cli, mem_ctx, &domain_pol);
+ cli_samr_close(cli, mem_ctx, &connect_pol);
return result;
}
@@ -733,9 +992,14 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli,
uint32 num_rids, num_names, *name_types, *rids;
char **names;
int i;
+ DOM_SID global_sid_Builtin;
- if (argc < 2) {
- printf("Usage: %s name1 [name2 [name3] [...]]\n", argv[0]);
+ string_to_sid(&global_sid_Builtin, "S-1-5-32");
+
+ if (argc < 3) {
+ printf("Usage: %s domain|builtin name1 [name2 [name3] [...]]\n", argv[0]);
+ printf("check on the domain SID: S-1-5-21-x-y-z\n");
+ printf("or check on the builtin SID: S-1-5-32\n");
return NT_STATUS_OK;
}
@@ -748,9 +1012,16 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli,
goto done;
}
+ if (StrCaseCmp(argv[1], "domain")==0)
result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
MAXIMUM_ALLOWED_ACCESS,
&domain_sid, &domain_pol);
+ else if (StrCaseCmp(argv[1], "builtin")==0)
+ result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ &global_sid_Builtin, &domain_pol);
+ else
+ return NT_STATUS_OK;
if (!NT_STATUS_IS_OK(result)) {
goto done;
@@ -758,11 +1029,11 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli,
/* Look up names */
- num_names = argc - 1;
+ num_names = argc - 2;
names = (char **)talloc(mem_ctx, sizeof(char *) * num_names);
- for (i = 0; i < argc - 1; i++)
- names[i] = argv[i + 1];
+ for (i = 0; i < argc - 2; i++)
+ names[i] = argv[i + 2];
result = cli_samr_lookup_names(cli, mem_ctx, &domain_pol,
flags, num_names, names,
@@ -911,6 +1182,86 @@ static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli,
return result;
}
+/**********************************************************************
+ * Query user security object
+ */
+static NTSTATUS cmd_samr_query_sec_obj(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ POLICY_HND connect_pol, domain_pol, user_pol, *pol;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ uint32 info_level = 4;
+ fstring server;
+ uint32 user_rid = 0;
+ TALLOC_CTX *ctx = NULL;
+ SEC_DESC_BUF *sec_desc_buf=NULL;
+ BOOL domain = False;
+
+ ctx=talloc_init();
+
+ if (argc > 2) {
+ printf("Usage: %s [rid|-d]\n", argv[0]);
+ printf("\tSpecify rid for security on user, -d for security on domain\n");
+ return NT_STATUS_OK;
+ }
+
+ if (argc == 2) {
+ if (strcmp(argv[1], "-d") == 0)
+ domain = True;
+ else
+ sscanf(argv[1], "%i", &user_rid);
+ }
+
+ slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
+ strupper (server);
+ result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
+ &connect_pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ if (domain || user_rid)
+ result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ &domain_sid, &domain_pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ if (user_rid)
+ result = cli_samr_open_user(cli, mem_ctx, &domain_pol,
+ MAXIMUM_ALLOWED_ACCESS,
+ user_rid, &user_pol);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ /* Pick which query pol to use */
+
+ pol = &connect_pol;
+
+ if (domain)
+ pol = &domain_pol;
+
+ if (user_rid)
+ pol = &user_pol;
+
+ /* Query SAM security object */
+
+ result = cli_samr_query_sec_obj(cli, mem_ctx, pol, info_level, ctx,
+ &sec_desc_buf);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ display_sec_desc(sec_desc_buf->sec);
+
+done:
+ talloc_destroy(ctx);
+ return result;
+}
+
/* List of commands exported by this module */
struct cmd_set samr_commands[] = {
@@ -920,16 +1271,19 @@ struct cmd_set samr_commands[] = {
{ "queryuser", cmd_samr_query_user, PIPE_SAMR, "Query user info", "" },
{ "querygroup", cmd_samr_query_group, PIPE_SAMR, "Query group info", "" },
{ "queryusergroups", cmd_samr_query_usergroups, PIPE_SAMR, "Query user groups", "" },
+ { "queryuseraliases", cmd_samr_query_useraliases, PIPE_SAMR, "Query user aliases", "" },
{ "querygroupmem", cmd_samr_query_groupmem, PIPE_SAMR, "Query group membership", "" },
{ "queryaliasmem", cmd_samr_query_aliasmem, PIPE_SAMR, "Query alias membership", "" },
{ "querydispinfo", cmd_samr_query_dispinfo, PIPE_SAMR, "Query display info", "" },
{ "querydominfo", cmd_samr_query_dominfo, PIPE_SAMR, "Query domain info", "" },
{ "enumdomgroups", cmd_samr_enum_dom_groups, PIPE_SAMR, "Enumerate domain groups", "" },
+ { "enumalsgroups", cmd_samr_enum_als_groups, PIPE_SAMR, "Enumerate alias groups", "" },
{ "createdomuser", cmd_samr_create_dom_user, PIPE_SAMR, "Create domain user", "" },
{ "samlookupnames", cmd_samr_lookup_names, PIPE_SAMR, "Look up names", "" },
{ "samlookuprids", cmd_samr_lookup_rids, PIPE_SAMR, "Look up names", "" },
{ "deletedomuser", cmd_samr_delete_dom_user, PIPE_SAMR, "Delete domain user", "" },
+ { "samquerysecobj", cmd_samr_query_sec_obj, PIPE_SAMR, "Query SAMR security object", "" },
{ NULL }
};
diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c
index b3bffde2ba0..0296afd776a 100644
--- a/source/rpcclient/cmd_spoolss.c
+++ b/source/rpcclient/cmd_spoolss.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Gerald Carter 2001
@@ -82,58 +81,6 @@ static NTSTATUS cmd_spoolss_not_implemented(struct cli_state *cli,
return NT_STATUS_OK;
}
-/****************************************************************************
- display sec_ace structure
- ****************************************************************************/
-static void display_sec_ace(SEC_ACE *ace)
-{
- fstring sid_str;
-
- sid_to_string(sid_str, &ace->trustee);
- printf("\t\tSID: %s\n", sid_str);
-
- printf("\t\ttype:[%d], flags:[0x%02x], mask:[0x%08x]\n",
- ace->type, ace->flags, ace->info.mask);
-}
-
-/****************************************************************************
- display sec_acl structure
- ****************************************************************************/
-static void display_sec_acl(SEC_ACL *acl)
-{
- if (acl->size != 0 && acl->num_aces != 0) {
- int i;
-
- printf("\t\tRevision:[%d]\n", acl->revision);
- for (i = 0; i < acl->num_aces; i++) {
- display_sec_ace(&acl->ace[i]);
- }
- }
-}
-
-/****************************************************************************
- display sec_desc structure
- ****************************************************************************/
-static void display_sec_desc(SEC_DESC *sec)
-{
- fstring sid_str;
-
- printf("\tRevision:[%d]\n", sec->revision);
-
- if (sec->off_owner_sid) {
- sid_to_string(sid_str, sec->owner_sid);
- printf("\tOwner SID: %s\n", sid_str);
- }
-
- if (sec->off_grp_sid) {
- sid_to_string(sid_str, sec->grp_sid);
- printf("\tGroup SID: %s\n", sid_str);
- }
-
- if (sec->off_sacl) display_sec_acl(sec->sacl);
- if (sec->off_dacl) display_sec_acl(sec->dacl);
-}
-
/***********************************************************************
* Get printer information
*/
@@ -141,13 +88,14 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR werror;
pstring printername;
fstring servername, user;
POLICY_HND hnd;
-
- if (argc != 2) {
- printf("Usage: %s <printername>\n", argv[0]);
+ uint32 desired_access = MAXIMUM_ALLOWED_ACCESS;
+
+ if (argc != 2 && argc != 3) {
+ printf("Usage: %s <printername> [0xallowed_access]\n", argv[0]);
return NT_STATUS_OK;
}
@@ -159,72 +107,90 @@ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli,
fstrcpy (user, cli->user_name);
fstrcpy (printername, argv[1]);
+ if (argc == 3)
+ desired_access = strtol(argv[2], NULL, 16);
+
/* Open the printer handle */
- result = cli_spoolss_open_printer_ex (cli, mem_ctx, printername, "",
- MAXIMUM_ALLOWED_ACCESS, servername, user, &hnd);
-
- if (NT_STATUS_IS_OK(result)) {
- printf ("Printer %s opened successfully\n", printername);
- result = cli_spoolss_close_printer (cli, mem_ctx, &hnd);
- if (!NT_STATUS_IS_OK(result)) {
- printf ("Error closing printer handle! (%s)\n", get_nt_error_msg(result));
+
+ werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", desired_access,
+ servername, user, &hnd);
+
+ if (W_ERROR_IS_OK(werror)) {
+ printf("Printer %s opened successfully\n", printername);
+ werror = cli_spoolss_close_printer(cli, mem_ctx, &hnd);
+
+ if (!W_ERROR_IS_OK(werror)) {
+ printf("Error closing printer handle! (%s)\n",
+ dos_errstr(werror));
}
+ } else {
+ printf("Failed to open printer %s: %s\n", printername,
+ dos_errstr(werror));
}
- return result;
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/****************************************************************************
printer info level 0 display function
****************************************************************************/
-static void display_print_info_0(PRINTER_INFO_0 *i1)
+static void display_print_info_0(PRINTER_INFO_0 *i0)
{
- fstring name;
- fstring servername;
+ fstring name = "";
+ fstring servername = "";
+
+ if (!i0)
+ return;
- rpcstr_pull(name, i1->printername.buffer, sizeof(name), 0, STR_TERMINATE);
- rpcstr_pull(servername, i1->servername.buffer, sizeof(servername), 0,STR_TERMINATE);
+ if (i0->printername.buffer)
+ rpcstr_pull(name, i0->printername.buffer, sizeof(name), 0, STR_TERMINATE);
+
+ if (i0->servername.buffer)
+ rpcstr_pull(servername, i0->servername.buffer, sizeof(servername), 0,STR_TERMINATE);
printf("\tprintername:[%s]\n", name);
printf("\tservername:[%s]\n", servername);
- printf("\tcjobs:[0x%x]\n", i1->cjobs);
- printf("\ttotal_jobs:[0x%x]\n", i1->total_jobs);
+ printf("\tcjobs:[0x%x]\n", i0->cjobs);
+ printf("\ttotal_jobs:[0x%x]\n", i0->total_jobs);
+
+ printf("\t:date: [%d]-[%d]-[%d] (%d)\n", i0->year, i0->month,
+ i0->day, i0->dayofweek);
+ printf("\t:time: [%d]-[%d]-[%d]-[%d]\n", i0->hour, i0->minute,
+ i0->second, i0->milliseconds);
- printf("\t:date: [%d]-[%d]-[%d] (%d)\n", i1->year, i1->month,
- i1->day, i1->dayofweek);
- printf("\t:time: [%d]-[%d]-[%d]-[%d]\n", i1->hour, i1->minute,
- i1->second, i1->milliseconds);
+ printf("\tglobal_counter:[0x%x]\n", i0->global_counter);
+ printf("\ttotal_pages:[0x%x]\n", i0->total_pages);
- printf("\tglobal_counter:[0x%x]\n", i1->global_counter);
- printf("\ttotal_pages:[0x%x]\n", i1->total_pages);
+ printf("\tmajorversion:[0x%x]\n", i0->major_version);
+ printf("\tbuildversion:[0x%x]\n", i0->build_version);
- printf("\tmajorversion:[0x%x]\n", i1->major_version);
- printf("\tbuildversion:[0x%x]\n", i1->build_version);
+ printf("\tunknown7:[0x%x]\n", i0->unknown7);
+ printf("\tunknown8:[0x%x]\n", i0->unknown8);
+ printf("\tunknown9:[0x%x]\n", i0->unknown9);
+ printf("\tsession_counter:[0x%x]\n", i0->session_counter);
+ printf("\tunknown11:[0x%x]\n", i0->unknown11);
+ printf("\tprinter_errors:[0x%x]\n", i0->printer_errors);
+ printf("\tunknown13:[0x%x]\n", i0->unknown13);
+ printf("\tunknown14:[0x%x]\n", i0->unknown14);
+ printf("\tunknown15:[0x%x]\n", i0->unknown15);
+ printf("\tunknown16:[0x%x]\n", i0->unknown16);
+ printf("\tchange_id:[0x%x]\n", i0->change_id);
+ printf("\tunknown18:[0x%x]\n", i0->unknown18);
+ printf("\tstatus:[0x%x]\n", i0->status);
+ printf("\tunknown20:[0x%x]\n", i0->unknown20);
+ printf("\tc_setprinter:[0x%x]\n", i0->c_setprinter);
+ printf("\tunknown22:[0x%x]\n", i0->unknown22);
+ printf("\tunknown23:[0x%x]\n", i0->unknown23);
+ printf("\tunknown24:[0x%x]\n", i0->unknown24);
+ printf("\tunknown25:[0x%x]\n", i0->unknown25);
+ printf("\tunknown26:[0x%x]\n", i0->unknown26);
+ printf("\tunknown27:[0x%x]\n", i0->unknown27);
+ printf("\tunknown28:[0x%x]\n", i0->unknown28);
+ printf("\tunknown29:[0x%x]\n", i0->unknown29);
- printf("\tunknown7:[0x%x]\n", i1->unknown7);
- printf("\tunknown8:[0x%x]\n", i1->unknown8);
- printf("\tunknown9:[0x%x]\n", i1->unknown9);
- printf("\tsession_counter:[0x%x]\n", i1->session_counter);
- printf("\tunknown11:[0x%x]\n", i1->unknown11);
- printf("\tprinter_errors:[0x%x]\n", i1->printer_errors);
- printf("\tunknown13:[0x%x]\n", i1->unknown13);
- printf("\tunknown14:[0x%x]\n", i1->unknown14);
- printf("\tunknown15:[0x%x]\n", i1->unknown15);
- printf("\tunknown16:[0x%x]\n", i1->unknown16);
- printf("\tchange_id:[0x%x]\n", i1->change_id);
- printf("\tunknown18:[0x%x]\n", i1->unknown18);
- printf("\tstatus:[0x%x]\n", i1->status);
- printf("\tunknown20:[0x%x]\n", i1->unknown20);
- printf("\tc_setprinter:[0x%x]\n", i1->c_setprinter);
- printf("\tunknown22:[0x%x]\n", i1->unknown22);
- printf("\tunknown23:[0x%x]\n", i1->unknown23);
- printf("\tunknown24:[0x%x]\n", i1->unknown24);
- printf("\tunknown25:[0x%x]\n", i1->unknown25);
- printf("\tunknown26:[0x%x]\n", i1->unknown26);
- printf("\tunknown27:[0x%x]\n", i1->unknown27);
- printf("\tunknown28:[0x%x]\n", i1->unknown28);
- printf("\tunknown29:[0x%x]\n", i1->unknown29);
+ printf("\n");
}
/****************************************************************************
@@ -232,18 +198,28 @@ printer info level 1 display function
****************************************************************************/
static void display_print_info_1(PRINTER_INFO_1 *i1)
{
- fstring desc;
- fstring name;
- fstring comm;
+ fstring desc = "";
+ fstring name = "";
+ fstring comm = "";
- rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0, STR_TERMINATE);
- rpcstr_pull(name, i1->name.buffer, sizeof(name), 0, STR_TERMINATE);
- rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0, STR_TERMINATE);
+ if (i1->description.buffer)
+ rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0,
+ STR_TERMINATE);
+
+ if (i1->name.buffer)
+ rpcstr_pull(name, i1->name.buffer, sizeof(name), 0,
+ STR_TERMINATE);
+
+ if (i1->comment.buffer)
+ rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0,
+ STR_TERMINATE);
printf("\tflags:[0x%x]\n", i1->flags);
printf("\tname:[%s]\n", name);
printf("\tdescription:[%s]\n", desc);
- printf("\tcomment:[%s]\n\n", comm);
+ printf("\tcomment:[%s]\n", comm);
+
+ printf("\n");
}
/****************************************************************************
@@ -251,29 +227,50 @@ printer info level 2 display function
****************************************************************************/
static void display_print_info_2(PRINTER_INFO_2 *i2)
{
- fstring servername;
- fstring printername;
- fstring sharename;
- fstring portname;
- fstring drivername;
- fstring comment;
- fstring location;
- fstring sepfile;
- fstring printprocessor;
- fstring datatype;
- fstring parameters;
+ fstring servername = "";
+ fstring printername = "";
+ fstring sharename = "";
+ fstring portname = "";
+ fstring drivername = "";
+ fstring comment = "";
+ fstring location = "";
+ fstring sepfile = "";
+ fstring printprocessor = "";
+ fstring datatype = "";
+ fstring parameters = "";
- rpcstr_pull(servername, i2->servername.buffer,sizeof(servername), 0, STR_TERMINATE);
- rpcstr_pull(printername, i2->printername.buffer,sizeof(printername), 0, STR_TERMINATE);
- rpcstr_pull(sharename, i2->sharename.buffer,sizeof(sharename), 0, STR_TERMINATE);
- rpcstr_pull(portname, i2->portname.buffer,sizeof(portname), 0, STR_TERMINATE);
- rpcstr_pull(drivername, i2->drivername.buffer,sizeof(drivername), 0, STR_TERMINATE);
- rpcstr_pull(comment, i2->comment.buffer,sizeof(comment), 0, STR_TERMINATE);
- rpcstr_pull(location, i2->location.buffer,sizeof(location), 0, STR_TERMINATE);
- rpcstr_pull(sepfile, i2->sepfile.buffer,sizeof(sepfile), 0, STR_TERMINATE);
- rpcstr_pull(printprocessor, i2->printprocessor.buffer,sizeof(printprocessor), 0, STR_TERMINATE);
- rpcstr_pull(datatype, i2->datatype.buffer,sizeof(datatype), 0, STR_TERMINATE);
- rpcstr_pull(parameters, i2->parameters.buffer,sizeof(parameters), 0, STR_TERMINATE);
+ if (i2->servername.buffer)
+ rpcstr_pull(servername, i2->servername.buffer,sizeof(servername), 0, STR_TERMINATE);
+
+ if (i2->printername.buffer)
+ rpcstr_pull(printername, i2->printername.buffer,sizeof(printername), 0, STR_TERMINATE);
+
+ if (i2->sharename.buffer)
+ rpcstr_pull(sharename, i2->sharename.buffer,sizeof(sharename), 0, STR_TERMINATE);
+
+ if (i2->portname.buffer)
+ rpcstr_pull(portname, i2->portname.buffer,sizeof(portname), 0, STR_TERMINATE);
+
+ if (i2->drivername.buffer)
+ rpcstr_pull(drivername, i2->drivername.buffer,sizeof(drivername), 0, STR_TERMINATE);
+
+ if (i2->comment.buffer)
+ rpcstr_pull(comment, i2->comment.buffer,sizeof(comment), 0, STR_TERMINATE);
+
+ if (i2->location.buffer)
+ rpcstr_pull(location, i2->location.buffer,sizeof(location), 0, STR_TERMINATE);
+
+ if (i2->sepfile.buffer)
+ rpcstr_pull(sepfile, i2->sepfile.buffer,sizeof(sepfile), 0, STR_TERMINATE);
+
+ if (i2->printprocessor.buffer)
+ rpcstr_pull(printprocessor, i2->printprocessor.buffer,sizeof(printprocessor), 0, STR_TERMINATE);
+
+ if (i2->datatype.buffer)
+ rpcstr_pull(datatype, i2->datatype.buffer,sizeof(datatype), 0, STR_TERMINATE);
+
+ if (i2->parameters.buffer)
+ rpcstr_pull(parameters, i2->parameters.buffer,sizeof(parameters), 0, STR_TERMINATE);
printf("\tservername:[%s]\n", servername);
printf("\tprintername:[%s]\n", printername);
@@ -295,7 +292,10 @@ static void display_print_info_2(PRINTER_INFO_2 *i2)
printf("\tcjobs:[0x%x]\n", i2->cjobs);
printf("\taverageppm:[0x%x]\n", i2->averageppm);
- if (i2->secdesc) display_sec_desc(i2->secdesc);
+ if (i2->secdesc)
+ display_sec_desc(i2->secdesc);
+
+ printf("\n");
}
/****************************************************************************
@@ -306,6 +306,8 @@ static void display_print_info_3(PRINTER_INFO_3 *i3)
printf("\tflags:[0x%x]\n", i3->flags);
display_sec_desc(i3->secdesc);
+
+ printf("\n");
}
/* Enumerate printers */
@@ -314,11 +316,10 @@ static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR result;
uint32 info_level = 1;
PRINTER_INFO_CTR ctr;
- int returned;
- uint32 i = 0;
+ uint32 i = 0, num_printers, needed;
if (argc > 2)
{
@@ -332,43 +333,48 @@ static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli,
/* Enumerate printers -- Should we enumerate types other
than PRINTER_ENUM_LOCAL? Maybe accept as a parameter? --jerry */
+
ZERO_STRUCT(ctr);
- result = cli_spoolss_enum_printers(cli, mem_ctx, PRINTER_ENUM_LOCAL,
- info_level, &returned, &ctr);
- if (NT_STATUS_IS_OK(result))
- {
- if (!returned)
- printf ("No Printers returned.\n");
+ result = cli_spoolss_enum_printers(
+ cli, mem_ctx, 0, &needed, PRINTER_ENUM_LOCAL,
+ info_level, &num_printers, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_enum_printers(
+ cli, mem_ctx, needed, NULL, PRINTER_ENUM_LOCAL,
+ info_level, &num_printers, &ctr);
+
+ if (W_ERROR_IS_OK(result)) {
+
+ if (!num_printers) {
+ printf ("No printers returned.\n");
+ goto done;
+ }
+ for (i = 0; i < num_printers; i++) {
switch(info_level) {
case 0:
- for (i=0; i<returned; i++) {
- display_print_info_0(&(ctr.printers_0[i]));
- }
+ display_print_info_0(&ctr.printers_0[i]);
break;
case 1:
- for (i=0; i<returned; i++) {
- display_print_info_1(&(ctr.printers_1[i]));
- }
+ display_print_info_1(&ctr.printers_1[i]);
break;
case 2:
- for (i=0; i<returned; i++) {
- display_print_info_2(&(ctr.printers_2[i]));
- }
+ display_print_info_2(&ctr.printers_2[i]);
break;
case 3:
- for (i=0; i<returned; i++) {
- display_print_info_3(&(ctr.printers_3[i]));
- }
+ display_print_info_3(&ctr.printers_3[i]);
break;
default:
printf("unknown info level %d\n", info_level);
- break;
+ goto done;
+ }
}
}
+ done:
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/****************************************************************************
@@ -405,11 +411,11 @@ static void display_port_info_2(PORT_INFO_2 *i2)
/* Enumerate ports */
static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
- int argc, char **argv)
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 info_level = 1;
+ WERROR result;
+ uint32 needed, info_level = 1;
PORT_INFO_CTR ctr;
int returned;
@@ -418,16 +424,21 @@ static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli,
return NT_STATUS_OK;
}
- if (argc == 2) {
+ if (argc == 2)
info_level = atoi(argv[1]);
- }
/* Enumerate ports */
+
ZERO_STRUCT(ctr);
- result = cli_spoolss_enum_ports(cli, mem_ctx, info_level, &returned, &ctr);
+ result = cli_spoolss_enum_ports(cli, mem_ctx, 0, &needed, info_level,
+ &returned, &ctr);
- if (NT_STATUS_IS_OK(result)) {
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_enum_ports(cli, mem_ctx, needed, NULL,
+ info_level, &returned, &ctr);
+
+ if (W_ERROR_IS_OK(result)) {
int i;
for (i = 0; i < returned; i++) {
@@ -445,7 +456,7 @@ static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli,
}
}
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/***********************************************************************
@@ -456,7 +467,8 @@ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli,
int argc, char **argv)
{
POLICY_HND pol;
- NTSTATUS result;
+ WERROR result;
+ uint32 needed;
uint32 info_level = 2;
BOOL opened_hnd = False;
PRINTER_INFO_CTR ctr;
@@ -482,20 +494,24 @@ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli,
fstrcpy (user, cli->user_name);
/* get a printer handle */
- result = cli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, servername,
+ result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ MAXIMUM_ALLOWED_ACCESS, servername,
user, &pol);
- if (!NT_STATUS_IS_OK(result)) {
+
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
opened_hnd = True;
/* Get printer info */
- result = cli_spoolss_getprinter(cli, mem_ctx, &pol, info_level, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
+ result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, &pol, info_level, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, info_level, &ctr);
+
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
+
/* Modify the comment. */
init_unistr(&ctr.printers_2->comment, comment);
@@ -503,14 +519,14 @@ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli,
ctr.printers_2->secdesc = NULL;
result = cli_spoolss_setprinter(cli, mem_ctx, &pol, info_level, &ctr, 0);
- if (NT_STATUS_IS_OK(result))
+ if (W_ERROR_IS_OK(result))
printf("Success in setting comment.\n");
done:
if (opened_hnd)
cli_spoolss_close_printer(cli, mem_ctx, &pol);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/***********************************************************************
@@ -521,17 +537,17 @@ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli,
int argc, char **argv)
{
POLICY_HND pol;
- NTSTATUS result;
+ WERROR result;
uint32 info_level = 1;
BOOL opened_hnd = False;
PRINTER_INFO_CTR ctr;
fstring printername,
servername,
user;
+ uint32 needed;
if (argc == 1 || argc > 3) {
printf("Usage: %s <printername> [level]\n", argv[0]);
-
return NT_STATUS_OK;
}
@@ -542,24 +558,31 @@ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli,
slprintf (servername, sizeof(fstring)-1, "\\\\%s", cli->desthost);
strupper (servername);
- fstrcpy (printername, argv[1]);
+ slprintf (printername, sizeof(fstring)-1, "%s\\%s", servername, argv[1]);
fstrcpy (user, cli->user_name);
/* get a printer handle */
- result = cli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, servername,
- user, &pol);
- if (!NT_STATUS_IS_OK(result)) {
+
+ result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", MAXIMUM_ALLOWED_ACCESS,
+ servername, user, &pol);
+
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
opened_hnd = True;
/* Get printer info */
- result = cli_spoolss_getprinter(cli, mem_ctx, &pol, info_level, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
+
+ result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed,
+ &pol, info_level, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprinter(
+ cli, mem_ctx, needed, NULL, &pol, info_level, &ctr);
+
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
/* Display printer info */
@@ -585,7 +608,7 @@ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli,
if (opened_hnd)
cli_spoolss_close_printer(cli, mem_ctx, &pol);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/****************************************************************************
@@ -706,6 +729,7 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli,
int argc, char **argv)
{
POLICY_HND pol;
+ WERROR werror;
NTSTATUS result;
uint32 info_level = 3;
BOOL opened_hnd = False;
@@ -730,29 +754,40 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli,
info_level = atoi(argv[2]);
/* Open a printer handle */
- result=cli_spoolss_open_printer_ex (cli, mem_ctx, printername, "",
- MAXIMUM_ALLOWED_ACCESS, servername, user, &pol);
+
+ werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ PRINTER_ACCESS_USE,
+ servername, user, &pol);
+
+ result = W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+
if (!NT_STATUS_IS_OK(result)) {
- printf ("Error opening printer handle for %s!\n", printername);
+ printf("Error opening printer handle for %s!\n", printername);
return result;
}
opened_hnd = True;
/* loop through and print driver info level for each architecture */
- for (i=0; archi_table[i].long_archi!=NULL; i++)
- {
- result = cli_spoolss_getprinterdriver(cli, mem_ctx, &pol, info_level,
+
+ for (i=0; archi_table[i].long_archi!=NULL; i++) {
+ uint32 needed;
+
+ werror = cli_spoolss_getprinterdriver(
+ cli, mem_ctx, 0, &needed, &pol, info_level,
+ archi_table[i].long_archi, &ctr);
+
+ if (W_ERROR_V(werror) == ERRinsufficientbuffer)
+ werror = cli_spoolss_getprinterdriver(
+ cli, mem_ctx, needed, NULL, &pol, info_level,
archi_table[i].long_archi, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
- continue;
- }
+ if (!W_ERROR_IS_OK(werror))
+ continue;
printf ("\n[%s]\n", archi_table[i].long_archi);
- switch (info_level)
- {
+ switch (info_level) {
case 1:
display_print_driver_1 (ctr.info1);
break;
@@ -768,12 +803,12 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli,
}
}
- /* cleanup */
+ /* Cleanup */
+
if (opened_hnd)
cli_spoolss_close_printer (cli, mem_ctx, &pol);
- return result;
-
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/***********************************************************************
@@ -783,10 +818,9 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result = NT_STATUS_OK;
+ WERROR werror;
uint32 info_level = 1;
PRINTER_DRIVER_CTR ctr;
- fstring servername;
uint32 i, j,
returned;
@@ -796,9 +830,6 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli,
return NT_STATUS_OK;
}
- /* get the arguments need to open the printer handle */
- slprintf (servername, sizeof(fstring)-1, "\\\\%s", cli->desthost);
- strupper (servername);
if (argc == 2)
info_level = atoi(argv[1]);
@@ -806,18 +837,23 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli,
/* loop through and print driver info level for each architecture */
for (i=0; archi_table[i].long_archi!=NULL; i++)
{
- returned = 0;
- result = cli_spoolss_enumprinterdrivers (cli, mem_ctx, info_level,
+ uint32 needed;
+
+ werror = cli_spoolss_enumprinterdrivers(
+ cli, mem_ctx, 0, &needed, info_level,
+ archi_table[i].long_archi, &returned, &ctr);
+
+ if (W_ERROR_V(werror) == ERRinsufficientbuffer)
+ werror = cli_spoolss_enumprinterdrivers(
+ cli, mem_ctx, needed, NULL, info_level,
archi_table[i].long_archi, &returned, &ctr);
if (returned == 0)
continue;
-
- if (!NT_STATUS_IS_OK(result))
- {
- printf ("Error getting driver for environment [%s] - %s\n",
- archi_table[i].long_archi, get_nt_error_msg(result));
+ if (!W_ERROR_IS_OK(werror)) {
+ printf ("Error getting driver for environment [%s] - %d\n",
+ archi_table[i].long_archi, W_ERROR_V(werror));
continue;
}
@@ -846,7 +882,7 @@ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli,
}
}
- return result;
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/****************************************************************************
@@ -870,32 +906,36 @@ static NTSTATUS cmd_spoolss_getdriverdir(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result;
+ WERROR result;
fstring env;
DRIVER_DIRECTORY_CTR ctr;
+ uint32 needed;
- if (argc > 2)
- {
+ if (argc > 2) {
printf("Usage: %s [environment]\n", argv[0]);
return NT_STATUS_OK;
}
- /* get the arguments need to open the printer handle */
+ /* Get the arguments need to open the printer handle */
+
if (argc == 2)
fstrcpy (env, argv[1]);
else
fstrcpy (env, "Windows NT x86");
/* Get the directory. Only use Info level 1 */
- result = cli_spoolss_getprinterdriverdir (cli, mem_ctx, 1, env, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
- return result;
- }
+ result = cli_spoolss_getprinterdriverdir(
+ cli, mem_ctx, 0, &needed, 1, env, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprinterdriverdir(
+ cli, mem_ctx, needed, NULL, 1, env, &ctr);
- display_printdriverdir_1 (ctr.info1);
+ if (W_ERROR_IS_OK(result))
+ display_printdriverdir_1(ctr.info1);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/*******************************************************************************
@@ -1010,7 +1050,7 @@ static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result;
+ WERROR result;
uint32 level = 3;
PRINTER_DRIVER_CTR ctr;
DRIVER_INFO_3 info3;
@@ -1047,14 +1087,15 @@ static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli,
ctr.info3 = &info3;
result = cli_spoolss_addprinterdriver (cli, mem_ctx, level, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
- return result;
- }
- rpcstr_pull(driver_name, info3.name.buffer, sizeof(driver_name), 0, STR_TERMINATE);
- printf ("Printer Driver %s successfully installed.\n", driver_name);
+ if (W_ERROR_IS_OK(result)) {
+ rpcstr_pull(driver_name, info3.name.buffer,
+ sizeof(driver_name), 0, STR_TERMINATE);
+ printf ("Printer Driver %s successfully installed.\n",
+ driver_name);
+ }
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
@@ -1062,7 +1103,7 @@ static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result;
+ WERROR result;
uint32 level = 2;
PRINTER_INFO_CTR ctr;
PRINTER_INFO_2 info2;
@@ -1108,21 +1149,18 @@ static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli,
ctr.printers_2 = &info2;
result = cli_spoolss_addprinterex (cli, mem_ctx, level, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
- return result;
- }
+ if (W_ERROR_IS_OK(result))
printf ("Printer %s successfully installed.\n", argv[1]);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
-static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli,
- TALLOC_CTX *mem_ctx,
+static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
POLICY_HND pol;
- NTSTATUS result;
+ WERROR result;
uint32 level = 2;
BOOL opened_hnd = False;
PRINTER_INFO_CTR ctr;
@@ -1130,6 +1168,7 @@ static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli,
fstring servername,
printername,
user;
+ uint32 needed;
/* parse the command arguements */
if (argc != 3)
@@ -1143,40 +1182,52 @@ static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli,
slprintf (printername, sizeof(fstring)-1, "%s\\%s", servername, argv[1]);
fstrcpy (user, cli->user_name);
- /* get a printer handle */
+ /* Get a printer handle */
+
result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
- MAXIMUM_ALLOWED_ACCESS, servername, user, &pol);
- if (!NT_STATUS_IS_OK(result)) {
+ PRINTER_ALL_ACCESS,
+ servername, user, &pol);
+
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
opened_hnd = True;
/* Get printer info */
+
ZERO_STRUCT (info2);
ctr.printers_2 = &info2;
- result = cli_spoolss_getprinter(cli, mem_ctx, &pol, level, &ctr);
- if (!NT_STATUS_IS_OK(result)) {
+
+ result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, &pol, level, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, level, &ctr);
+
+ if (!W_ERROR_IS_OK(result)) {
printf ("Unable to retrieve printer information!\n");
goto done;
}
- /* set the printer driver */
+ /* Set the printer driver */
+
init_unistr(&ctr.printers_2->drivername, argv[2]);
+
result = cli_spoolss_setprinter(cli, mem_ctx, &pol, level, &ctr, 0);
- if (!NT_STATUS_IS_OK(result)) {
- printf ("SetPrinter call failed!\n");
+
+ if (!W_ERROR_IS_OK(result)) {
+ printf("SetPrinter call failed!\n");
goto done;;
}
- printf ("Succesfully set %s to driver %s.\n", argv[1], argv[2]);
+ printf("Succesfully set %s to driver %s.\n", argv[1], argv[2]);
done:
- /* cleanup */
+ /* Cleanup */
+
if (opened_hnd)
cli_spoolss_close_printer(cli, mem_ctx, &pol);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
@@ -1184,7 +1235,7 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR result;
fstring servername;
int i;
@@ -1202,30 +1253,33 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli,
for (i=0; archi_table[i].long_archi; i++)
{
/* make the call to remove the driver */
- result = cli_spoolss_deleteprinterdriver(cli, mem_ctx,
- archi_table[i].long_archi, argv[1]);
- if (!NT_STATUS_IS_OK(result)) {
- printf ("Failed to remove driver %s for arch [%s] - error %s!\n",
- argv[1], archi_table[i].long_archi, get_nt_error_msg(result));
- }
- else
- printf ("Driver %s removed for arch [%s].\n", argv[1], archi_table[i].long_archi);
+ result = cli_spoolss_deleteprinterdriver(
+ cli, mem_ctx, archi_table[i].long_archi, argv[1]);
+
+ if (!W_ERROR_IS_OK(result)) {
+ printf ("Failed to remove driver %s for arch [%s] - error 0x%x!\n",
+ argv[1], archi_table[i].long_archi,
+ W_ERROR_V(result));
+ } else
+ printf ("Driver %s removed for arch [%s].\n", argv[1],
+ archi_table[i].long_archi);
}
- return NT_STATUS_OK;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR result;
char *servername = NULL, *environment = NULL;
fstring procdir;
+ uint32 needed;
/* parse the command arguements */
- if (argc < 2 || argc > 3) {
- printf ("Usage: %s <server> [environment]\n", argv[0]);
+ if (argc > 2) {
+ printf ("Usage: %s [environment]\n", argv[0]);
return NT_STATUS_OK;
}
@@ -1233,29 +1287,332 @@ static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli,
return NT_STATUS_NO_MEMORY;
strupper(servername);
- if (asprintf(&environment, "%s", (argc == 3) ? argv[2] :
+ if (asprintf(&environment, "%s", (argc == 2) ? argv[1] :
PRINTER_DRIVER_ARCHITECTURE) < 0) {
SAFE_FREE(servername);
return NT_STATUS_NO_MEMORY;
}
result = cli_spoolss_getprintprocessordirectory(
- cli, mem_ctx, servername, environment, procdir);
+ cli, mem_ctx, 0, &needed, servername, environment, procdir);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprintprocessordirectory(
+ cli, mem_ctx, needed, NULL, servername, environment,
+ procdir);
- if (NT_STATUS_IS_OK(result))
- printf("%s", procdir);
+ if (W_ERROR_IS_OK(result))
+ printf("%s\n", procdir);
SAFE_FREE(servername);
SAFE_FREE(environment);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+}
+
+/* Add a form */
+
+static NTSTATUS cmd_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ POLICY_HND handle;
+ WERROR werror;
+ char *servername = NULL, *printername = NULL;
+ FORM form;
+ BOOL got_handle = False;
+
+ /* Parse the command arguements */
+
+ if (argc != 3) {
+ printf ("Usage: %s <printer> <formname>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ /* Get a printer handle */
+
+ asprintf(&servername, "\\\\%s", cli->desthost);
+ strupper(servername);
+ asprintf(&printername, "%s\\%s", servername, argv[1]);
+
+ werror = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ MAXIMUM_ALLOWED_ACCESS,
+ servername, cli->user_name, &handle);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ got_handle = True;
+
+ /* Dummy up some values for the form data */
+
+ form.flags = FORM_USER;
+ form.size_x = form.size_y = 100;
+ form.left = 0;
+ form.top = 10;
+ form.right = 20;
+ form.bottom = 30;
+
+ init_unistr2(&form.name, argv[2], strlen(argv[2]) + 1);
+
+ /* Add the form */
+
+
+ werror = cli_spoolss_addform(cli, mem_ctx, &handle, 1, &form);
+
+ done:
+ if (got_handle)
+ cli_spoolss_close_printer(cli, mem_ctx, &handle);
+
+ SAFE_FREE(servername);
+ SAFE_FREE(printername);
+
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+}
+
+/* Set a form */
+
+static NTSTATUS cmd_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ POLICY_HND handle;
+ WERROR werror;
+ char *servername = NULL, *printername = NULL;
+ FORM form;
+ BOOL got_handle = False;
+
+ /* Parse the command arguements */
+
+ if (argc != 3) {
+ printf ("Usage: %s <printer> <formname>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ /* Get a printer handle */
+
+ asprintf(&servername, "\\\\%s", cli->desthost);
+ strupper(servername);
+ asprintf(&printername, "%s\\%s", servername, argv[1]);
+
+ werror = cli_spoolss_open_printer_ex(
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ servername, cli->user_name, &handle);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ got_handle = True;
+
+ /* Dummy up some values for the form data */
+
+ form.flags = FORM_PRINTER;
+ form.size_x = form.size_y = 100;
+ form.left = 0;
+ form.top = 1000;
+ form.right = 2000;
+ form.bottom = 3000;
+
+ init_unistr2(&form.name, argv[2], strlen(argv[2]) + 1);
+
+ /* Set the form */
+
+ werror = cli_spoolss_setform(cli, mem_ctx, &handle, 1, argv[2], &form);
+
+ done:
+ if (got_handle)
+ cli_spoolss_close_printer(cli, mem_ctx, &handle);
+
+ SAFE_FREE(servername);
+ SAFE_FREE(printername);
+
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+}
+
+/* Get a form */
+
+static NTSTATUS cmd_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ POLICY_HND handle;
+ WERROR werror;
+ char *servername = NULL, *printername = NULL;
+ FORM_1 form;
+ BOOL got_handle = False;
+ uint32 needed;
+
+ /* Parse the command arguements */
+
+ if (argc != 3) {
+ printf ("Usage: %s <printer> <formname>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ /* Get a printer handle */
+
+ asprintf(&servername, "\\\\%s", cli->desthost);
+ strupper(servername);
+ asprintf(&printername, "%s\\%s", servername, argv[1]);
+
+ werror = cli_spoolss_open_printer_ex(
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ servername, cli->user_name, &handle);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ got_handle = True;
+
+ /* Set the form */
+
+ werror = cli_spoolss_getform(cli, mem_ctx, 0, &needed,
+ &handle, argv[2], 1, &form);
+
+ if (W_ERROR_V(werror) == ERRinsufficientbuffer)
+ werror = cli_spoolss_getform(cli, mem_ctx, needed, NULL,
+ &handle, argv[2], 1, &form);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ printf("width: %d\n", form.width);
+ printf("length: %d\n", form.length);
+ printf("left: %d\n", form.left);
+ printf("top: %d\n", form.top);
+ printf("right: %d\n", form.right);
+ printf("bottom: %d\n", form.bottom);
+
+ done:
+ if (got_handle)
+ cli_spoolss_close_printer(cli, mem_ctx, &handle);
+
+ SAFE_FREE(servername);
+ SAFE_FREE(printername);
+
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+}
+
+/* Delete a form */
+
+static NTSTATUS cmd_spoolss_deleteform(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND handle;
+ WERROR werror;
+ char *servername = NULL, *printername = NULL;
+ BOOL got_handle = False;
+
+ /* Parse the command arguements */
+
+ if (argc != 3) {
+ printf ("Usage: %s <printer> <formname>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ /* Get a printer handle */
+
+ asprintf(&servername, "\\\\%s", cli->desthost);
+ strupper(servername);
+ asprintf(&printername, "%s\\%s", servername, argv[1]);
+
+ werror = cli_spoolss_open_printer_ex(
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ servername, cli->user_name, &handle);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ got_handle = True;
+
+ /* Delete the form */
+
+ werror = cli_spoolss_deleteform(cli, mem_ctx, &handle, argv[2]);
+
+ done:
+ if (got_handle)
+ cli_spoolss_close_printer(cli, mem_ctx, &handle);
+
+ SAFE_FREE(servername);
+ SAFE_FREE(printername);
+
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+}
+
+/* Enumerate forms */
+
+static NTSTATUS cmd_spoolss_enum_forms(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx, int argc,
+ char **argv)
+{
+ POLICY_HND handle;
+ WERROR werror;
+ char *servername = NULL, *printername = NULL;
+ BOOL got_handle = False;
+ uint32 needed, num_forms, level = 1, i;
+ FORM_1 *forms;
+
+ /* Parse the command arguements */
+
+ if (argc != 2) {
+ printf ("Usage: %s <printer>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ /* Get a printer handle */
+
+ asprintf(&servername, "\\\\%s", cli->desthost);
+ strupper(servername);
+ asprintf(&printername, "%s\\%s", servername, argv[1]);
+
+ werror = cli_spoolss_open_printer_ex(
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ servername, cli->user_name, &handle);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ got_handle = True;
+
+ /* Enumerate forms */
+
+ werror = cli_spoolss_enumforms(
+ cli, mem_ctx, 0, &needed, &handle, level, &num_forms, &forms);
+
+ if (W_ERROR_V(werror) == ERRinsufficientbuffer)
+ werror = cli_spoolss_enumforms(
+ cli, mem_ctx, needed, NULL, &handle, level,
+ &num_forms, &forms);
+
+ if (!W_ERROR_IS_OK(werror))
+ goto done;
+
+ /* Display output */
+
+ for (i = 0; i < num_forms; i++) {
+ fstring form_name;
+
+ if (forms[i].name.buffer)
+ rpcstr_pull(form_name, forms[i].name.buffer,
+ sizeof(form_name), 0, STR_TERMINATE);
+
+ printf("%s\n", form_name);
+ }
+
+ done:
+ if (got_handle)
+ cli_spoolss_close_printer(cli, mem_ctx, &handle);
+
+ SAFE_FREE(servername);
+ SAFE_FREE(printername);
+
+ return W_ERROR_IS_OK(werror) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
static NTSTATUS cmd_spoolss_setprinterdata(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, char **argv)
{
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ WERROR result;
+ uint32 needed;
fstring servername, printername, user;
POLICY_HND pol;
BOOL opened_hnd = False;
@@ -1275,46 +1632,52 @@ static NTSTATUS cmd_spoolss_setprinterdata(struct cli_state *cli,
/* get a printer handle */
result = cli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
- MAXIMUM_ALLOWED_ACCESS, servername, user, &pol);
- if (!NT_STATUS_IS_OK(result)) {
+ MAXIMUM_ALLOWED_ACCESS, servername,
+ user, &pol);
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
opened_hnd = True;
- printf("%s\n", timestring(True));
+ result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed,
+ &pol, 0, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, 0, &ctr);
- result = cli_spoolss_getprinter(cli, mem_ctx, &pol, 0, &ctr);
- info = ctr.printers_0;
- if (!NT_STATUS_IS_OK(result)) {
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
+
+ printf("%s\n", timestring(True));
printf("\tchange_id (before set)\t:[0x%x]\n", info->change_id);
- /* Get printer info */
+ /* Set the printer data */
+
result = cli_spoolss_setprinterdata(cli, mem_ctx, &pol, argv[2], argv[3]);
- if (!NT_STATUS_IS_OK(result)) {
+ if (!W_ERROR_IS_OK(result)) {
printf ("Unable to set [%s=%s]!\n", argv[2], argv[3]);
goto done;
}
printf("\tSetPrinterData succeeded [%s: %s]\n", argv[2], argv[3]);
- result = cli_spoolss_getprinter(cli, mem_ctx, &pol, 0, &ctr);
- info = ctr.printers_0;
- if (!NT_STATUS_IS_OK(result)) {
+ result = cli_spoolss_getprinter(cli, mem_ctx, 0, &needed, &pol, 0, &ctr);
+
+ if (W_ERROR_V(result) == ERRinsufficientbuffer)
+ result = cli_spoolss_getprinter(cli, mem_ctx, needed, NULL, &pol, 0, &ctr);
+
+ if (!W_ERROR_IS_OK(result))
goto done;
- }
- printf("\tchange_id (after set)\t:[0x%x]\n", info->change_id);
+
printf("%s\n", timestring(True));
-
+ printf("\tchange_id (after set)\t:[0x%x]\n", info->change_id);
done:
/* cleanup */
if (opened_hnd)
cli_spoolss_close_printer(cli, mem_ctx, &pol);
- return result;
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
/* List of commands exported by this module */
@@ -1337,6 +1700,12 @@ struct cmd_set spoolss_commands[] = {
{ "getprintprocdir", cmd_spoolss_getprintprocdir, PIPE_SPOOLSS, "Get print processor directory", "" },
{ "openprinter", cmd_spoolss_open_printer_ex, PIPE_SPOOLSS, "Open printer handle", "" },
{ "setdriver", cmd_spoolss_setdriver, PIPE_SPOOLSS, "Set printer driver", "" },
+ { "getprintprocdir", cmd_spoolss_getprintprocdir, PIPE_SPOOLSS, "Get print processor directory", "" },
+ { "addform", cmd_spoolss_addform, PIPE_SPOOLSS, "Add form", "" },
+ { "setform", cmd_spoolss_setform, PIPE_SPOOLSS, "Set form", "" },
+ { "getform", cmd_spoolss_getform, PIPE_SPOOLSS, "Get form", "" },
+ { "deleteform", cmd_spoolss_deleteform, PIPE_SPOOLSS, "Delete form", "" },
+ { "enumforms", cmd_spoolss_enum_forms, PIPE_SPOOLSS, "Enumerate forms", "" },
{ "setprinter", cmd_spoolss_setprinter, PIPE_SPOOLSS, "Set printer comment", "" },
{ "setprinterdata", cmd_spoolss_setprinterdata, PIPE_SPOOLSS, "Set REG_SZ printer data", "" },
diff --git a/source/rpcclient/cmd_srvsvc.c b/source/rpcclient/cmd_srvsvc.c
index f4ff11adf13..6fbd152dfb5 100644
--- a/source/rpcclient/cmd_srvsvc.c
+++ b/source/rpcclient/cmd_srvsvc.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 2.2
+ Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Andrew Tridgell 1992-1999
diff --git a/source/rpcclient/cmd_wkssvc.c b/source/rpcclient/cmd_wkssvc.c
index 52c110dbd56..79acf35943c 100644
--- a/source/rpcclient/cmd_wkssvc.c
+++ b/source/rpcclient/cmd_wkssvc.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
NT Domain Authentication SMB / MSRPC client
Copyright (C) Andrew Tridgell 1994-1997
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
diff --git a/source/rpcclient/display_sec.c b/source/rpcclient/display_sec.c
index a428a956863..5c23bf42ffa 100644
--- a/source/rpcclient/display_sec.c
+++ b/source/rpcclient/display_sec.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
Samba utility functions
Copyright (C) Andrew Tridgell 1992-1999
Copyright (C) Luke Kenneth Casson Leighton 1996 - 1999
@@ -27,63 +26,36 @@
/****************************************************************************
convert a security permissions into a string
****************************************************************************/
-static const char *get_sec_mask_str(uint32 type)
+char *get_sec_mask_str(uint32 type)
{
- static fstring typestr;
- int i;
-
- switch (type)
- {
- case SEC_RIGHTS_FULL_CONTROL:
- {
- fstrcpy(typestr, "Full Control");
- return typestr;
- }
-
- case SEC_RIGHTS_READ:
- {
- fstrcpy(typestr, "Read");
- return typestr;
- }
- default:
- {
- break;
- }
- }
+ static fstring typestr="";
typestr[0] = 0;
- for (i = 0; i < 32; i++)
- {
- if (type & (1 << i))
- {
- switch (1 << i)
- {
- case SEC_RIGHTS_QUERY_VALUE : fstrcat(typestr, "Query " ); break;
- case SEC_RIGHTS_SET_VALUE : fstrcat(typestr, "Set " ); break;
- case SEC_RIGHTS_CREATE_SUBKEY : fstrcat(typestr, "Create "); break;
- case SEC_RIGHTS_ENUM_SUBKEYS : fstrcat(typestr, "Enum "); break;
- case SEC_RIGHTS_NOTIFY : fstrcat(typestr, "Notify "); break;
- case SEC_RIGHTS_CREATE_LINK : fstrcat(typestr, "CreateLink "); break;
- case DELETE_ACCESS : fstrcat(typestr, "Delete "); break;
- case READ_CONTROL_ACCESS : fstrcat(typestr, "ReadControl "); break;
- case WRITE_DAC_ACCESS : fstrcat(typestr, "WriteDAC "); break;
- case WRITE_OWNER_ACCESS : fstrcat(typestr, "WriteOwner "); break;
- }
- type &= ~(1 << i);
- }
- }
-
- /* remaining bits get added on as-is */
- if (type != 0)
- {
- fstring tmp;
- slprintf(tmp, sizeof(tmp)-1, "[%08x]", type);
- fstrcat(typestr, tmp);
- }
- /* remove last space */
- i = strlen(typestr)-1;
- if (typestr[i] == ' ') typestr[i] = 0;
+ if (type & GENERIC_ALL_ACCESS)
+ fstrcat(typestr, "Generic all access ");
+ if (type & GENERIC_EXECUTE_ACCESS)
+ fstrcat(typestr, "Generic execute access ");
+ if (type & GENERIC_WRITE_ACCESS)
+ fstrcat(typestr, "Generic write access ");
+ if (type & GENERIC_READ_ACCESS)
+ fstrcat(typestr, "Generic read access ");
+ if (type & MAXIMUM_ALLOWED_ACCESS)
+ fstrcat(typestr, "MAXIMUM_ALLOWED_ACCESS ");
+ if (type & SYSTEM_SECURITY_ACCESS)
+ fstrcat(typestr, "SYSTEM_SECURITY_ACCESS ");
+ if (type & SYNCHRONIZE_ACCESS)
+ fstrcat(typestr, "SYNCHRONIZE_ACCESS ");
+ if (type & WRITE_OWNER_ACCESS)
+ fstrcat(typestr, "WRITE_OWNER_ACCESS ");
+ if (type & WRITE_DAC_ACCESS)
+ fstrcat(typestr, "WRITE_DAC_ACCESS ");
+ if (type & READ_CONTROL_ACCESS)
+ fstrcat(typestr, "READ_CONTROL_ACCESS ");
+ if (type & DELETE_ACCESS)
+ fstrcat(typestr, "DELETE_ACCESS ");
+
+ printf("\t\tSpecific bits: 0x%lx\n", type&SPECIFIC_RIGHTS_MASK);
return typestr;
}
@@ -91,152 +63,83 @@ static const char *get_sec_mask_str(uint32 type)
/****************************************************************************
display sec_access structure
****************************************************************************/
-static void display_sec_access(FILE *out_hnd, enum action_type action, SEC_ACCESS *const info)
+void display_sec_access(SEC_ACCESS *info)
{
- switch (action)
- {
- case ACTION_HEADER:
- {
- break;
- }
- case ACTION_ENUMERATE:
- {
- report(out_hnd, "\t\tPermissions:\t%s\n",
- get_sec_mask_str(info->mask));
- }
- case ACTION_FOOTER:
- {
- break;
- }
- }
+ printf("\t\tPermissions: 0x%x: %s\n", info->mask, get_sec_mask_str(info->mask));
}
/****************************************************************************
display sec_ace structure
****************************************************************************/
-static void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *const ace)
+void display_sec_ace(SEC_ACE *ace)
{
- switch (action)
- {
- case ACTION_HEADER:
- {
- report(out_hnd, "\tACE\n");
+ fstring sid_str;
+
+ printf("\tACE\n\t\ttype: ");
+ switch (ace->type) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED:
+ printf("ACCESS ALLOWED");
+ break;
+ case SEC_ACE_TYPE_ACCESS_DENIED:
+ printf("ACCESS DENIED");
break;
- }
- case ACTION_ENUMERATE:
- {
- fstring sid_str;
-
- report(out_hnd,
- "\t\tType:%2x Flags:%2x Perms:%04x\n",
- ace->type, ace->flags,
- (uint32) ace->info.mask);
-
- display_sec_access(out_hnd, ACTION_HEADER , &ace->info);
- display_sec_access(out_hnd, ACTION_ENUMERATE, &ace->info);
- display_sec_access(out_hnd, ACTION_FOOTER , &ace->info);
-
- sid_to_string(sid_str, &ace->sid);
- report(out_hnd, "\t\tSID:\t%s\n", sid_str);
- }
- case ACTION_FOOTER:
- {
+ case SEC_ACE_TYPE_SYSTEM_AUDIT:
+ printf("SYSTEM AUDIT");
+ break;
+ case SEC_ACE_TYPE_SYSTEM_ALARM:
+ printf("SYSTEM ALARM");
+ break;
+ default:
+ printf("????");
break;
- }
}
+ printf(" (%d) flags: %d\n", ace->type, ace->flags);
+ display_sec_access(&ace->info);
+ sid_to_string(sid_str, &ace->trustee);
+ printf("\t\tSID: %s\n\n", sid_str);
}
/****************************************************************************
display sec_acl structure
****************************************************************************/
-static void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *const sec_acl)
+void display_sec_acl(SEC_ACL *sec_acl)
{
- if (sec_acl == NULL)
- {
- return;
- }
- switch (action)
- {
- case ACTION_HEADER:
- {
- report(out_hnd, "\tACL\tNum ACEs:\t%d\trevision:\t%x\n",
+ int i;
+
+ printf("\tACL\tNum ACEs:\t%d\trevision:\t%x\n",
sec_acl->num_aces, sec_acl->revision);
- report(out_hnd, "\t---\n");
+ printf("\t---\n");
- break;
- }
- case ACTION_ENUMERATE:
- {
- if (sec_acl->size != 0 && sec_acl->num_aces != 0)
- {
- int i;
- for (i = 0; i < sec_acl->num_aces; i++)
- {
- display_sec_ace(out_hnd, ACTION_HEADER , &sec_acl->ace[i]);
- display_sec_ace(out_hnd, ACTION_ENUMERATE, &sec_acl->ace[i]);
- display_sec_ace(out_hnd, ACTION_FOOTER , &sec_acl->ace[i]);
- }
- }
+ if (sec_acl->size != 0 && sec_acl->num_aces != 0)
+ for (i = 0; i < sec_acl->num_aces; i++)
+ display_sec_ace(&sec_acl->ace[i]);
- break;
- }
- case ACTION_FOOTER:
- {
- report(out_hnd, "\n");
- break;
- }
- }
}
/****************************************************************************
display sec_desc structure
****************************************************************************/
-void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *const sec)
+void display_sec_desc(SEC_DESC *sec)
{
- switch (action)
- {
- case ACTION_HEADER:
- {
- report(out_hnd, "\tSecurity Descriptor\trevision:\t%x\ttype:\t%x\n",
- sec->revision, sec->type);
- report(out_hnd, "\t-------------------\n");
+ fstring sid_str;
- break;
- }
- case ACTION_ENUMERATE:
- {
- fstring sid_str;
-
- if (sec->off_sacl != 0)
- {
- display_sec_acl(out_hnd, ACTION_HEADER , sec->sacl);
- display_sec_acl(out_hnd, ACTION_ENUMERATE, sec->sacl);
- display_sec_acl(out_hnd, ACTION_FOOTER , sec->sacl);
- }
- if (sec->off_dacl != 0)
- {
- display_sec_acl(out_hnd, ACTION_HEADER , sec->dacl);
- display_sec_acl(out_hnd, ACTION_ENUMERATE, sec->dacl);
- display_sec_acl(out_hnd, ACTION_FOOTER , sec->dacl);
- }
- if (sec->off_owner_sid != 0)
- {
- sid_to_string(sid_str, sec->owner_sid);
- report(out_hnd, "\tOwner SID:\t%s\n", sid_str);
- }
- if (sec->off_grp_sid != 0)
- {
- sid_to_string(sid_str, sec->grp_sid);
- report(out_hnd, "\tParent SID:\t%s\n", sid_str);
- }
-
- break;
- }
- case ACTION_FOOTER:
- {
- report(out_hnd, "\n");
- break;
- }
+ if (sec->sacl) {
+ printf("SACL\n");
+ display_sec_acl(sec->sacl);
+ }
+
+ if (sec->dacl) {
+ printf("DACL\n");
+ display_sec_acl(sec->dacl);
}
-}
+ if (sec->owner_sid) {
+ sid_to_string(sid_str, sec->owner_sid);
+ printf("\tOwner SID:\t%s\n", sid_str);
+ }
+
+ if (sec->grp_sid) {
+ sid_to_string(sid_str, sec->grp_sid);
+ printf("\tParent SID:\t%s\n", sid_str);
+ }
+}
diff --git a/source/rpcclient/display_spool.c b/source/rpcclient/display_spool.c
index cdca0c393dd..b4baf570f17 100644
--- a/source/rpcclient/display_spool.c
+++ b/source/rpcclient/display_spool.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
Samba utility functions
Copyright (C) Andrew Tridgell 1992-1999
Copyright (C) Luke Kenneth Casson Leighton 1996 - 1999
diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c
index c78fae43183..3067d8f437d 100644
--- a/source/rpcclient/rpcclient.c
+++ b/source/rpcclient/rpcclient.c
@@ -207,7 +207,7 @@ void fetch_machine_sid(struct cli_state *cli)
if (!(mem_ctx=talloc_init()))
{
- DEBUG(0,("fetch_domain_sid: talloc_init returned NULL!\n"));
+ DEBUG(0,("fetch_machine_sid: talloc_init returned NULL!\n"));
goto error;
}
@@ -248,27 +248,50 @@ void fetch_machine_sid(struct cli_state *cli)
exit(1);
}
-/* Initialise client credentials for authenticated pipe access */
+/* List the available commands on a given pipe */
-void init_rpcclient_creds(struct ntuser_creds *creds, char* username,
- char* domain, char* password)
+static NTSTATUS cmd_listcommands(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
{
- ZERO_STRUCTP(creds);
+ struct cmd_list *tmp;
+ struct cmd_set *tmp_set;
+ int i;
- if (lp_encrypted_passwords()) {
- pwd_make_lm_nt_16(&creds->pwd, password);
- } else {
- pwd_set_cleartext(&creds->pwd, password);
- }
+ /* Usage */
- fstrcpy(creds->user_name, username);
- fstrcpy(creds->domain, domain);
+ if (argc != 2) {
+ printf("Usage: %s <pipe>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
- if (! *username) {
- creds->pwd.null_pwd = True;
- }
-}
+ /* Help on one command */
+ for (tmp = cmd_list; tmp; tmp = tmp->next)
+ {
+ tmp_set = tmp->cmd_set;
+
+ if (!StrCaseCmp(argv[1], tmp_set->name))
+ {
+ printf("Available commands on the %s pipe:\n\n", tmp_set->name);
+
+ i = 0;
+ tmp_set++;
+ while(tmp_set->name) {
+ printf("%20s", tmp_set->name);
+ tmp_set++;
+ i++;
+ if (i%4 == 0)
+ printf("\n");
+ }
+
+ /* drop out of the loop */
+ break;
+ }
+ }
+ printf("\n\n");
+
+ return NT_STATUS_OK;
+}
/* Display help on commands */
@@ -365,6 +388,7 @@ static struct cmd_set rpcclient_commands[] = {
{ "help", cmd_help, NULL, "Get help on commands", "[command]" },
{ "?", cmd_help, NULL, "Get help on commands", "[command]" },
{ "debuglevel", cmd_debuglevel, NULL, "Set debug level", "level" },
+ { "list", cmd_listcommands, NULL, "List available commands on <pipe>", "pipe" },
{ "exit", cmd_quit, NULL, "Exit program", "" },
{ "quit", cmd_quit, NULL, "Exit program", "" },
@@ -439,14 +463,14 @@ static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry,
/* Create argument list */
argv = (char **)malloc(sizeof(char *) * argc);
+ memset(argv, 0, sizeof(char *) * argc);
+
if (!argv) {
fprintf(stderr, "out of memory\n");
result = NT_STATUS_NO_MEMORY;
goto done;
}
- memset(argv, 0, sizeof(char *) * argc);
-
p = cmd;
argc = 0;
@@ -556,47 +580,6 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd)
return result;
}
-/************************************************************************/
-struct cli_state *setup_connection(struct cli_state *cli, char *system_name,
- struct ntuser_creds *creds)
-{
- struct in_addr dest_ip;
- struct nmb_name calling, called;
- fstring dest_host;
- extern pstring global_myname;
- struct ntuser_creds anon;
-
- /* Initialise cli_state information */
- if (!cli_initialise(cli)) {
- return NULL;
- }
-
- if (!creds) {
- ZERO_STRUCT(anon);
- anon.pwd.null_pwd = 1;
- creds = &anon;
- }
-
- cli_init_creds(cli, creds);
-
- /* Establish a SMB connection */
- if (!resolve_srv_name(system_name, dest_host, &dest_ip)) {
- fprintf(stderr, "Could not resolve %s\n", dest_host);
- return NULL;
- }
-
- make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20);
- make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
-
- if (!cli_establish_connection(cli, dest_host, &dest_ip, &calling,
- &called, "IPC$", "IPC", False, True)) {
- fprintf(stderr, "Error establishing IPC$ connection\n");
- return NULL;
- }
-
- return cli;
-}
-
/* Print usage information */
static void usage(void)
@@ -617,7 +600,7 @@ static void usage(void)
/* Main function */
- int main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
extern char *optarg;
extern int optind;
@@ -628,86 +611,109 @@ static void usage(void)
int olddebug;
pstring cmdstr = "",
servicesf = CONFIGFILE;
- struct ntuser_creds creds;
- struct cli_state cli;
fstring password,
username,
domain,
server;
+ struct cli_state *cli;
pstring logfile;
struct cmd_set **cmd_set;
+ struct in_addr server_ip;
+ NTSTATUS nt_status;
+ extern BOOL AllowDebugChange;
setlinebuf(stdout);
DEBUGLEVEL = 1;
+ AllowDebugChange = False;
- while ((opt = getopt(argc, argv, "A:s:Nd:U:W:c:l:h")) != EOF) {
- switch (opt) {
- case 'A':
- /* only get the username, password, and domain from the file */
- read_authfile (optarg, username, password, domain);
- if (strlen (password))
- got_pass = True;
- break;
+ /* Parse options */
- case 'c':
- pstrcpy(cmdstr, optarg);
- break;
+ if (argc == 1) {
+ usage();
+ return 0;
+ }
- case 'd':
- DEBUGLEVEL = atoi(optarg);
- break;
+ /*
+ * M. Sweet: getopt() behaves slightly differently on various
+ * platforms. The following loop ensures that the System V,
+ * BSD, and Linux (glibc) implementations work similarly to
+ * allow the server name anywhere on the command-line.
+ */
- case 'l':
- slprintf(logfile, sizeof(logfile) - 1, "%s.client", optarg);
- lp_set_logfile(logfile);
- interactive = False;
- break;
+ pstrcpy(server, "");
+
+ while (argc > optind) {
+ while ((opt = getopt(argc, argv, "A:s:Nd:U:W:c:l:h")) != EOF) {
+ switch (opt) {
+ case 'A':
+ /* only get the username, password, and domain from the file */
+ read_authfile (optarg, username, password, domain);
+ if (strlen (password))
+ got_pass = True;
+ break;
+
+ case 'c':
+ pstrcpy(cmdstr, optarg);
+ break;
+
+ case 'd':
+ DEBUGLEVEL = atoi(optarg);
+ break;
+
+ case 'l':
+ slprintf(logfile, sizeof(logfile) - 1, "%s.client", optarg);
+ lp_set_logfile(logfile);
+ interactive = False;
+ break;
+
+ case 'N':
+ got_pass = True;
+ break;
+
+ case 's':
+ pstrcpy(servicesf, optarg);
+ break;
+
+ case 'U': {
+ char *lp;
+ pstrcpy(username,optarg);
+ if ((lp=strchr(username,'%'))) {
+ *lp = 0;
+ pstrcpy(password,lp+1);
+ got_pass = True;
+ memset(strchr(optarg,'%')+1,'X',strlen(password));
+ }
+ break;
+ }
- case 'N':
- got_pass = True;
- break;
-
- case 's':
- pstrcpy(servicesf, optarg);
- break;
+ case 'W':
+ pstrcpy(domain, optarg);
+ break;
- case 'U': {
- char *lp;
- pstrcpy(username,optarg);
- if ((lp=strchr(username,'%'))) {
- *lp = 0;
- pstrcpy(password,lp+1);
- got_pass = True;
- memset(strchr(optarg,'%')+1,'X',strlen(password));
+ case 'h':
+ default:
+ usage();
+ return 1;
}
- break;
}
-
- case 'W':
- pstrcpy(domain, optarg);
- break;
-
- case 'h':
- default:
- usage();
- exit(1);
+
+ if (argc > optind) {
+ if (strncmp("//", argv[optind], 2) == 0 ||
+ strncmp("\\\\", argv[optind], 2) == 0)
+ {
+ argv[optind] += 2;
+ }
+
+ pstrcpy(server, argv[optind]);
+ optind ++;
}
}
- argv += optind;
- argc -= optind;
-
- /* Parse options */
- if (argc == 0) {
+ if (!server[0]) {
usage();
- return 0;
+ return 1;
}
-
- if (strncmp("//", argv[0], 2) == 0 || strncmp("\\\\", argv[0], 2) == 0)
- argv[0] += 2;
-
- pstrcpy(server, argv[0]);
/* the following functions are part of the Samba debugging
facilities. See lib/debug.c */
@@ -733,31 +739,40 @@ static void usage(void)
get_myname((*global_myname)?NULL:global_myname);
strupper(global_myname);
+ /* Resolve the IP address */
+
+ if (!resolve_name(server, &server_ip, 0x20)) {
+ DEBUG(1,("Unable to resolve %s\n", server));
+ return 1;
+ }
+
/*
- * initialize the credentials struct. Get password
+ * Get password
* from stdin if necessary
*/
- if (!strlen(username) && !got_pass)
- get_username(username);
if (!got_pass) {
- init_rpcclient_creds (&creds, username, domain, "");
- pwd_read(&creds.pwd, "Enter Password: ", lp_encrypted_passwords());
+ char *pass = getpass("Password:");
+ if (pass) {
+ fstrcpy(password, pass);
}
- else {
- init_rpcclient_creds (&creds, username, domain, password);
}
- memset(password,'X',sizeof(password));
- /* open a connection to the specified server */
- ZERO_STRUCTP (&cli);
- if (!setup_connection (&cli, server, &creds)) {
+ if (!strlen(username) && !got_pass)
+ get_username(username);
+
+ nt_status = cli_full_connection(&cli, global_myname, server,
+ &server_ip, 0,
+ "IPC$", "IPC",
+ username, domain,
+ password, strlen(password));
+
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ DEBUG(1,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status)));
return 1;
}
- /* There are no pointers in ntuser_creds struct so zero it out */
-
- ZERO_STRUCTP (&creds);
+ memset(password,'X',sizeof(password));
/* Load command lists */
@@ -769,7 +784,7 @@ static void usage(void)
cmd_set++;
}
- fetch_machine_sid(&cli);
+ fetch_machine_sid(cli);
/* Do anything specified with -c */
if (cmdstr[0]) {
@@ -777,10 +792,10 @@ static void usage(void)
char *p = cmdstr;
while((cmd=next_command(&p)) != NULL) {
- printf("%s\n", cmd);
- process_cmd(&cli, cmd);
+ process_cmd(cli, cmd);
}
+ cli_shutdown(cli);
return 0;
}
@@ -798,8 +813,9 @@ static void usage(void)
break;
if (line[0] != '\n')
- process_cmd(&cli, line);
+ process_cmd(cli, line);
}
+ cli_shutdown(cli);
return 0;
}
diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk
index 68720258ec0..af230400935 100644
--- a/source/script/mkproto.awk
+++ b/source/script/mkproto.awk
@@ -24,7 +24,7 @@ END {
# use_ldap_define = 0;
# }
print ""
- print "/*The following definitions come from ",FILENAME," */"
+ print "/* The following definitions come from",FILENAME," */"
print ""
current_file=FILENAME
}
@@ -120,7 +120,7 @@ END {
gotstart = 1;
}
- if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^NTSTATUS|^WERROR|^CLI_POLICY_HND/ ) {
+ if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^DATA_BLOB/ ) {
gotstart = 1;
}
diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c
index 0d2a99b3f07..d4a53d9a6d9 100644
--- a/source/smbd/blocking.c
+++ b/source/smbd/blocking.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
Blocking Locking functions
Copyright (C) Jeremy Allison 1998
@@ -176,6 +175,12 @@ static void generic_blocking_lock_error(blocking_lock_record *blr, NTSTATUS stat
char *inbuf = blr->inbuf;
construct_reply_common(inbuf, outbuf);
+ /* whenever a timeout is given w2k maps LOCK_NOT_GRANTED to
+ FILE_LOCK_CONFLICT! (tridge) */
+ if (NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED)) {
+ status = NT_STATUS_FILE_LOCK_CONFLICT;
+ }
+
ERROR_NT(status);
if (!send_smb(smbd_server_fd(),outbuf))
exit_server("generic_blocking_lock_error: send_smb failed.");
@@ -274,7 +279,7 @@ static BOOL process_lockread(blocking_lock_record *blr)
numtoread = MIN(BUFFER_SIZE-outsize,numtoread);
data = smb_buf(outbuf) + 3;
- status = do_lock( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread,
+ status = do_lock_spin( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread,
(SMB_BIG_UINT)startpos, READ_LOCK);
if (NT_STATUS_V(status)) {
if ((errno != EACCES) && (errno != EAGAIN)) {
@@ -340,7 +345,7 @@ static BOOL process_lock(blocking_lock_record *blr)
offset = IVAL(inbuf,smb_vwv3);
errno = 0;
- status = do_lock(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count,
+ status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count,
(SMB_BIG_UINT)offset, WRITE_LOCK);
if (NT_STATUS_IS_ERR(status)) {
if((errno != EACCES) && (errno != EAGAIN)) {
@@ -412,7 +417,7 @@ static BOOL process_lockingX(blocking_lock_record *blr)
* request would never have been queued. JRA.
*/
errno = 0;
- status = do_lock(fsp,conn,lock_pid,count,offset,
+ status = do_lock_spin(fsp,conn,lock_pid,count,offset,
((locktype & 1) ? READ_LOCK : WRITE_LOCK));
if (NT_STATUS_IS_ERR(status)) break;
}
diff --git a/source/smbd/close.c b/source/smbd/close.c
index ca030ed1404..38270fbfe31 100644
--- a/source/smbd/close.c
+++ b/source/smbd/close.c
@@ -91,13 +91,14 @@ static int close_filestruct(files_struct *fsp)
connection_struct *conn = fsp->conn;
int ret = 0;
- if(flush_write_cache(fsp, CLOSE_FLUSH) == -1)
- ret = -1;
+ if (fsp->fd != -1) {
+ if(flush_write_cache(fsp, CLOSE_FLUSH) == -1)
+ ret = -1;
- delete_write_cache(fsp);
+ delete_write_cache(fsp);
+ }
fsp->is_directory = False;
- fsp->stat_open = False;
conn->num_files_open--;
SAFE_FREE(fsp->wbmpx_ptr);
@@ -160,7 +161,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close)
GET_DELETE_ON_CLOSE_FLAG(share_entry->share_mode) )
delete_on_close = True;
- safe_free(share_entry);
+ SAFE_FREE(share_entry);
/*
* NT can set delete_on_close of the last open
@@ -170,7 +171,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close)
if (normal_close && delete_on_close) {
DEBUG(5,("close_file: file %s. Delete on close was set - deleting file.\n",
fsp->fsp_name));
- if(fsp->conn->vfs_ops.unlink(conn,dos_to_unix(fsp->fsp_name, False)) != 0) {
+ if(fsp->conn->vfs_ops.unlink(conn,dos_to_unix_static(fsp->fsp_name)) != 0) {
/*
* This call can potentially fail as another smbd may have
* had the file open with delete on close set and deleted
@@ -263,22 +264,6 @@ static int close_directory(files_struct *fsp, BOOL normal_close)
}
/****************************************************************************
- Close a file opened with null permissions in order to read permissions.
-****************************************************************************/
-
-static int close_statfile(files_struct *fsp, BOOL normal_close)
-{
- close_filestruct(fsp);
-
- if (fsp->fsp_name)
- string_free(&fsp->fsp_name);
-
- file_free(fsp);
-
- return 0;
-}
-
-/****************************************************************************
Close a directory opened by an NT SMB call.
****************************************************************************/
@@ -286,7 +271,5 @@ int close_file(files_struct *fsp, BOOL normal_close)
{
if(fsp->is_directory)
return close_directory(fsp, normal_close);
- else if(fsp->stat_open)
- return close_statfile(fsp, normal_close);
return close_normal_file(fsp, normal_close);
}
diff --git a/source/smbd/conn.c b/source/smbd/conn.c
index 7e8a8383213..822ff5abcd4 100644
--- a/source/smbd/conn.c
+++ b/source/smbd/conn.c
@@ -165,12 +165,10 @@ void conn_free(connection_struct *conn)
{
/* Free vfs_connection_struct */
-#ifdef HAVE_LIBDL
if (conn->dl_handle != NULL) {
/* Close dlopen() handle */
sys_dlclose(conn->dl_handle);
}
-#endif /* HAVE_LIBDL */
DLIST_REMOVE(Connections, conn);
diff --git a/source/smbd/connection.c b/source/smbd/connection.c
index 3ca4021abe4..aa8b95a1705 100644
--- a/source/smbd/connection.c
+++ b/source/smbd/connection.c
@@ -51,7 +51,7 @@ BOOL yield_connection(connection_struct *conn,char *name)
key.pid = sys_getpid();
key.cnum = conn?conn->cnum:-1;
fstrcpy(key.name, name);
- dos_to_unix(key.name, True); /* Convert key to unix-codepage */
+ dos_to_unix(key.name); /* Convert key to unix-codepage */
kbuf.dptr = (char *)&key;
kbuf.dsize = sizeof(key);
@@ -159,7 +159,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO
key.pid = sys_getpid();
key.cnum = conn?conn->cnum:-1;
fstrcpy(key.name, name);
- dos_to_unix(key.name, True); /* Convert key to unix-codepage */
+ dos_to_unix(key.name); /* Convert key to unix-codepage */
kbuf.dptr = (char *)&key;
kbuf.dsize = sizeof(key);
diff --git a/source/smbd/dfree.c b/source/smbd/dfree.c
index 034e1a093d3..abc3637056d 100644
--- a/source/smbd/dfree.c
+++ b/source/smbd/dfree.c
@@ -158,8 +158,8 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query,
/****************************************************************************
wrap it to get filenames right
****************************************************************************/
-SMB_BIG_UINT sys_disk_free(char *path, BOOL small_query,
+SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query,
SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
{
- return(disk_free(dos_to_unix(path,False),small_query, bsize,dfree,dsize));
+ return(disk_free(dos_to_unix_static(path),small_query, bsize,dfree,dsize));
}
diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index 789ff919eea..12e0758596f 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -622,7 +622,7 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname,
pstrcpy(pathreal,path);
pstrcat(path,fname);
pstrcat(pathreal,dname);
- if (conn->vfs_ops.stat(conn,dos_to_unix(pathreal, False), &sbuf) != 0)
+ if (conn->vfs_ops.stat(conn,dos_to_unix_static(pathreal), &sbuf) != 0)
{
DEBUG(5,("Couldn't stat 1 [%s]. Error = %s\n",path, strerror(errno) ));
continue;
@@ -675,28 +675,39 @@ static BOOL user_can_read_file(connection_struct *conn, char *name)
size_t sd_size;
files_struct *fsp;
int smb_action;
+ int access_mode;
NTSTATUS status;
uint32 access_granted;
ZERO_STRUCT(ste);
- /* if we can't stat it does not show it */
+ /*
+ * If user is a member of the Admin group
+ * we never hide files from them.
+ */
+
+ if (conn->admin_user)
+ return True;
+
+ /* If we can't stat it does not show it */
if (vfs_stat(conn, name, &ste) != 0)
return False;
/* Pseudo-open the file (note - no fd's created). */
if(S_ISDIR(ste.st_mode))
- fsp = open_directory(conn, name, &ste, SET_DENY_MODE(DENY_NONE), FILE_OPEN,
+ fsp = open_directory(conn, name, &ste, 0, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN),
unix_mode(conn,aRONLY|aDIR, name), &smb_action);
else
- fsp = open_file_stat(conn,name,&ste,DOS_OPEN_RDONLY,&smb_action);
+ fsp = open_file_shared1(conn, name, &ste, FILE_READ_ATTRIBUTES, SET_DENY_MODE(DENY_NONE),
+ (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action);
+
if (!fsp)
return False;
/* Get NT ACL -allocated in main loop talloc context. No free needed here. */
sd_size = conn->vfs_ops.fget_nt_acl(fsp, fsp->fd, &psd);
- close_file(fsp, True);
+ close_file(fsp, False);
/* No access if SD get failed. */
if (!sd_size)
@@ -704,26 +715,6 @@ static BOOL user_can_read_file(connection_struct *conn, char *name)
return se_access_check(psd, current_user.nt_user_token, FILE_READ_DATA,
&access_granted, &status);
-
-#if 0
- /* Old - crappy check :-). JRA */
-
- if (ste.st_uid == conn->uid) {
- return (ste.st_mode & S_IRUSR) == S_IRUSR;
- } else {
- int i;
- if (ste.st_gid == conn->gid) {
- return (ste.st_mode & S_IRGRP) == S_IRGRP;
- }
- for (i=0; i<conn->ngroups; i++) {
- if (conn->groups[i] == ste.st_gid) {
- return (ste.st_mode & S_IRGRP) == S_IRGRP;
- }
- }
- }
-
- return (ste.st_mode & S_IROTH) == S_IROTH;
-#endif
}
/*******************************************************************
@@ -734,7 +725,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
{
Dir *dirp;
char *n;
- DIR *p = conn->vfs_ops.opendir(conn,dos_to_unix(name,False));
+ DIR *p = conn->vfs_ops.opendir(conn,dos_to_unix_static(name));
int used=0;
if (!p) return(NULL);
@@ -747,10 +738,22 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
dirp->pos = dirp->numentries = dirp->mallocsize = 0;
dirp->data = dirp->current = NULL;
- while ((n = vfs_readdirname(conn, p)))
+ while (True)
{
int l;
+ if (used == 0) {
+ n = ".";
+ } else if (used == 2) {
+ n = "..";
+ } else {
+ n = vfs_readdirname(conn, p);
+ if (n == NULL)
+ break;
+ if ((strcmp(".",n) == 0) ||(strcmp("..",n) == 0))
+ continue;
+ }
+
l = strlen(n)+1;
/* Return value of vfs_readdirname has already gone through
diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c
index d7b40198771..ee54417c247 100644
--- a/source/smbd/dosmode.c
+++ b/source/smbd/dosmode.c
@@ -196,6 +196,8 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT *
if (S_ISDIR(st->st_mode))
dosmode |= aDIR;
+ else
+ dosmode &= ~aDIR;
if (dos_mode(conn,fname,st) == dosmode)
return(0);
@@ -280,7 +282,7 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times)
errno = 0;
- if(conn->vfs_ops.utime(conn,dos_to_unix(fname, False), times) == 0)
+ if(conn->vfs_ops.utime(conn,dos_to_unix_static(fname), times) == 0)
return 0;
if((errno != EPERM) && (errno != EACCES))
@@ -308,7 +310,7 @@ int file_utime(connection_struct *conn, char *fname, struct utimbuf *times)
current_user.ngroups,current_user.groups)))) {
/* We are allowed to become root and change the filetime. */
become_root();
- ret = conn->vfs_ops.utime(conn,dos_to_unix(fname, False), times);
+ ret = conn->vfs_ops.utime(conn,dos_to_unix_static(fname), times);
unbecome_root();
}
}
diff --git a/source/smbd/error.c b/source/smbd/error.c
index 0a63d520ee6..6de16f1d5b9 100644
--- a/source/smbd/error.c
+++ b/source/smbd/error.c
@@ -90,10 +90,17 @@ int error_packet(char *outbuf,NTSTATUS ntstatus,
if (errno != 0)
DEBUG(3,("error string = %s\n",strerror(errno)));
- if (global_client_caps & CAP_STATUS32) {
- if (NT_STATUS_V(ntstatus) == 0 && eclass) {
+ /*
+ * We can explicitly force 32 bit error codes even when the
+ * parameter "nt status" is set to no by pre-setting the
+ * FLAGS2_32_BIT_ERROR_CODES bit in the smb_flg2 outbuf.
+ * This is to allow work arounds for client bugs that are needed
+ * when talking with clients that normally expect nt status codes. JRA.
+ */
+
+ if ((lp_nt_status_support() || (SVAL(outbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) && (global_client_caps & CAP_STATUS32)) {
+ if (NT_STATUS_V(ntstatus) == 0 && eclass)
ntstatus = dos_to_ntstatus(eclass, ecode);
- }
SIVAL(outbuf,smb_rcls,NT_STATUS_V(ntstatus));
SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)|FLAGS2_32_BIT_ERROR_CODES);
DEBUG(3,("error packet at %s(%d) cmd=%d (%s) %s\n",
@@ -104,9 +111,8 @@ int error_packet(char *outbuf,NTSTATUS ntstatus,
return outsize;
}
- if (eclass == 0 && NT_STATUS_V(ntstatus)) {
+ if (eclass == 0 && NT_STATUS_V(ntstatus))
ntstatus_to_dos(ntstatus, &eclass, &ecode);
- }
SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)&~FLAGS2_32_BIT_ERROR_CODES);
SSVAL(outbuf,smb_rcls,eclass);
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c
index ba60690383b..fd660f40d08 100644
--- a/source/smbd/fileio.c
+++ b/source/smbd/fileio.c
@@ -3,6 +3,7 @@
Version 1.9.
read/write to a files_struct
Copyright (C) Andrew Tridgell 1992-1998
+ Copyright (C) Jeremy Allison 2000-2002. - write cache.
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
@@ -24,43 +25,32 @@
static BOOL setup_write_cache(files_struct *, SMB_OFF_T);
/****************************************************************************
-seek a file. Try to avoid the seek if possible
+ Seek a file. Try to avoid the seek if possible.
****************************************************************************/
SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos)
{
- SMB_OFF_T offset = 0;
- SMB_OFF_T seek_ret;
+ SMB_OFF_T offset = 0;
+ SMB_OFF_T seek_ret;
- if (fsp->print_file && lp_postscript(fsp->conn->service))
- offset = 3;
+ if (fsp->print_file && lp_postscript(fsp->conn->service))
+ offset = 3;
- seek_ret = fsp->conn->vfs_ops.lseek(fsp,fsp->fd,pos+offset,SEEK_SET);
+ seek_ret = fsp->conn->vfs_ops.lseek(fsp,fsp->fd,pos+offset,SEEK_SET);
- /*
- * We want to maintain the fiction that we can seek
- * on a fifo for file system purposes. This allows
- * people to set up UNIX fifo's that feed data to Windows
- * applications. JRA.
- */
-
- if((seek_ret == -1) && (errno == ESPIPE)) {
- seek_ret = pos+offset;
- errno = 0;
- }
-
- if((seek_ret == -1) || (seek_ret != pos+offset)) {
- DEBUG(0,("seek_file: sys_lseek failed. Error was %s\n", strerror(errno) ));
- fsp->pos = -1;
- return -1;
- }
+ if(seek_ret == -1) {
+ DEBUG(0,("seek_file: (%s) sys_lseek failed. Error was %s\n",
+ fsp->fsp_name, strerror(errno) ));
+ fsp->pos = -1;
+ return -1;
+ }
- fsp->pos = seek_ret - offset;
+ fsp->pos = seek_ret - offset;
- DEBUG(10,("seek_file: requested pos = %.0f, new pos = %.0f\n",
- (double)(pos+offset), (double)fsp->pos ));
+ DEBUG(10,("seek_file (%s): requested pos = %.0f, new pos = %.0f\n",
+ fsp->fsp_name, (double)(pos+offset), (double)fsp->pos ));
- return(fsp->pos);
+ return(fsp->pos);
}
/****************************************************************************
@@ -70,23 +60,23 @@ SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos)
BOOL read_from_write_cache(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
{
- write_cache *wcp = fsp->wcp;
+ write_cache *wcp = fsp->wcp;
- if(!wcp)
- return False;
+ if(!wcp)
+ return False;
- if(n > wcp->data_size || pos < wcp->offset || pos + n > wcp->offset + wcp->data_size)
- return False;
+ if(n > wcp->data_size || pos < wcp->offset || pos + n > wcp->offset + wcp->data_size)
+ return False;
- memcpy(data, wcp->data + (pos - wcp->offset), n);
+ memcpy(data, wcp->data + (pos - wcp->offset), n);
- DO_PROFILE_INC(writecache_read_hits);
+ DO_PROFILE_INC(writecache_read_hits);
- return True;
+ return True;
}
/****************************************************************************
-read from a file
+ Read from a file.
****************************************************************************/
ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
@@ -134,6 +124,9 @@ tryagain:
ret += readret;
}
+ DEBUG(10,("read_file (%s): pos = %.0f, size = %lu, returned %lu\n",
+ fsp->fsp_name, (double)pos, (unsigned long)n, (long)ret ));
+
return(ret);
}
@@ -146,10 +139,17 @@ static unsigned int allocated_write_caches;
static ssize_t real_write_file(files_struct *fsp,char *data,SMB_OFF_T pos, size_t n)
{
- if ((pos != -1) && (seek_file(fsp,pos) == -1))
- return -1;
+ ssize_t ret;
+
+ if ((pos != -1) && (seek_file(fsp,pos) == -1))
+ return -1;
+
+ ret = vfs_write_data(fsp,data,n);
- return vfs_write_data(fsp,data,n);
+ DEBUG(10,("real_write_file (%s): pos = %.0f, size = %lu, returned %ld\n",
+ fsp->fsp_name, (double)pos, (unsigned long)n, (long)ret ));
+
+ return ret;
}
/****************************************************************************
@@ -158,367 +158,365 @@ write to a file
ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n)
{
- write_cache *wcp = fsp->wcp;
- ssize_t total_written = 0;
- int write_path = -1;
-
- if (fsp->print_file) {
- return print_job_write(fsp->print_jobid, data, n);
- }
-
- if (!fsp->can_write) {
- errno = EPERM;
- return(0);
- }
-
- if (!fsp->modified) {
- SMB_STRUCT_STAT st;
- fsp->modified = True;
-
- if (fsp->conn->vfs_ops.fstat(fsp,fsp->fd,&st) == 0) {
- int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st);
- fsp->size = st.st_size;
- if (MAP_ARCHIVE(fsp->conn) && !IS_DOS_ARCHIVE(dosmode)) {
- file_chmod(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st);
- }
-
- /*
- * If this is the first write and we have an exclusive oplock then setup
- * the write cache.
- */
-
- if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && !wcp) {
- setup_write_cache(fsp, st.st_size);
- wcp = fsp->wcp;
- }
- }
- }
+ write_cache *wcp = fsp->wcp;
+ ssize_t total_written = 0;
+ int write_path = -1;
+
+ if (fsp->print_file)
+ return print_job_write(fsp->print_jobid, data, n);
+
+ if (!fsp->can_write) {
+ errno = EPERM;
+ return(0);
+ }
+
+ if (!fsp->modified) {
+ SMB_STRUCT_STAT st;
+ fsp->modified = True;
+
+ if (fsp->conn->vfs_ops.fstat(fsp,fsp->fd,&st) == 0) {
+ int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st);
+ fsp->size = st.st_size;
+ if (MAP_ARCHIVE(fsp->conn) && !IS_DOS_ARCHIVE(dosmode))
+ file_chmod(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st);
+
+ /*
+ * If this is the first write and we have an exclusive oplock then setup
+ * the write cache.
+ */
+
+ if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && !wcp) {
+ setup_write_cache(fsp, st.st_size);
+ wcp = fsp->wcp;
+ }
+ }
+ }
#ifdef WITH_PROFILE
- DO_PROFILE_INC(writecache_total_writes);
- if (!fsp->oplock_type) {
- DO_PROFILE_INC(writecache_non_oplock_writes);
- }
+ DO_PROFILE_INC(writecache_total_writes);
+ if (!fsp->oplock_type) {
+ DO_PROFILE_INC(writecache_non_oplock_writes);
+ }
#endif
- /*
- * If this file is level II oplocked then we need
- * to grab the shared memory lock and inform all
- * other files with a level II lock that they need
- * to flush their read caches. We keep the lock over
- * the shared memory area whilst doing this.
- */
+ /*
+ * If this file is level II oplocked then we need
+ * to grab the shared memory lock and inform all
+ * other files with a level II lock that they need
+ * to flush their read caches. We keep the lock over
+ * the shared memory area whilst doing this.
+ */
- release_level_2_oplocks_on_change(fsp);
+ release_level_2_oplocks_on_change(fsp);
#ifdef WITH_PROFILE
- if (profile_p && profile_p->writecache_total_writes % 500 == 0) {
- DEBUG(3,("WRITECACHE: initwrites=%u abutted=%u total=%u \
+ if (profile_p && profile_p->writecache_total_writes % 500 == 0) {
+ DEBUG(3,("WRITECACHE: initwrites=%u abutted=%u total=%u \
nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
- profile_p->writecache_init_writes,
- profile_p->writecache_abutted_writes,
- profile_p->writecache_total_writes,
- profile_p->writecache_non_oplock_writes,
- profile_p->writecache_allocated_write_caches,
- profile_p->writecache_num_write_caches,
- profile_p->writecache_direct_writes,
- profile_p->writecache_num_perfect_writes,
- profile_p->writecache_read_hits ));
-
- DEBUG(3,("WRITECACHE: Flushes SEEK=%d, READ=%d, WRITE=%d, READRAW=%d, OPLOCK=%d, CLOSE=%d, SYNC=%d\n",
- profile_p->writecache_flushed_writes[SEEK_FLUSH],
- profile_p->writecache_flushed_writes[READ_FLUSH],
- profile_p->writecache_flushed_writes[WRITE_FLUSH],
- profile_p->writecache_flushed_writes[READRAW_FLUSH],
- profile_p->writecache_flushed_writes[OPLOCK_RELEASE_FLUSH],
- profile_p->writecache_flushed_writes[CLOSE_FLUSH],
- profile_p->writecache_flushed_writes[SYNC_FLUSH] ));
- }
+ profile_p->writecache_init_writes,
+ profile_p->writecache_abutted_writes,
+ profile_p->writecache_total_writes,
+ profile_p->writecache_non_oplock_writes,
+ profile_p->writecache_allocated_write_caches,
+ profile_p->writecache_num_write_caches,
+ profile_p->writecache_direct_writes,
+ profile_p->writecache_num_perfect_writes,
+ profile_p->writecache_read_hits ));
+
+ DEBUG(3,("WRITECACHE: Flushes SEEK=%d, READ=%d, WRITE=%d, READRAW=%d, OPLOCK=%d, CLOSE=%d, SYNC=%d\n",
+ profile_p->writecache_flushed_writes[SEEK_FLUSH],
+ profile_p->writecache_flushed_writes[READ_FLUSH],
+ profile_p->writecache_flushed_writes[WRITE_FLUSH],
+ profile_p->writecache_flushed_writes[READRAW_FLUSH],
+ profile_p->writecache_flushed_writes[OPLOCK_RELEASE_FLUSH],
+ profile_p->writecache_flushed_writes[CLOSE_FLUSH],
+ profile_p->writecache_flushed_writes[SYNC_FLUSH] ));
+ }
#endif
- if(!wcp) {
- DO_PROFILE_INC(writecache_direct_writes);
- total_written = real_write_file(fsp, data, pos, n);
- if ((total_written != -1) && (pos + total_written > fsp->size))
- fsp->size = pos + total_written;
- return total_written;
- }
+ if(!wcp) {
+ DO_PROFILE_INC(writecache_direct_writes);
+ total_written = real_write_file(fsp, data, pos, n);
+ if ((total_written != -1) && (pos + total_written > fsp->size))
+ fsp->size = pos + total_written;
+ return total_written;
+ }
- DEBUG(9,("write_file(fd=%d pos=%.0f size=%u) wcp->offset=%.0f wcp->data_size=%u\n",
- fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigned int)wcp->data_size));
+ DEBUG(9,("write_file (%s)(fd=%d pos=%.0f size=%u) wcp->offset=%.0f wcp->data_size=%u\n",
+ fsp->fsp_name, fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigned int)wcp->data_size));
- /*
- * If we have active cache and it isn't contiguous then we flush.
- * NOTE: There is a small problem with running out of disk ....
- */
+ /*
+ * If we have active cache and it isn't contiguous then we flush.
+ * NOTE: There is a small problem with running out of disk ....
+ */
- if (wcp->data_size) {
+ if (wcp->data_size) {
- BOOL cache_flush_needed = False;
+ BOOL cache_flush_needed = False;
- if ((pos >= wcp->offset) && (pos <= wcp->offset + wcp->data_size)) {
+ if ((pos >= wcp->offset) && (pos <= wcp->offset + wcp->data_size)) {
- /*
- * Start of write overlaps or abutts the existing data.
- */
+ /*
+ * Start of write overlaps or abutts the existing data.
+ */
- size_t data_used = MIN((wcp->alloc_size - (pos - wcp->offset)), n);
+ size_t data_used = MIN((wcp->alloc_size - (pos - wcp->offset)), n);
- memcpy(wcp->data + (pos - wcp->offset), data, data_used);
+ memcpy(wcp->data + (pos - wcp->offset), data, data_used);
- /*
- * Update the current buffer size with the new data.
- */
+ /*
+ * Update the current buffer size with the new data.
+ */
- if(pos + data_used > wcp->offset + wcp->data_size)
- wcp->data_size = pos + data_used - wcp->offset;
+ if(pos + data_used > wcp->offset + wcp->data_size)
+ wcp->data_size = pos + data_used - wcp->offset;
- /*
- * Update the file size if changed.
- */
+ /*
+ * Update the file size if changed.
+ */
- if (wcp->offset + wcp->data_size > wcp->file_size)
- fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
+ if (wcp->offset + wcp->data_size > wcp->file_size)
+ fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
- /*
- * If we used all the data then
- * return here.
- */
+ /*
+ * If we used all the data then
+ * return here.
+ */
- if(n == data_used)
- return n;
- else
- cache_flush_needed = True;
+ if(n == data_used)
+ return n;
+ else
+ cache_flush_needed = True;
- /*
- * Move the start of data forward by the amount used,
- * cut down the amount left by the same amount.
- */
+ /*
+ * Move the start of data forward by the amount used,
+ * cut down the amount left by the same amount.
+ */
- data += data_used;
- pos += data_used;
- n -= data_used;
+ data += data_used;
+ pos += data_used;
+ n -= data_used;
- DO_PROFILE_INC(writecache_abutted_writes);
- total_written = data_used;
+ DO_PROFILE_INC(writecache_abutted_writes);
+ total_written = data_used;
- write_path = 1;
+ write_path = 1;
- } else if ((pos < wcp->offset) && (pos + n > wcp->offset) &&
- (pos + n <= wcp->offset + wcp->alloc_size)) {
+ } else if ((pos < wcp->offset) && (pos + n > wcp->offset) &&
+ (pos + n <= wcp->offset + wcp->alloc_size)) {
- /*
- * End of write overlaps the existing data.
- */
+ /*
+ * End of write overlaps the existing data.
+ */
- size_t data_used = pos + n - wcp->offset;
+ size_t data_used = pos + n - wcp->offset;
- memcpy(wcp->data, data + n - data_used, data_used);
+ memcpy(wcp->data, data + n - data_used, data_used);
- /*
- * Update the current buffer size with the new data.
- */
+ /*
+ * Update the current buffer size with the new data.
+ */
- if(pos + n > wcp->offset + wcp->data_size)
- wcp->data_size = pos + n - wcp->offset;
+ if(pos + n > wcp->offset + wcp->data_size)
+ wcp->data_size = pos + n - wcp->offset;
- /*
- * Update the file size if changed.
- */
+ /*
+ * Update the file size if changed.
+ */
- if (wcp->offset + wcp->data_size > wcp->file_size)
- fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
+ if (wcp->offset + wcp->data_size > wcp->file_size)
+ fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
- /*
- * We don't need to move the start of data, but we
- * cut down the amount left by the amount used.
- */
+ /*
+ * We don't need to move the start of data, but we
+ * cut down the amount left by the amount used.
+ */
- n -= data_used;
+ n -= data_used;
- /*
- * We cannot have used all the data here.
- */
+ /*
+ * We cannot have used all the data here.
+ */
- cache_flush_needed = True;
+ cache_flush_needed = True;
- DO_PROFILE_INC(writecache_abutted_writes);
- total_written = data_used;
+ DO_PROFILE_INC(writecache_abutted_writes);
+ total_written = data_used;
- write_path = 2;
+ write_path = 2;
- } else if ( (pos >= wcp->file_size) &&
- (wcp->offset + wcp->data_size == wcp->file_size) &&
- (pos > wcp->offset + wcp->data_size) &&
- (pos < wcp->offset + wcp->alloc_size) ) {
+ } else if ( (pos >= wcp->file_size) &&
+ (wcp->offset + wcp->data_size == wcp->file_size) &&
+ (pos > wcp->offset + wcp->data_size) &&
+ (pos < wcp->offset + wcp->alloc_size) ) {
- /*
- * Non-contiguous write part of which fits within
- * the cache buffer and is extending the file
- * and the cache contents reflect the current
- * data up to the current end of the file.
- */
+ /*
+ * Non-contiguous write part of which fits within
+ * the cache buffer and is extending the file
+ * and the cache contents reflect the current
+ * data up to the current end of the file.
+ */
- size_t data_used;
+ size_t data_used;
- if(pos + n <= wcp->offset + wcp->alloc_size)
- data_used = n;
- else
- data_used = wcp->offset + wcp->alloc_size - pos;
+ if(pos + n <= wcp->offset + wcp->alloc_size)
+ data_used = n;
+ else
+ data_used = wcp->offset + wcp->alloc_size - pos;
- /*
- * Fill in the non-continuous area with zeros.
- */
+ /*
+ * Fill in the non-continuous area with zeros.
+ */
- memset(wcp->data + wcp->data_size, '\0',
- pos - (wcp->offset + wcp->data_size) );
+ memset(wcp->data + wcp->data_size, '\0',
+ pos - (wcp->offset + wcp->data_size) );
- memcpy(wcp->data + (pos - wcp->offset), data, data_used);
+ memcpy(wcp->data + (pos - wcp->offset), data, data_used);
- /*
- * Update the current buffer size with the new data.
- */
+ /*
+ * Update the current buffer size with the new data.
+ */
- if(pos + data_used > wcp->offset + wcp->data_size)
- wcp->data_size = pos + data_used - wcp->offset;
+ if(pos + data_used > wcp->offset + wcp->data_size)
+ wcp->data_size = pos + data_used - wcp->offset;
- /*
- * Update the file size if changed.
- */
+ /*
+ * Update the file size if changed.
+ */
- if (wcp->offset + wcp->data_size > wcp->file_size)
- fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
+ if (wcp->offset + wcp->data_size > wcp->file_size)
+ fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
- /*
- * If we used all the data then
- * return here.
- */
+ /*
+ * If we used all the data then
+ * return here.
+ */
- if(n == data_used)
- return n;
- else
- cache_flush_needed = True;
+ if(n == data_used)
+ return n;
+ else
+ cache_flush_needed = True;
- /*
- * Move the start of data forward by the amount used,
- * cut down the amount left by the same amount.
- */
+ /*
+ * Move the start of data forward by the amount used,
+ * cut down the amount left by the same amount.
+ */
- data += data_used;
- pos += data_used;
- n -= data_used;
+ data += data_used;
+ pos += data_used;
+ n -= data_used;
- DO_PROFILE_INC(writecache_abutted_writes);
- total_written = data_used;
+ DO_PROFILE_INC(writecache_abutted_writes);
+ total_written = data_used;
- write_path = 3;
+ write_path = 3;
- } else {
+ } else {
- /*
- * Write is bigger than buffer, or there is no overlap on the
- * low or high ends.
- */
+ /*
+ * Write is bigger than buffer, or there is no overlap on the
+ * low or high ends.
+ */
- DEBUG(9,("write_file: non cacheable write : fd = %d, pos = %.0f, len = %u, current cache pos = %.0f \
+ DEBUG(9,("write_file: non cacheable write : fd = %d, pos = %.0f, len = %u, current cache pos = %.0f \
len = %u\n",fsp->fd, (double)pos, (unsigned int)n, (double)wcp->offset, (unsigned int)wcp->data_size ));
- /*
- * Update the file size if needed.
- */
+ /*
+ * Update the file size if needed.
+ */
- if(pos + n > wcp->file_size)
- fsp->size = wcp->file_size = pos + n;
+ if(pos + n > wcp->file_size)
+ fsp->size = wcp->file_size = pos + n;
- /*
- * If write would fit in the cache, and is larger than
- * the data already in the cache, flush the cache and
- * preferentially copy the data new data into it. Otherwise
- * just write the data directly.
- */
+ /*
+ * If write would fit in the cache, and is larger than
+ * the data already in the cache, flush the cache and
+ * preferentially copy the data new data into it. Otherwise
+ * just write the data directly.
+ */
- if ( n <= wcp->alloc_size && n > wcp->data_size) {
- cache_flush_needed = True;
- } else {
- ssize_t ret = real_write_file(fsp, data, pos, n);
+ if ( n <= wcp->alloc_size && n > wcp->data_size) {
+ cache_flush_needed = True;
+ } else {
+ ssize_t ret = real_write_file(fsp, data, pos, n);
- DO_PROFILE_INC(writecache_direct_writes);
- if (ret == -1)
- return ret;
+ DO_PROFILE_INC(writecache_direct_writes);
+ if (ret == -1)
+ return ret;
- if (pos + ret > wcp->file_size)
- fsp->size = wcp->file_size = pos + ret;
+ if (pos + ret > wcp->file_size)
+ fsp->size = wcp->file_size = pos + ret;
- return ret;
- }
+ return ret;
+ }
- write_path = 4;
+ write_path = 4;
- }
+ }
- if(wcp->data_size > wcp->file_size)
- fsp->size = wcp->file_size = wcp->data_size;
+ if(wcp->data_size > wcp->file_size)
+ fsp->size = wcp->file_size = wcp->data_size;
- if (cache_flush_needed) {
- DEBUG(3,("WRITE_FLUSH:%d: due to noncontinuous write: fd = %d, size = %.0f, pos = %.0f, \
+ if (cache_flush_needed) {
+ DEBUG(3,("WRITE_FLUSH:%d: due to noncontinuous write: fd = %d, size = %.0f, pos = %.0f, \
n = %u, wcp->offset=%.0f, wcp->data_size=%u\n",
- write_path, fsp->fd, (double)wcp->file_size, (double)pos, (unsigned int)n,
- (double)wcp->offset, (unsigned int)wcp->data_size ));
+ write_path, fsp->fd, (double)wcp->file_size, (double)pos, (unsigned int)n,
+ (double)wcp->offset, (unsigned int)wcp->data_size ));
- flush_write_cache(fsp, WRITE_FLUSH);
- }
- }
+ flush_write_cache(fsp, WRITE_FLUSH);
+ }
+ }
- /*
- * If the write request is bigger than the cache
- * size, write it all out.
- */
+ /*
+ * If the write request is bigger than the cache
+ * size, write it all out.
+ */
- if (n > wcp->alloc_size ) {
- ssize_t ret = real_write_file(fsp, data, pos, n);
- if (ret == -1)
- return -1;
+ if (n > wcp->alloc_size ) {
+ ssize_t ret = real_write_file(fsp, data, pos, n);
+ if (ret == -1)
+ return -1;
- if (pos + ret > wcp->file_size)
- fsp->size = wcp->file_size = pos + n;
+ if (pos + ret > wcp->file_size)
+ fsp->size = wcp->file_size = pos + n;
- DO_PROFILE_INC(writecache_direct_writes);
- return total_written + n;
- }
+ DO_PROFILE_INC(writecache_direct_writes);
+ return total_written + n;
+ }
- /*
- * If there's any data left, cache it.
- */
+ /*
+ * If there's any data left, cache it.
+ */
- if (n) {
+ if (n) {
#ifdef WITH_PROFILE
- if (wcp->data_size) {
- DO_PROFILE_INC(writecache_abutted_writes);
- } else {
- DO_PROFILE_INC(writecache_init_writes);
- }
+ if (wcp->data_size) {
+ DO_PROFILE_INC(writecache_abutted_writes);
+ } else {
+ DO_PROFILE_INC(writecache_init_writes);
+ }
#endif
- memcpy(wcp->data+wcp->data_size, data, n);
- if (wcp->data_size == 0) {
- wcp->offset = pos;
- DO_PROFILE_INC(writecache_num_write_caches);
- }
- wcp->data_size += n;
-
- /*
- * Update the file size if changed.
- */
-
- if (wcp->offset + wcp->data_size > wcp->file_size)
- fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
- DEBUG(9,("wcp->offset = %.0f wcp->data_size = %u cache return %u\n",
- (double)wcp->offset, (unsigned int)wcp->data_size, (unsigned int)n));
-
- total_written += n;
- return total_written; /* .... that's a write :) */
- }
+ memcpy(wcp->data+wcp->data_size, data, n);
+ if (wcp->data_size == 0) {
+ wcp->offset = pos;
+ DO_PROFILE_INC(writecache_num_write_caches);
+ }
+ wcp->data_size += n;
+
+ /*
+ * Update the file size if changed.
+ */
+
+ if (wcp->offset + wcp->data_size > wcp->file_size)
+ fsp->size = wcp->file_size = wcp->offset + wcp->data_size;
+ DEBUG(9,("wcp->offset = %.0f wcp->data_size = %u cache return %u\n",
+ (double)wcp->offset, (unsigned int)wcp->data_size, (unsigned int)n));
+
+ total_written += n;
+ return total_written; /* .... that's a write :) */
+ }
- return total_written;
+ return total_written;
}
/****************************************************************************
@@ -527,24 +525,23 @@ n = %u, wcp->offset=%.0f, wcp->data_size=%u\n",
void delete_write_cache(files_struct *fsp)
{
- write_cache *wcp;
-
- if(!fsp)
- return;
+ write_cache *wcp;
- if(!(wcp = fsp->wcp))
- return;
+ if(!fsp)
+ return;
- DO_PROFILE_DEC(writecache_allocated_write_caches);
- allocated_write_caches--;
+ if(!(wcp = fsp->wcp))
+ return;
- SMB_ASSERT(wcp->data_size == 0);
+ DO_PROFILE_DEC(writecache_allocated_write_caches);
+ allocated_write_caches--;
- SAFE_FREE(wcp->data);
- SAFE_FREE(fsp->wcp);
+ SMB_ASSERT(wcp->data_size == 0);
- DEBUG(10,("delete_write_cache: File %s deleted write cache\n", fsp->fsp_name ));
+ SAFE_FREE(wcp->data);
+ SAFE_FREE(fsp->wcp);
+ DEBUG(10,("delete_write_cache: File %s deleted write cache\n", fsp->fsp_name ));
}
/****************************************************************************
@@ -553,41 +550,41 @@ void delete_write_cache(files_struct *fsp)
static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size)
{
- ssize_t alloc_size = lp_write_cache_size(SNUM(fsp->conn));
- write_cache *wcp;
-
- if (allocated_write_caches >= MAX_WRITE_CACHES)
- return False;
-
- if(alloc_size == 0 || fsp->wcp)
- return False;
-
- if((wcp = (write_cache *)malloc(sizeof(write_cache))) == NULL) {
- DEBUG(0,("setup_write_cache: malloc fail.\n"));
- return False;
- }
-
- wcp->file_size = file_size;
- wcp->offset = 0;
- wcp->alloc_size = alloc_size;
- wcp->data_size = 0;
- if((wcp->data = malloc(wcp->alloc_size)) == NULL) {
- DEBUG(0,("setup_write_cache: malloc fail for buffer size %u.\n",
- (unsigned int)wcp->alloc_size ));
- SAFE_FREE(wcp);
- return False;
- }
-
- memset(wcp->data, '\0', wcp->alloc_size );
-
- fsp->wcp = wcp;
- DO_PROFILE_INC(writecache_allocated_write_caches);
- allocated_write_caches++;
-
- DEBUG(10,("setup_write_cache: File %s allocated write cache size %u\n",
+ ssize_t alloc_size = lp_write_cache_size(SNUM(fsp->conn));
+ write_cache *wcp;
+
+ if (allocated_write_caches >= MAX_WRITE_CACHES)
+ return False;
+
+ if(alloc_size == 0 || fsp->wcp)
+ return False;
+
+ if((wcp = (write_cache *)malloc(sizeof(write_cache))) == NULL) {
+ DEBUG(0,("setup_write_cache: malloc fail.\n"));
+ return False;
+ }
+
+ wcp->file_size = file_size;
+ wcp->offset = 0;
+ wcp->alloc_size = alloc_size;
+ wcp->data_size = 0;
+ if((wcp->data = malloc(wcp->alloc_size)) == NULL) {
+ DEBUG(0,("setup_write_cache: malloc fail for buffer size %u.\n",
+ (unsigned int)wcp->alloc_size ));
+ SAFE_FREE(wcp);
+ return False;
+ }
+
+ memset(wcp->data, '\0', wcp->alloc_size );
+
+ fsp->wcp = wcp;
+ DO_PROFILE_INC(writecache_allocated_write_caches);
+ allocated_write_caches++;
+
+ DEBUG(10,("setup_write_cache: File %s allocated write cache size %u\n",
fsp->fsp_name, wcp->alloc_size ));
- return True;
+ return True;
}
/****************************************************************************
@@ -596,17 +593,17 @@ static BOOL setup_write_cache(files_struct *fsp, SMB_OFF_T file_size)
void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size)
{
- fsp->size = file_size;
- if(fsp->wcp) {
- /* The cache *must* have been flushed before we do this. */
- if (fsp->wcp->data_size != 0) {
- pstring msg;
- slprintf(msg, sizeof(msg)-1, "set_filelen_write_cache: size change \
+ fsp->size = file_size;
+ if(fsp->wcp) {
+ /* The cache *must* have been flushed before we do this. */
+ if (fsp->wcp->data_size != 0) {
+ pstring msg;
+ slprintf(msg, sizeof(msg)-1, "set_filelen_write_cache: size change \
on file %s with write cache size = %u\n", fsp->fsp_name, fsp->wcp->data_size );
- smb_panic(msg);
- }
- fsp->wcp->file_size = file_size;
- }
+ smb_panic(msg);
+ }
+ fsp->wcp->file_size = file_size;
+ }
}
/*******************************************************************
@@ -615,36 +612,36 @@ on file %s with write cache size = %u\n", fsp->fsp_name, fsp->wcp->data_size );
ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason)
{
- write_cache *wcp = fsp->wcp;
- size_t data_size;
- ssize_t ret;
+ write_cache *wcp = fsp->wcp;
+ size_t data_size;
+ ssize_t ret;
- if(!wcp || !wcp->data_size)
- return 0;
+ if(!wcp || !wcp->data_size)
+ return 0;
- data_size = wcp->data_size;
- wcp->data_size = 0;
+ data_size = wcp->data_size;
+ wcp->data_size = 0;
- DO_PROFILE_DEC_INC(writecache_num_write_caches,writecache_flushed_writes[reason]);
+ DO_PROFILE_DEC_INC(writecache_num_write_caches,writecache_flushed_writes[reason]);
- DEBUG(9,("flushing write cache: fd = %d, off=%.0f, size=%u\n",
- fsp->fd, (double)wcp->offset, (unsigned int)data_size));
+ DEBUG(9,("flushing write cache: fd = %d, off=%.0f, size=%u\n",
+ fsp->fd, (double)wcp->offset, (unsigned int)data_size));
#ifdef WITH_PROFILE
- if(data_size == wcp->alloc_size)
- DO_PROFILE_INC(writecache_num_perfect_writes);
+ if(data_size == wcp->alloc_size)
+ DO_PROFILE_INC(writecache_num_perfect_writes);
#endif
- ret = real_write_file(fsp, wcp->data, wcp->offset, data_size);
+ ret = real_write_file(fsp, wcp->data, wcp->offset, data_size);
- /*
- * Ensure file size if kept up to date if write extends file.
- */
+ /*
+ * Ensure file size if kept up to date if write extends file.
+ */
- if ((ret != -1) && (wcp->offset + ret > wcp->file_size))
- wcp->file_size = wcp->offset + ret;
+ if ((ret != -1) && (wcp->offset + ret > wcp->file_size))
+ wcp->file_size = wcp->offset + ret;
- return ret;
+ return ret;
}
/*******************************************************************
@@ -653,8 +650,21 @@ sync a file
void sync_file(connection_struct *conn, files_struct *fsp)
{
- if(lp_strict_sync(SNUM(conn)) && fsp->fd != -1) {
- flush_write_cache(fsp, SYNC_FLUSH);
- conn->vfs_ops.fsync(fsp,fsp->fd);
- }
+ if(lp_strict_sync(SNUM(conn)) && fsp->fd != -1) {
+ flush_write_cache(fsp, SYNC_FLUSH);
+ conn->vfs_ops.fsync(fsp,fsp->fd);
+ }
+}
+
+
+/************************************************************
+ Perform a stat whether a valid fd or not.
+************************************************************/
+
+int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst)
+{
+ if (fsp->fd == -1)
+ return vfs_stat(fsp->conn, fsp->fsp_name, pst);
+ else
+ return vfs_fstat(fsp,fsp->fd, pst);
}
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index 601c488fc9c..90c3db1f9c7 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -74,7 +74,7 @@ static BOOL fname_equal(char *name1, char *name2)
/****************************************************************************
Mangle the 2nd name and check if it is then equal to the first name.
****************************************************************************/
-static BOOL mangled_equal(char *name1, char *name2)
+static BOOL mangled_equal(char *name1, char *name2, int snum)
{
pstring tmpname;
@@ -82,7 +82,11 @@ static BOOL mangled_equal(char *name1, char *name2)
return(False);
pstrcpy(tmpname,name2);
+#if 1
mangle_name_83(tmpname);
+#else
+ name_map_mangle(tmpname,True,False,snum);
+#endif
return(strequal(name1,tmpname));
}
@@ -438,7 +442,7 @@ BOOL check_name(char *name,connection_struct *conn)
#ifdef S_ISLNK
if (!lp_symlinks(SNUM(conn))) {
SMB_STRUCT_STAT statbuf;
- if ( (conn->vfs_ops.lstat(conn,dos_to_unix(name,False),&statbuf) != -1) &&
+ if ( (conn->vfs_ops.lstat(conn,dos_to_unix_static(name),&statbuf) != -1) &&
(S_ISLNK(statbuf.st_mode)) ) {
DEBUG(3,("check_name: denied: file path name %s is a symlink\n",name));
ret=0;
@@ -515,7 +519,7 @@ static BOOL scan_directory(char *path, char *name,connection_struct *conn,BOOL d
* against unmangled name.
*/
- if ((mangled && mangled_equal(name,name2)) || fname_equal(name, dname)) {
+ if ((mangled && mangled_equal(name,name2,SNUM(conn))) || fname_equal(name, dname)) {
/* we've found the file, change it's name and return */
if (docache)
DirCacheAdd(path,name,dname,SNUM(conn));
diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c
index 70d79a5f566..718810726cc 100644
--- a/source/smbd/lanman.c
+++ b/source/smbd/lanman.c
@@ -460,7 +460,7 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel,
PACKI(desc,"W",queue->job); /* uJobId */
if (uLevel == 1) {
- PACKS(desc,"B21",dos_to_unix(queue->user,False)); /* szUserName */
+ PACKS(desc,"B21",dos_to_unix_static(queue->fs_user)); /* szUserName */
PACKS(desc,"B",""); /* pad */
PACKS(desc,"B16",""); /* szNotifyName */
PACKS(desc,"B10","PM_Q_RAW"); /* szDataType */
@@ -470,17 +470,17 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel,
PACKS(desc,"z",""); /* pszStatus */
PACKI(desc,"D",t); /* ulSubmitted */
PACKI(desc,"D",queue->size); /* ulSize */
- PACKS(desc,"z",dos_to_unix(queue->file,False)); /* pszComment */
+ PACKS(desc,"z",dos_to_unix_static(queue->fs_file)); /* pszComment */
}
if (uLevel == 2 || uLevel == 3 || uLevel == 4) {
PACKI(desc,"W",queue->priority); /* uPriority */
- PACKS(desc,"z",dos_to_unix(queue->user,False)); /* pszUserName */
+ PACKS(desc,"z",dos_to_unix_static(queue->fs_user)); /* pszUserName */
PACKI(desc,"W",n+1); /* uPosition */
PACKI(desc,"W",printj_status(queue->status)); /* fsStatus */
PACKI(desc,"D",t); /* ulSubmitted */
PACKI(desc,"D",queue->size); /* ulSize */
PACKS(desc,"z","Samba"); /* pszComment */
- PACKS(desc,"z",dos_to_unix(queue->file,False)); /* pszDocument */
+ PACKS(desc,"z",dos_to_unix_static(queue->fs_file)); /* pszDocument */
if (uLevel == 3) {
PACKS(desc,"z",""); /* pszNotifyName */
PACKS(desc,"z","PM_Q_RAW"); /* pszDataType */
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c
index 3d214d46589..ee1f24931a5 100644
--- a/source/smbd/mangle.c
+++ b/source/smbd/mangle.c
@@ -125,8 +125,8 @@ static BOOL ct_initialized = False;
static ubi_cacheRoot mangled_cache[1] = { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0 } };
static BOOL mc_initialized = False;
-#define MANGLED_CACHE_MAX_ENTRIES 0
-#define MANGLED_CACHE_MAX_MEMORY 16384
+#define MANGLED_CACHE_MAX_ENTRIES 1024
+#define MANGLED_CACHE_MAX_MEMORY 0
/* -------------------------------------------------------------------------- **
@@ -289,23 +289,27 @@ static BOOL is_illegal_name( char *name )
* ************************************************************************** **
*/
BOOL is_mangled( char *s )
- {
- char *magic;
+{
+ char *magic;
+ BOOL ret = False;
+
+ if( !ct_initialized )
+ init_chartest();
+
+ magic = strchr( s, magic_char );
+ while( magic && magic[1] && magic[2] ) {
+ /* 3 chars, 1st is magic. */
+ if( ('.' == magic[3] || '/' == magic[3] || !(magic[3])) /* Ends with '.' or nul or '/' ? */
+ && isbasechar( toupper(magic[1]) ) /* is 2nd char basechar? */
+ && isbasechar( toupper(magic[2]) ) ) /* is 3rd char basechar? */
+ ret = ( True ); /* If all above, then true, */
+ magic = strchr( magic+1, magic_char ); /* else seek next magic. */
+ }
- if( !ct_initialized )
- init_chartest();
+ DEBUG(10,("is_mangled: %s : %s\n", s, ret ? "True" : "False"));
- magic = strchr( s, magic_char );
- while( magic && magic[1] && magic[2] ) /* 3 chars, 1st is magic. */
- {
- if( ('.' == magic[3] || '/' == magic[3] || !(magic[3])) /* Ends with '.' or nul or '/' ? */
- && isbasechar( toupper(magic[1]) ) /* is 2nd char basechar? */
- && isbasechar( toupper(magic[2]) ) ) /* is 3rd char basechar? */
- return( True ); /* If all above, then true, */
- magic = strchr( magic+1, magic_char ); /* else seek next magic. */
- }
- return( False );
- } /* is_mangled */
+ return ret;
+} /* is_mangled */
/* ************************************************************************** **
* Return True if the name is a valid DOS name in 8.3 DOS format.
@@ -446,6 +450,8 @@ static signed int cache_compare( ubi_btItemPtr ItemPtr, ubi_btNodePtr NodePtr )
char *Key1 = (char *)ItemPtr;
char *Key2 = (char *)(((ubi_cacheEntryPtr)NodePtr) + 1);
+ DEBUG(100,("cache_compare: %s %s\n", Key1, Key2));
+
return( StrCaseCmp( Key1, Key2 ) );
} /* cache_compare */
@@ -555,7 +561,7 @@ static void cache_mangled_name( char *mangled_name, char *raw_name )
if( s1 && (s2 = strrchr( raw_name, '.' )) )
{
i = 1;
- while( s1[i] && (tolower( s1[1] ) == s2[i]) )
+ while( s1[i] && (tolower( s1[i] ) == s2[i]) )
i++;
if( !s1[i] && !s2[i] )
{
diff --git a/source/smbd/message.c b/source/smbd/message.c
index 0097b15b8b4..8acd4e83eec 100644
--- a/source/smbd/message.c
+++ b/source/smbd/message.c
@@ -64,7 +64,7 @@ static void msg_deliver(void)
if(msgpos > 0) {
msgbuf[msgpos] = '\0'; /* Ensure null terminated. */
- pstrcpy(msgbuf,dos_to_unix(msgbuf,False));
+ pstrcpy(msgbuf,dos_to_unix_static(msgbuf));
}
for (i=0;i<msgpos;) {
diff --git a/source/smbd/negprot.c b/source/smbd/negprot.c
index 1f5de570c66..21f1cbd1b45 100644
--- a/source/smbd/negprot.c
+++ b/source/smbd/negprot.c
@@ -157,18 +157,12 @@ reply for the nt protocol
static int reply_nt1(char *outbuf)
{
/* dual names + lock_and_read + nt SMBs + remote API calls */
- int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ|CAP_LEVEL_II_OPLOCKS|CAP_STATUS32| (lp_unix_extensions() ? CAP_UNIX : 0) |
- (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) |
- ((lp_large_readwrite() && (SMB_OFF_T_BITS == 64)) ?
- CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS : 0) |
- (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0);
-
-
-/*
- other valid capabilities which we may support at some time...
- CAP_LARGE_READX|CAP_STATUS32|CAP_LEVEL_II_OPLOCKS;
- */
-
+ int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ|CAP_LEVEL_II_OPLOCKS|
+ (lp_nt_status_support() ? CAP_STATUS32 : 0)|
+ (lp_unix_extensions() ? CAP_UNIX : 0) |
+ (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) |
+ ((lp_large_readwrite() && (SMB_OFF_T_BITS == 64)) ? CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS : 0) |
+ (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0);
int secword=0;
BOOL doencrypt = SMBENCRYPT();
time_t t = time(NULL);
diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c
index 96164a3199b..beaa66b1ba3 100644
--- a/source/smbd/notify_kernel.c
+++ b/source/smbd/notify_kernel.c
@@ -124,14 +124,14 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32
int fd;
unsigned long kernel_flags;
- fd = sys_open(dos_to_unix(path,False),O_RDONLY, 0);
+ fd = sys_open(dos_to_unix_static(path),O_RDONLY, 0);
if (fd == -1) {
DEBUG(3,("Failed to open directory %s for change notify\n", path));
return NULL;
}
- if (fcntl(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) {
+ if (sys_fcntl_long(fd, F_SETSIG, RT_SIGNAL_NOTIFY) == -1) {
DEBUG(3,("Failed to set signal handler for change notify\n"));
return NULL;
}
@@ -148,7 +148,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32
if (flags & FILE_NOTIFY_CHANGE_EA) kernel_flags |= DN_ATTRIB;
if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE;
- if (fcntl(fd, F_NOTIFY, kernel_flags) == -1) {
+ if (sys_fcntl_long(fd, F_NOTIFY, kernel_flags) == -1) {
DEBUG(3,("Failed to set async flag for change notify\n"));
return NULL;
}
@@ -169,7 +169,7 @@ static BOOL kernel_notify_available(void)
int fd, ret;
fd = open("/tmp", O_RDONLY);
if (fd == -1) return False; /* uggh! */
- ret = fcntl(fd, F_NOTIFY, 0);
+ ret = sys_fcntl_long(fd, F_NOTIFY, 0);
close(fd);
return ret == 0;
}
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 110d7ed7d26..c05be55e39e 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -332,17 +332,17 @@ static BOOL saved_short_case_preserve;
static void set_posix_case_semantics(uint32 file_attributes)
{
- if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS))
- return;
+ if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS))
+ return;
- saved_case_sensitive = case_sensitive;
- saved_case_preserve = case_preserve;
- saved_short_case_preserve = short_case_preserve;
+ saved_case_sensitive = case_sensitive;
+ saved_case_preserve = case_preserve;
+ saved_short_case_preserve = short_case_preserve;
- /* Set to POSIX. */
- case_sensitive = True;
- case_preserve = True;
- short_case_preserve = True;
+ /* Set to POSIX. */
+ case_sensitive = True;
+ case_preserve = True;
+ short_case_preserve = True;
}
/****************************************************************************
@@ -351,12 +351,12 @@ static void set_posix_case_semantics(uint32 file_attributes)
static void restore_case_semantics(uint32 file_attributes)
{
- if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS))
- return;
+ if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS))
+ return;
- case_sensitive = saved_case_sensitive;
- case_preserve = saved_case_preserve;
- short_case_preserve = saved_short_case_preserve;
+ case_sensitive = saved_case_sensitive;
+ case_preserve = saved_case_preserve;
+ short_case_preserve = saved_short_case_preserve;
}
/****************************************************************************
@@ -365,179 +365,172 @@ static void restore_case_semantics(uint32 file_attributes)
static int map_create_disposition( uint32 create_disposition)
{
- int ret;
-
- switch( create_disposition ) {
- case FILE_CREATE:
- /* create if not exist, fail if exist */
- ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_FAIL);
- break;
- case FILE_SUPERSEDE:
- case FILE_OVERWRITE_IF:
- /* create if not exist, trunc if exist */
- ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE);
- break;
- case FILE_OPEN:
- /* fail if not exist, open if exists */
- ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN);
- break;
- case FILE_OPEN_IF:
- /* create if not exist, open if exists */
- ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_OPEN);
- break;
- case FILE_OVERWRITE:
- /* fail if not exist, truncate if exists */
- ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE);
- break;
- default:
- DEBUG(0,("map_create_disposition: Incorrect value for create_disposition = %d\n",
- create_disposition ));
- return -1;
- }
+ int ret;
+
+ switch( create_disposition ) {
+ case FILE_CREATE:
+ /* create if not exist, fail if exist */
+ ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_FAIL);
+ break;
+ case FILE_SUPERSEDE:
+ case FILE_OVERWRITE_IF:
+ /* create if not exist, trunc if exist */
+ ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE);
+ break;
+ case FILE_OPEN:
+ /* fail if not exist, open if exists */
+ ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN);
+ break;
+ case FILE_OPEN_IF:
+ /* create if not exist, open if exists */
+ ret = (FILE_CREATE_IF_NOT_EXIST|FILE_EXISTS_OPEN);
+ break;
+ case FILE_OVERWRITE:
+ /* fail if not exist, truncate if exists */
+ ret = (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_TRUNCATE);
+ break;
+ default:
+ DEBUG(0,("map_create_disposition: Incorrect value for create_disposition = %d\n",
+ create_disposition ));
+ return -1;
+ }
- DEBUG(10,("map_create_disposition: Mapped create_disposition 0x%lx to 0x%x\n",
- (unsigned long)create_disposition, ret ));
+ DEBUG(10,("map_create_disposition: Mapped create_disposition 0x%lx to 0x%x\n",
+ (unsigned long)create_disposition, ret ));
- return ret;
+ return ret;
}
/****************************************************************************
Utility function to map share modes.
****************************************************************************/
-static int map_share_mode( BOOL *pstat_open_only, char *fname, uint32 create_options,
- uint32 desired_access, uint32 share_access, uint32 file_attributes)
+static int map_share_mode( char *fname, uint32 create_options,
+ uint32 *desired_access, uint32 share_access, uint32 file_attributes)
{
- int smb_open_mode = -1;
-
- *pstat_open_only = False;
+ int smb_open_mode = -1;
- /*
- * Convert GENERIC bits to specific bits.
- */
+ /*
+ * Convert GENERIC bits to specific bits.
+ */
- se_map_generic(&desired_access, &file_generic_mapping);
-
- switch( desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA) ) {
- case FILE_READ_DATA:
- smb_open_mode = DOS_OPEN_RDONLY;
- break;
- case FILE_WRITE_DATA:
- case FILE_APPEND_DATA:
- case FILE_WRITE_DATA|FILE_APPEND_DATA:
- smb_open_mode = DOS_OPEN_WRONLY;
- break;
- case FILE_READ_DATA|FILE_WRITE_DATA:
- case FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA:
- case FILE_READ_DATA|FILE_APPEND_DATA:
- smb_open_mode = DOS_OPEN_RDWR;
- break;
- }
+ se_map_generic(desired_access, &file_generic_mapping);
- /*
- * NB. For DELETE_ACCESS we should really check the
- * directory permissions, as that is what controls
- * delete, and for WRITE_DAC_ACCESS we should really
- * check the ownership, as that is what controls the
- * chmod. Note that this is *NOT* a security hole (this
- * note is for you, Andrew) as we are not *allowing*
- * the access at this point, the actual unlink or
- * chown or chmod call would do this. We are just helping
- * clients out by telling them if they have a hope
- * of any of this succeeding. POSIX acls may still
- * deny the real call. JRA.
- */
+ switch( *desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA) ) {
+ case FILE_READ_DATA:
+ smb_open_mode = DOS_OPEN_RDONLY;
+ break;
+ case FILE_WRITE_DATA:
+ case FILE_APPEND_DATA:
+ case FILE_WRITE_DATA|FILE_APPEND_DATA:
+ smb_open_mode = DOS_OPEN_WRONLY;
+ break;
+ case FILE_READ_DATA|FILE_WRITE_DATA:
+ case FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA:
+ case FILE_READ_DATA|FILE_APPEND_DATA:
+ smb_open_mode = DOS_OPEN_RDWR;
+ break;
+ }
- if (smb_open_mode == -1) {
+ /*
+ * NB. For DELETE_ACCESS we should really check the
+ * directory permissions, as that is what controls
+ * delete, and for WRITE_DAC_ACCESS we should really
+ * check the ownership, as that is what controls the
+ * chmod. Note that this is *NOT* a security hole (this
+ * note is for you, Andrew) as we are not *allowing*
+ * the access at this point, the actual unlink or
+ * chown or chmod call would do this. We are just helping
+ * clients out by telling them if they have a hope
+ * of any of this succeeding. POSIX acls may still
+ * deny the real call. JRA.
+ */
- if(desired_access == WRITE_DAC_ACCESS || desired_access == READ_CONTROL_ACCESS)
- *pstat_open_only = True;
+ if (smb_open_mode == -1) {
- if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|
- FILE_EXECUTE|FILE_READ_ATTRIBUTES|
- FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS|
- FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) {
- smb_open_mode = DOS_OPEN_RDONLY;
- } else if(desired_access == 0) {
+ if(*desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|
+ FILE_EXECUTE|FILE_READ_ATTRIBUTES|
+ FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS|
+ FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) {
+ smb_open_mode = DOS_OPEN_RDONLY;
+ } else if(*desired_access == 0) {
- /*
- * JRA - NT seems to sometimes send desired_access as zero. play it safe
- * and map to a stat open.
- */
+ /*
+ * JRA - NT seems to sometimes send desired_access as zero. play it safe
+ * and map to a stat open.
+ */
- *pstat_open_only = True;
- smb_open_mode = DOS_OPEN_RDONLY;
+ smb_open_mode = DOS_OPEN_RDONLY;
- } else {
- DEBUG(0,("map_share_mode: Incorrect value 0x%lx for desired_access to file %s\n",
- (unsigned long)desired_access, fname));
- return -1;
- }
- }
+ } else {
+ DEBUG(0,("map_share_mode: Incorrect value 0x%lx for desired_access to file %s\n",
+ (unsigned long)*desired_access, fname));
+ return -1;
+ }
+ }
- /*
- * Set the special bit that means allow share delete.
- * This is held outside the normal share mode bits at 1<<15.
- * JRA.
- */
+ /*
+ * Set the special bit that means allow share delete.
+ * This is held outside the normal share mode bits at 1<<15.
+ * JRA.
+ */
- if(share_access & FILE_SHARE_DELETE) {
- smb_open_mode |= ALLOW_SHARE_DELETE;
- DEBUG(10,("map_share_mode: FILE_SHARE_DELETE requested. open_mode = 0x%x\n", smb_open_mode));
- }
+ if(share_access & FILE_SHARE_DELETE) {
+ smb_open_mode |= ALLOW_SHARE_DELETE;
+ DEBUG(10,("map_share_mode: FILE_SHARE_DELETE requested. open_mode = 0x%x\n", smb_open_mode));
+ }
- /*
- * We need to store the intent to open for Delete. This
- * is what determines if a delete on close flag can be set.
- * This is the wrong way (and place) to store this, but for 2.2 this
- * is the only practical way. JRA.
- */
+ /*
+ * We need to store the intent to open for Delete. This
+ * is what determines if a delete on close flag can be set.
+ * This is the wrong way (and place) to store this, but for 2.2 this
+ * is the only practical way. JRA.
+ */
- if(desired_access & DELETE_ACCESS) {
- smb_open_mode |= DELETE_ACCESS_REQUESTED;
- DEBUG(10,("map_share_mode: DELETE_ACCESS requested. open_mode = 0x%x\n", smb_open_mode));
- }
+ if(*desired_access & DELETE_ACCESS) {
+ DEBUG(10,("map_share_mode: DELETE_ACCESS requested. open_mode = 0x%x\n", smb_open_mode));
+ }
- if (create_options & FILE_DELETE_ON_CLOSE) {
- /* Implicit delete access requested... */
- smb_open_mode |= DELETE_ACCESS_REQUESTED;
- smb_open_mode |= DELETE_ON_CLOSE_FLAG;
- DEBUG(10,("map_share_mode: FILE_DELETE_ON_CLOSE requested. open_mode = 0x%x\n", smb_open_mode));
- }
+ if (create_options & FILE_DELETE_ON_CLOSE) {
+ /* Implicit delete access is *NOT* requested... */
+ smb_open_mode |= DELETE_ON_CLOSE_FLAG;
+ DEBUG(10,("map_share_mode: FILE_DELETE_ON_CLOSE requested. open_mode = 0x%x\n", smb_open_mode));
+ }
- /* Add in the requested share mode. */
- switch( share_access & (FILE_SHARE_READ|FILE_SHARE_WRITE)) {
- case FILE_SHARE_READ:
- smb_open_mode |= SET_DENY_MODE(DENY_WRITE);
- break;
- case FILE_SHARE_WRITE:
- smb_open_mode |= SET_DENY_MODE(DENY_READ);
- break;
- case (FILE_SHARE_READ|FILE_SHARE_WRITE):
- smb_open_mode |= SET_DENY_MODE(DENY_NONE);
- break;
- case FILE_SHARE_NONE:
- smb_open_mode |= SET_DENY_MODE(DENY_ALL);
- break;
- }
+ /* Add in the requested share mode. */
+ switch( share_access & (FILE_SHARE_READ|FILE_SHARE_WRITE)) {
+ case FILE_SHARE_READ:
+ smb_open_mode |= SET_DENY_MODE(DENY_WRITE);
+ break;
+ case FILE_SHARE_WRITE:
+ smb_open_mode |= SET_DENY_MODE(DENY_READ);
+ break;
+ case (FILE_SHARE_READ|FILE_SHARE_WRITE):
+ smb_open_mode |= SET_DENY_MODE(DENY_NONE);
+ break;
+ case FILE_SHARE_NONE:
+ smb_open_mode |= SET_DENY_MODE(DENY_ALL);
+ break;
+ }
- /*
- * Handle an O_SYNC request.
- */
+ /*
+ * Handle an O_SYNC request.
+ */
- if(file_attributes & FILE_FLAG_WRITE_THROUGH)
- smb_open_mode |= FILE_SYNC_OPENMODE;
+ if(file_attributes & FILE_FLAG_WRITE_THROUGH)
+ smb_open_mode |= FILE_SYNC_OPENMODE;
- DEBUG(10,("map_share_mode: Mapped desired access 0x%lx, share access 0x%lx, file attributes 0x%lx \
-to open_mode 0x%x\n", (unsigned long)desired_access, (unsigned long)share_access,
- (unsigned long)file_attributes, smb_open_mode ));
+ DEBUG(10,("map_share_mode: Mapped desired access 0x%lx, share access 0x%lx, file attributes 0x%lx \
+to open_mode 0x%x\n", (unsigned long)*desired_access, (unsigned long)share_access,
+ (unsigned long)file_attributes, smb_open_mode ));
- return smb_open_mode;
+ return smb_open_mode;
}
/****************************************************************************
Reply to an NT create and X call on a pipe.
****************************************************************************/
+
static int nt_open_pipe(char *fname, connection_struct *conn,
char *inbuf, char *outbuf, int *ppnum)
{
@@ -551,7 +544,7 @@ static int nt_open_pipe(char *fname, connection_struct *conn,
/* See if it is one we want to handle. */
if (lp_disable_spoolss() && strequal(fname, "\\spoolss"))
- return(ERROR_DOS(ERRSRV,ERRaccess));
+ return(ERROR_BOTH(NT_STATUS_OBJECT_NAME_NOT_FOUND,ERRDOS,ERRbadpipe));
for( i = 0; known_nt_pipes[i]; i++ )
if( strequal(fname,known_nt_pipes[i]))
@@ -650,7 +643,6 @@ int reply_ntcreate_and_X(connection_struct *conn,
BOOL bad_path = False;
files_struct *fsp=NULL;
char *p = NULL;
- BOOL stat_open_only = False;
time_t c_time;
START_PROFILE(SMBntcreateX);
@@ -694,13 +686,14 @@ int reply_ntcreate_and_X(connection_struct *conn,
}
if(!dir_fsp->is_directory) {
+
+ get_filename(&fname[0], inbuf, smb_buf(inbuf)-inbuf,
+ smb_buflen(inbuf),fname_len);
+
/*
* Check to see if this is a mac fork of some kind.
*/
- get_filename(&fname[0], inbuf, smb_buf(inbuf)-inbuf,
- smb_buflen(inbuf),fname_len);
-
if( strchr(fname, ':')) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
@@ -742,6 +735,15 @@ int reply_ntcreate_and_X(connection_struct *conn,
get_filename(fname, inbuf, smb_buf(inbuf)-inbuf,
smb_buflen(inbuf),fname_len);
+
+ /*
+ * Check to see if this is a mac fork of some kind.
+ */
+
+ if( strchr(fname, ':')) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ }
}
/*
@@ -750,7 +752,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
*/
RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
- if((smb_open_mode = map_share_mode(&stat_open_only, fname, create_options, desired_access,
+ if((smb_open_mode = map_share_mode(fname, create_options, &desired_access,
share_access,
file_attributes)) == -1) {
END_PROFILE(SMBntcreateX);
@@ -758,7 +760,9 @@ int reply_ntcreate_and_X(connection_struct *conn,
}
oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
- oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+ if (oplock_request) {
+ oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+ }
/*
* Ordinary file or directory.
@@ -781,7 +785,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
if(create_options & FILE_DIRECTORY_FILE) {
oplock_request = 0;
- fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action);
+ fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action);
restore_case_semantics(file_attributes);
@@ -808,8 +812,11 @@ int reply_ntcreate_and_X(connection_struct *conn,
* before issuing an oplock break request to
* our client. JRA. */
- fsp = open_file_shared(conn,fname,&sbuf,smb_open_mode,
- smb_ofun,unixmode, oplock_request,&rmode,&smb_action);
+ fsp = open_file_shared1(conn,fname,&sbuf,
+ desired_access,
+ smb_open_mode,
+ smb_ofun, unixmode, oplock_request,
+ &rmode,&smb_action);
if (!fsp) {
/* We cheat here. There are two cases we
@@ -846,7 +853,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
}
oplock_request = 0;
- fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action);
+ fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action);
if(!fsp) {
restore_case_semantics(file_attributes);
@@ -854,26 +861,6 @@ int reply_ntcreate_and_X(connection_struct *conn,
END_PROFILE(SMBntcreateX);
return(UNIXERROR(ERRDOS,ERRnoaccess));
}
-#ifdef EROFS
- } else if (((errno == EACCES) || (errno == EROFS)) && stat_open_only) {
-#else /* !EROFS */
- } else if (errno == EACCES && stat_open_only) {
-#endif
- /*
- * We couldn't open normally and all we want
- * are the permissions. Try and do a stat open.
- */
-
- oplock_request = 0;
-
- fsp = open_file_stat(conn,fname,&sbuf,smb_open_mode,&smb_action);
-
- if(!fsp) {
- restore_case_semantics(file_attributes);
- END_PROFILE(SMBntcreateX);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
- }
-
} else {
restore_case_semantics(file_attributes);
@@ -909,8 +896,8 @@ int reply_ntcreate_and_X(connection_struct *conn,
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
smb_action |= EXTENDED_OPLOCK_GRANTED;
-#if 1 /* JRATEST */
- /* W2K sends back 42 words here ! */
+#if 0
+ /* W2K sends back 42 words here ! If we do the same it breaks offline sync. Go figure... ? JRA. */
set_message(outbuf,42,0,True);
#else
set_message(outbuf,34,0,True);
@@ -923,12 +910,17 @@ int reply_ntcreate_and_X(connection_struct *conn,
* exclusive & batch here.
*/
- if (smb_action & EXTENDED_OPLOCK_GRANTED)
- SCVAL(p,0, BATCH_OPLOCK_RETURN);
- else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type))
+ if (smb_action & EXTENDED_OPLOCK_GRANTED) {
+ if (flags & REQUEST_BATCH_OPLOCK) {
+ SCVAL(p,0, BATCH_OPLOCK_RETURN);
+ } else {
+ SCVAL(p,0, EXCLUSIVE_OPLOCK_RETURN);
+ }
+ } else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type)) {
SCVAL(p,0, LEVEL_II_OPLOCK_RETURN);
- else
+ } else {
SCVAL(p,0,NO_OPLOCK_RETURN);
+ }
p++;
SSVAL(p,0,fsp->fnum);
@@ -956,7 +948,7 @@ int reply_ntcreate_and_X(connection_struct *conn,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p, 0, file_len);
+ SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len));
p += 8;
SOFF_T(p,0,file_len);
p += 12;
@@ -1000,8 +992,8 @@ static int do_nt_transact_create_pipe( connection_struct *conn,
get_filename_transact(&fname[0], params, 53,
total_parameter_count - 53 - fname_len, fname_len);
- if ((ret = nt_open_pipe(fname, conn, inbuf, outbuf, &pnum)) != 0)
- return ret;
+ if ((ret = nt_open_pipe(fname, conn, inbuf, outbuf, &pnum)) != 0)
+ return ret;
/* Realloc the size of parameters and data we will return */
params = Realloc(*ppparams, 69);
@@ -1123,337 +1115,321 @@ static int call_nt_transact_create(connection_struct *conn,
int bufsize, char **ppsetup, char **ppparams,
char **ppdata)
{
- pstring fname;
- char *params = *ppparams;
- char *data = *ppdata;
- int total_parameter_count = (int)IVAL(inbuf, smb_nt_TotalParameterCount);
- /* Breakout the oplock request bits so we can set the
- reply bits separately. */
- int oplock_request = 0;
- mode_t unixmode;
- int fmode=0,rmode=0;
- SMB_OFF_T file_len = 0;
- SMB_STRUCT_STAT sbuf;
- int smb_action = 0;
- BOOL bad_path = False;
- files_struct *fsp = NULL;
- char *p = NULL;
- BOOL stat_open_only = False;
- uint32 flags;
- uint32 desired_access;
- uint32 file_attributes;
- uint32 share_access;
- uint32 create_disposition;
- uint32 create_options;
- uint32 fname_len;
- uint32 sd_len;
- uint16 root_dir_fid;
- int smb_ofun;
- int smb_open_mode;
- int smb_attr;
- int error_class;
- uint32 error_code;
- time_t c_time;
-
- DEBUG(5,("call_nt_transact_create\n"));
+ pstring fname;
+ char *params = *ppparams;
+ char *data = *ppdata;
+ int total_parameter_count = (int)IVAL(inbuf, smb_nt_TotalParameterCount);
+ /* Breakout the oplock request bits so we can set the reply bits separately. */
+ int oplock_request = 0;
+ mode_t unixmode;
+ int fmode=0,rmode=0;
+ SMB_OFF_T file_len = 0;
+ SMB_STRUCT_STAT sbuf;
+ int smb_action = 0;
+ BOOL bad_path = False;
+ files_struct *fsp = NULL;
+ char *p = NULL;
+ uint32 flags;
+ uint32 desired_access;
+ uint32 file_attributes;
+ uint32 share_access;
+ uint32 create_disposition;
+ uint32 create_options;
+ uint32 fname_len;
+ uint32 sd_len;
+ uint16 root_dir_fid;
+ int smb_ofun;
+ int smb_open_mode;
+ int smb_attr;
+ int error_class;
+ uint32 error_code;
+ time_t c_time;
- /*
- * If it's an IPC, use the pipe handler.
- */
+ DEBUG(5,("call_nt_transact_create\n"));
- if (IS_IPC(conn)) {
+ /*
+ * If it's an IPC, use the pipe handler.
+ */
+
+ if (IS_IPC(conn)) {
if (lp_nt_pipe_support())
return do_nt_transact_create_pipe(conn, inbuf, outbuf, length,
bufsize, ppsetup, ppparams, ppdata);
else
return ERROR_DOS(ERRDOS,ERRbadaccess);
- }
+ }
- /*
- * Ensure minimum number of parameters sent.
- */
+ /*
+ * Ensure minimum number of parameters sent.
+ */
- if(total_parameter_count < 54) {
- DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count));
- return ERROR_DOS(ERRDOS,ERRbadaccess);
- }
+ if(total_parameter_count < 54) {
+ DEBUG(0,("call_nt_transact_create - insufficient parameters (%u)\n", (unsigned int)total_parameter_count));
+ return ERROR_DOS(ERRDOS,ERRbadaccess);
+ }
- flags = IVAL(params,0);
- desired_access = IVAL(params,8);
- file_attributes = IVAL(params,20);
- share_access = IVAL(params,24);
- create_disposition = IVAL(params,28);
- create_options = IVAL(params,32);
- sd_len = IVAL(params,36);
- fname_len = MIN(((uint32)IVAL(params,44)),((uint32)sizeof(fname)-1));
- root_dir_fid = (uint16)IVAL(params,4);
- smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK);
+ flags = IVAL(params,0);
+ desired_access = IVAL(params,8);
+ file_attributes = IVAL(params,20);
+ share_access = IVAL(params,24);
+ create_disposition = IVAL(params,28);
+ create_options = IVAL(params,32);
+ sd_len = IVAL(params,36);
+ fname_len = MIN(((uint32)IVAL(params,44)),((uint32)sizeof(fname)-1));
+ root_dir_fid = (uint16)IVAL(params,4);
+ smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK);
- /*
- * We need to construct the open_and_X ofun value from the
- * NT values, as that's what our code is structured to accept.
- */
+ /*
+ * We need to construct the open_and_X ofun value from the
+ * NT values, as that's what our code is structured to accept.
+ */
- if((smb_ofun = map_create_disposition( create_disposition )) == -1)
- return ERROR_DOS(ERRDOS,ERRbadmem);
+ if((smb_ofun = map_create_disposition( create_disposition )) == -1)
+ return ERROR_DOS(ERRDOS,ERRbadmem);
- /*
- * Get the file name.
- */
+ /*
+ * Get the file name.
+ */
- if(root_dir_fid != 0) {
- /*
- * This filename is relative to a directory fid.
- */
+ if(root_dir_fid != 0) {
+ /*
+ * This filename is relative to a directory fid.
+ */
- files_struct *dir_fsp = file_fsp(params,4);
- size_t dir_name_len;
+ files_struct *dir_fsp = file_fsp(params,4);
+ size_t dir_name_len;
- if(!dir_fsp)
- return ERROR_DOS(ERRDOS,ERRbadfid);
+ if(!dir_fsp)
+ return ERROR_DOS(ERRDOS,ERRbadfid);
- if(!dir_fsp->is_directory) {
- /*
- * Check to see if this is a mac fork of some kind.
- */
+ if(!dir_fsp->is_directory) {
+ get_filename_transact(&fname[0], params, 53,
+ total_parameter_count - 53 - fname_len, fname_len);
- get_filename_transact(&fname[0], params, 53,
- total_parameter_count - 53 - fname_len, fname_len);
+ /*
+ * Check to see if this is a mac fork of some kind.
+ */
- if( strchr(fname, ':')) {
- return(ERROR_BOTH(NT_STATUS_OBJECT_PATH_NOT_FOUND,ERRDOS,ERRbadpath));
- }
+ if( strchr(fname, ':'))
+ return(ERROR_BOTH(NT_STATUS_OBJECT_PATH_NOT_FOUND,ERRDOS,ERRbadpath));
- return(ERROR_DOS(ERRDOS,ERRbadfid));
- }
+ return(ERROR_DOS(ERRDOS,ERRbadfid));
+ }
- /*
- * Copy in the base directory name.
- */
+ /*
+ * Copy in the base directory name.
+ */
- pstrcpy( fname, dir_fsp->fsp_name );
- dir_name_len = strlen(fname);
+ pstrcpy( fname, dir_fsp->fsp_name );
+ dir_name_len = strlen(fname);
- /*
- * Ensure it ends in a '\'.
- */
+ /*
+ * Ensure it ends in a '\'.
+ */
- if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) {
- pstrcat(fname, "\\");
- dir_name_len++;
- }
+ if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) {
+ pstrcat(fname, "\\");
+ dir_name_len++;
+ }
- /*
- * This next calculation can refuse a correct filename if we're dealing
- * with the Win2k unicode bug, but that would be rare. JRA.
- */
+ /*
+ * This next calculation can refuse a correct filename if we're dealing
+ * with the Win2k unicode bug, but that would be rare. JRA.
+ */
- if(fname_len + dir_name_len >= sizeof(pstring))
- return(ERROR_DOS(ERRSRV,ERRfilespecs));
+ if(fname_len + dir_name_len >= sizeof(pstring))
+ return(ERROR_DOS(ERRSRV,ERRfilespecs));
- get_filename_transact(&fname[dir_name_len], params, 53,
- total_parameter_count - 53 - fname_len, fname_len);
+ get_filename_transact(&fname[dir_name_len], params, 53,
+ total_parameter_count - 53 - fname_len, fname_len);
- } else {
- get_filename_transact(&fname[0], params, 53,
- total_parameter_count - 53 - fname_len, fname_len);
- }
+ } else {
+ get_filename_transact(&fname[0], params, 53,
+ total_parameter_count - 53 - fname_len, fname_len);
- /*
- * Now contruct the smb_open_mode value from the desired access
- * and the share access.
- */
+ /*
+ * Check to see if this is a mac fork of some kind.
+ */
- if((smb_open_mode = map_share_mode( &stat_open_only, fname, create_options, desired_access,
- share_access, file_attributes)) == -1)
- return ERROR_DOS(ERRDOS,ERRbadaccess);
+ if( strchr(fname, ':'))
+ return(ERROR_BOTH(NT_STATUS_OBJECT_PATH_NOT_FOUND,ERRDOS,ERRbadpath));
+ }
- oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
- oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+ /*
+ * Now contruct the smb_open_mode value from the desired access
+ * and the share access.
+ */
- /*
- * Check if POSIX semantics are wanted.
- */
+ if((smb_open_mode = map_share_mode( fname, create_options, &desired_access,
+ share_access, file_attributes)) == -1)
+ return ERROR_DOS(ERRDOS,ERRbadaccess);
- set_posix_case_semantics(file_attributes);
+ oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
+ oplock_request |= (flags & REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0;
+
+ /*
+ * Check if POSIX semantics are wanted.
+ */
+
+ set_posix_case_semantics(file_attributes);
- RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
+ RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
- unix_convert(fname,conn,0,&bad_path,&sbuf);
+ unix_convert(fname,conn,0,&bad_path,&sbuf);
- unixmode = unix_mode(conn,smb_attr | aARCH, fname);
+ unixmode = unix_mode(conn,smb_attr | aARCH, fname);
- /*
- * If it's a request for a directory open, deal with it separately.
- */
+ /*
+ * If it's a request for a directory open, deal with it separately.
+ */
- if(create_options & FILE_DIRECTORY_FILE) {
+ if(create_options & FILE_DIRECTORY_FILE) {
- oplock_request = 0;
+ oplock_request = 0;
- /*
- * We will get a create directory here if the Win32
- * app specified a security descriptor in the
- * CreateDirectory() call.
- */
+ /*
+ * We will get a create directory here if the Win32
+ * app specified a security descriptor in the
+ * CreateDirectory() call.
+ */
- fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action);
+ fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action);
- if(!fsp) {
- restore_case_semantics(file_attributes);
- set_bad_path_error(errno, bad_path);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
- }
+ if(!fsp) {
+ restore_case_semantics(file_attributes);
+ set_bad_path_error(errno, bad_path);
+ return(UNIXERROR(ERRDOS,ERRnoaccess));
+ }
- } else {
+ } else {
- /*
- * Ordinary file case.
- */
+ /*
+ * Ordinary file case.
+ */
- fsp = open_file_shared(conn,fname,&sbuf,smb_open_mode,smb_ofun,unixmode,
- oplock_request,&rmode,&smb_action);
+ fsp = open_file_shared1(conn,fname,&sbuf,desired_access,smb_open_mode,smb_ofun,unixmode,
+ oplock_request,&rmode,&smb_action);
- if (!fsp) {
+ if (!fsp) {
- if(errno == EISDIR) {
+ if(errno == EISDIR) {
- /*
- * Fail the open if it was explicitly a non-directory file.
- */
+ /*
+ * Fail the open if it was explicitly a non-directory file.
+ */
- if (create_options & FILE_NON_DIRECTORY_FILE) {
- restore_case_semantics(file_attributes);
- SSVAL(outbuf, smb_flg2,
- SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
- return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY);
- }
+ if (create_options & FILE_NON_DIRECTORY_FILE) {
+ restore_case_semantics(file_attributes);
+ SSVAL(outbuf, smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
+ return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY);
+ }
- oplock_request = 0;
- fsp = open_directory(conn, fname, &sbuf, smb_open_mode, smb_ofun, unixmode, &smb_action);
-
- if(!fsp) {
- restore_case_semantics(file_attributes);
- set_bad_path_error(errno, bad_path);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
- }
-#ifdef EROFS
- } else if (((errno == EACCES) || (errno == EROFS)) && stat_open_only) {
-#else /* !EROFS */
- } else if (errno == EACCES && stat_open_only) {
-#endif
-
- /*
- * We couldn't open normally and all we want
- * are the permissions. Try and do a stat open.
- */
-
- oplock_request = 0;
+ oplock_request = 0;
+ fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action);
- fsp = open_file_stat(conn,fname,&sbuf,smb_open_mode,&smb_action);
+ if(!fsp) {
+ restore_case_semantics(file_attributes);
+ set_bad_path_error(errno, bad_path);
+ return(UNIXERROR(ERRDOS,ERRnoaccess));
+ }
+ } else {
- if(!fsp) {
restore_case_semantics(file_attributes);
+ set_bad_path_error(errno, bad_path);
+
return(UNIXERROR(ERRDOS,ERRnoaccess));
}
- } else {
-
- restore_case_semantics(file_attributes);
- set_bad_path_error(errno, bad_path);
-
- return(UNIXERROR(ERRDOS,ERRnoaccess));
- }
- }
+ }
- file_len = sbuf.st_size;
- fmode = dos_mode(conn,fname,&sbuf);
- if(fmode == 0)
- fmode = FILE_ATTRIBUTE_NORMAL;
+ file_len = sbuf.st_size;
+ fmode = dos_mode(conn,fname,&sbuf);
+ if(fmode == 0)
+ fmode = FILE_ATTRIBUTE_NORMAL;
- if (fmode & aDIR) {
- close_file(fsp,False);
- restore_case_semantics(file_attributes);
- return ERROR_DOS(ERRDOS,ERRnoaccess);
- }
+ if (fmode & aDIR) {
+ close_file(fsp,False);
+ restore_case_semantics(file_attributes);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
+ }
- /*
- * If the caller set the extended oplock request bit
- * and we granted one (by whatever means) - set the
- * correct bit for extended oplock reply.
- */
+ /*
+ * If the caller set the extended oplock request bit
+ * and we granted one (by whatever means) - set the
+ * correct bit for extended oplock reply.
+ */
- if (oplock_request && lp_fake_oplocks(SNUM(conn)))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ if (oplock_request && lp_fake_oplocks(SNUM(conn)))
+ smb_action |= EXTENDED_OPLOCK_GRANTED;
- if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
- }
+ if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
+ smb_action |= EXTENDED_OPLOCK_GRANTED;
+ }
- /*
- * Now try and apply the desired SD.
- */
+ /*
+ * Now try and apply the desired SD.
+ */
- if (!set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION, &error_class, &error_code)) {
- close_file(fsp,False);
- restore_case_semantics(file_attributes);
- return ERROR_DOS(error_class, error_code);
- }
+ if (!set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION, &error_class, &error_code)) {
+ close_file(fsp,False);
+ restore_case_semantics(file_attributes);
+ return ERROR_DOS(error_class, error_code);
+ }
- restore_case_semantics(file_attributes);
+ restore_case_semantics(file_attributes);
- /* Realloc the size of parameters and data we will return */
- params = Realloc(*ppparams, 69);
- if(params == NULL)
- return ERROR_DOS(ERRDOS,ERRnomem);
+ /* Realloc the size of parameters and data we will return */
+ params = Realloc(*ppparams, 69);
+ if(params == NULL)
+ return ERROR_DOS(ERRDOS,ERRnomem);
- *ppparams = params;
+ *ppparams = params;
- memset((char *)params,'\0',69);
+ memset((char *)params,'\0',69);
- p = params;
- if (smb_action & EXTENDED_OPLOCK_GRANTED)
- SCVAL(p,0, BATCH_OPLOCK_RETURN);
- else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type))
- SCVAL(p,0, LEVEL_II_OPLOCK_RETURN);
- else
- SCVAL(p,0,NO_OPLOCK_RETURN);
+ p = params;
+ if (smb_action & EXTENDED_OPLOCK_GRANTED)
+ SCVAL(p,0, BATCH_OPLOCK_RETURN);
+ else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type))
+ SCVAL(p,0, LEVEL_II_OPLOCK_RETURN);
+ else
+ SCVAL(p,0,NO_OPLOCK_RETURN);
- p += 2;
- SSVAL(p,0,fsp->fnum);
- p += 2;
- SIVAL(p,0,smb_action);
- p += 8;
-
- /* Create time. */
- c_time = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn)));
-
- if (lp_dos_filetime_resolution(SNUM(conn))) {
- c_time &= ~1;
- sbuf.st_atime &= ~1;
- sbuf.st_mtime &= ~1;
- sbuf.st_mtime &= ~1;
- }
+ p += 2;
+ SSVAL(p,0,fsp->fnum);
+ p += 2;
+ SIVAL(p,0,smb_action);
+ p += 8;
- put_long_date(p,c_time);
- p += 8;
- put_long_date(p,sbuf.st_atime); /* access time */
- p += 8;
- put_long_date(p,sbuf.st_mtime); /* write time */
- p += 8;
- put_long_date(p,sbuf.st_mtime); /* change time */
- p += 8;
- SIVAL(p,0,fmode); /* File Attributes. */
- p += 4;
- SOFF_T(p,0,file_len);
- p += 8;
- SOFF_T(p,0,file_len);
-
- DEBUG(5,("call_nt_transact_create: open name = %s\n", fname));
-
- /* Send the required number of replies */
- send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 69, *ppdata, 0);
+ /* Create time. */
+ c_time = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn)));
- return -1;
+ if (lp_dos_filetime_resolution(SNUM(conn))) {
+ c_time &= ~1;
+ sbuf.st_atime &= ~1;
+ sbuf.st_mtime &= ~1;
+ sbuf.st_mtime &= ~1;
+ }
+
+ put_long_date(p,c_time);
+ p += 8;
+ put_long_date(p,sbuf.st_atime); /* access time */
+ p += 8;
+ put_long_date(p,sbuf.st_mtime); /* write time */
+ p += 8;
+ put_long_date(p,sbuf.st_mtime); /* change time */
+ p += 8;
+ SIVAL(p,0,fmode); /* File Attributes. */
+ p += 4;
+ SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len));
+ p += 8;
+ SOFF_T(p,0,file_len);
+
+ DEBUG(5,("call_nt_transact_create: open name = %s\n", fname));
+
+ /* Send the required number of replies */
+ send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 69, *ppdata, 0);
+
+ return -1;
}
/****************************************************************************
@@ -1499,29 +1475,28 @@ static int call_nt_transact_notify_change(connection_struct *conn,
char **ppsetup,
char **ppparams, char **ppdata)
{
- char *setup = *ppsetup;
- files_struct *fsp;
- uint32 flags;
+ char *setup = *ppsetup;
+ files_struct *fsp;
+ uint32 flags;
- fsp = file_fsp(setup,4);
- flags = IVAL(setup, 0);
+ fsp = file_fsp(setup,4);
+ flags = IVAL(setup, 0);
- DEBUG(3,("call_nt_transact_notify_change\n"));
+ DEBUG(3,("call_nt_transact_notify_change\n"));
- if(!fsp)
- return ERROR_DOS(ERRDOS,ERRbadfid);
+ if(!fsp)
+ return ERROR_DOS(ERRDOS,ERRbadfid);
- if((!fsp->is_directory) || (conn != fsp->conn))
- return ERROR_DOS(ERRDOS,ERRbadfid);
+ if((!fsp->is_directory) || (conn != fsp->conn))
+ return ERROR_DOS(ERRDOS,ERRbadfid);
- if (!change_notify_set(inbuf, fsp, conn, flags)) {
- return(UNIXERROR(ERRDOS,ERRbadfid));
- }
+ if (!change_notify_set(inbuf, fsp, conn, flags))
+ return(UNIXERROR(ERRDOS,ERRbadfid));
- DEBUG(3,("call_nt_transact_notify_change: notify change called on directory \
+ DEBUG(3,("call_nt_transact_notify_change: notify change called on directory \
name = %s\n", fsp->fsp_name ));
- return -1;
+ return -1;
}
/****************************************************************************
@@ -1749,13 +1724,13 @@ static int call_nt_transact_ioctl(connection_struct *conn,
int bufsize,
char **ppsetup, char **ppparams, char **ppdata)
{
- static BOOL logged_message = False;
+ static BOOL logged_message = False;
- if(!logged_message) {
- DEBUG(2,("call_nt_transact_ioctl: Currently not implemented.\n"));
- logged_message = True; /* Only print this once... */
- }
- return ERROR_DOS(ERRSRV,ERRnosupport);
+ if(!logged_message) {
+ DEBUG(2,("call_nt_transact_ioctl: Currently not implemented.\n"));
+ logged_message = True; /* Only print this once... */
+ }
+ return ERROR_DOS(ERRSRV,ERRnosupport);
}
/****************************************************************************
@@ -1899,9 +1874,8 @@ due to being in oplock break state.\n" ));
}
}
- if (Protocol >= PROTOCOL_NT1) {
- SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | 0x40); /* IS_LONG_NAME */
- }
+ if (Protocol >= PROTOCOL_NT1)
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_IS_LONG_NAME);
/* Now we must call the relevant NT_TRANS function */
switch(function_code) {
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 9cefcc9b45e..9f57cb294ca 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -40,13 +40,13 @@ static int fd_open(struct connection_struct *conn, char *fname,
flags |= O_NOFOLLOW;
#endif
- fd = conn->vfs_ops.open(conn,dos_to_unix(fname,False),flags,mode);
+ fd = conn->vfs_ops.open(conn,dos_to_unix_static(fname),flags,mode);
/* Fix for files ending in '.' */
if((fd == -1) && (errno == ENOENT) &&
(strchr(fname,'.')==NULL)) {
pstrcat(fname,".");
- fd = conn->vfs_ops.open(conn,dos_to_unix(fname,False),flags,mode);
+ fd = conn->vfs_ops.open(conn,dos_to_unix_static(fname),flags,mode);
}
DEBUG(10,("fd_open: name %s, flags = 0%o mode = 0%o, fd = %d. %s\n", fname,
@@ -62,7 +62,7 @@ static int fd_open(struct connection_struct *conn, char *fname,
int fd_close(struct connection_struct *conn, files_struct *fsp)
{
if (fsp->fd == -1)
- return -1;
+ return 0; /* what we used to call a stat open. */
return fd_close_posix(conn, fsp);
}
@@ -89,7 +89,7 @@ static void check_for_pipe(char *fname)
****************************************************************************/
static BOOL open_file(files_struct *fsp,connection_struct *conn,
- char *fname1,SMB_STRUCT_STAT *psbuf,int flags,mode_t mode)
+ const char *fname1,SMB_STRUCT_STAT *psbuf,int flags,mode_t mode, uint32 desired_access)
{
extern struct current_user current_user;
pstring fname;
@@ -152,18 +152,35 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn,
local_flags &= ~O_TRUNC;
/* actually do the open */
- fsp->fd = fd_open(conn, fname, local_flags, mode);
- if (fsp->fd == -1) {
- DEBUG(3,("Error opening file %s (%s) (local_flags=%d) (flags=%d)\n",
- fname,strerror(errno),local_flags,flags));
- check_for_pipe(fname);
- return False;
- }
+ if ((desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ||
+ (local_flags & O_CREAT)) {
+
+ fsp->fd = fd_open(conn, fname, local_flags, mode);
+
+ if (fsp->fd == -1) {
+ DEBUG(3,("Error opening file %s (%s) (local_flags=%d) (flags=%d)\n",
+ fname,strerror(errno),local_flags,flags));
+ check_for_pipe(fname);
+ return False;
+ }
+ } else
+ fsp->fd = -1; /* What we used to call a stat open. */
if (!VALID_STAT(*psbuf)) {
- if (vfs_fstat(fsp,fsp->fd,psbuf) == -1) {
- DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) ));
+ int ret;
+
+ if (fsp->fd == -1)
+ ret = vfs_stat(conn, fname, psbuf);
+ else {
+ ret = vfs_fstat(fsp,fsp->fd,psbuf);
+ /* If we have an fd, this stat should succeed. */
+ if (ret == -1)
+ DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) ));
+ }
+
+ /* For a non-io open, this stat failing means file not found. JRA */
+ if (ret == -1) {
fd_close(conn, fsp);
return False;
}
@@ -191,12 +208,12 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn,
fsp->can_read = ((flags & O_WRONLY)==0);
fsp->can_write = ((flags & (O_WRONLY|O_RDWR))!=0);
fsp->share_mode = 0;
+ fsp->desired_access = desired_access;
fsp->print_file = False;
fsp->modified = False;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = False;
- fsp->stat_open = False;
fsp->directory_delete_on_close = False;
fsp->conn = conn;
/*
@@ -353,7 +370,7 @@ static int access_table(int new_deny,int old_deny,int old_mode,
check if we can open a file with a share mode
****************************************************************************/
-static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, int share_mode,
+static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, int share_mode, uint32 desired_access,
const char *fname, BOOL fcbopen, int *flags)
{
int deny_mode = GET_DENY_MODE(share_mode);
@@ -381,12 +398,61 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i
return False;
}
+ /* this is a nasty hack, but necessary until we rewrite our open
+ handling to use a NTCreateX call as the basic call.
+ NT may open a file with neither read nor write access, and in
+ this case it expects the open not to conflict with any
+ existing deny modes. This happens (for example) during a
+ "xcopy /o" where the second file descriptor is used for
+ ACL sets
+ (tridge)
+ */
+
+ /*
+ * This is a bit wierd - the test for desired access not having the
+ * critical bits seems seems odd. Firstly, if both opens have no
+ * critical bits then always ignore. Then check the "allow delete"
+ * then check for either. This probably isn't quite right yet but
+ * gets us much closer. JRA.
+ */
+
+ /*
+ * If desired_access doesn't contain READ_DATA,WRITE_DATA,APPEND_DATA or EXECUTE
+ * and the existing desired_acces then share modes don't conflict.
+ */
+
+ if ( !(desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) &&
+ !(share->desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ) {
+
+ /*
+ * Wrinkle discovered by smbtorture....
+ * If both are non-io open and requester is asking for delete and current open has delete access
+ * but neither open has allowed file share delete then deny.... this is very strange and
+ * seems to be the only case in which non-io opens conflict. JRA.
+ */
+
+ if ((desired_access & DELETE_ACCESS) && (share->desired_access & DELETE_ACCESS) &&
+ (!GET_ALLOW_SHARE_DELETE(share->share_mode) || !GET_ALLOW_SHARE_DELETE(share_mode))) {
+ DEBUG(5,("check_share_mode: Failing open on file %s as delete access requests conflict.\n",
+ fname ));
+ unix_ERR_class = ERRDOS;
+ unix_ERR_code = ERRbadshare;
+
+ return False;
+ }
+
+ DEBUG(5,("check_share_mode: Allowing open on file %s as both desired access (0x%x) \
+and existing desired access (0x%x) are non-data opens\n",
+ fname, (unsigned int)desired_access, (unsigned int)share->desired_access ));
+ return True;
+ }
+
/*
* If delete access was requested and the existing share mode doesn't have
* ALLOW_SHARE_DELETE then deny.
*/
- if (GET_DELETE_ACCESS_REQUESTED(share_mode) && !GET_ALLOW_SHARE_DELETE(share->share_mode)) {
+ if ((desired_access & DELETE_ACCESS) && !GET_ALLOW_SHARE_DELETE(share->share_mode)) {
DEBUG(5,("check_share_mode: Failing open on file %s as delete access requested and allow share delete not set.\n",
fname ));
unix_ERR_class = ERRDOS;
@@ -401,7 +467,7 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i
* ALLOW_SHARE_DELETE then deny.
*/
- if (GET_DELETE_ACCESS_REQUESTED(share->share_mode) && !GET_ALLOW_SHARE_DELETE(share_mode)) {
+ if ((share->desired_access & DELETE_ACCESS) && !GET_ALLOW_SHARE_DELETE(share_mode)) {
DEBUG(5,("check_share_mode: Failing open on file %s as delete access granted and allow share delete not requested.\n",
fname ));
unix_ERR_class = ERRDOS;
@@ -410,9 +476,21 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i
return False;
}
+ /*
+ * If desired_access doesn't contain READ_DATA,WRITE_DATA,APPEND_DATA or EXECUTE
+ * then share modes don't conflict. Likewise with existing desired access.
+ */
+
+ if ( !(desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ||
+ !(share->desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) ) {
+ DEBUG(5,("check_share_mode: Allowing open on file %s as desired access (0x%x) doesn't conflict with\
+existing desired access (0x%x).\n", fname, (unsigned int)desired_access, (unsigned int)share->desired_access ));
+ return True;
+ }
+
{
int access_allowed = access_table(deny_mode,old_deny_mode,old_open_mode,
- (share->pid == sys_getpid()),is_executable(fname));
+ (share->pid == sys_getpid()),is_executable(fname));
if ((access_allowed == AFAIL) ||
(!fcbopen && (access_allowed == AREAD && *flags == O_RDWR)) ||
@@ -447,8 +525,10 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i
****************************************************************************/
static int open_mode_check(connection_struct *conn, const char *fname, SMB_DEV_T dev,
- SMB_INO_T inode, int share_mode, int *p_flags, int *p_oplock_request,
- BOOL *p_all_current_opens_are_level_II)
+ SMB_INO_T inode,
+ uint32 desired_access,
+ int share_mode, int *p_flags, int *p_oplock_request,
+ BOOL *p_all_current_opens_are_level_II)
{
int i;
int num_share_modes;
@@ -520,10 +600,9 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou
*p_all_current_opens_are_level_II = False;
}
- /* someone else has a share lock on it, check to see
- if we can too */
-
- if(check_share_mode(conn, share_entry, share_mode, fname, fcbopen, p_flags) == False) {
+ /* someone else has a share lock on it, check to see if we can too */
+ if (!check_share_mode(conn, share_entry, share_mode, desired_access,
+ fname, fcbopen, p_flags)) {
SAFE_FREE(old_shares);
errno = EACCES;
return -1;
@@ -611,20 +690,33 @@ static void kernel_flock(files_struct *fsp, int deny_mode)
/****************************************************************************
- Open a file with a share mode. On output from this open we are guarenteeing
- that
+ Open a file with a share mode - old method.
****************************************************************************/
+
files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf,
- int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action)
+ int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action)
+{
+ return open_file_shared1(conn, fname, psbuf, 0, share_mode, ofun, mode,
+ oplock_request, Access, action);
+}
+
+/****************************************************************************
+ Open a file with a share mode - called from NTCreateAndX.
+****************************************************************************/
+
+files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf,
+ uint32 desired_access,
+ int share_mode,int ofun, mode_t mode,int oplock_request,
+ int *Access,int *action)
{
int flags=0;
int flags2=0;
int deny_mode = GET_DENY_MODE(share_mode);
BOOL allow_share_delete = GET_ALLOW_SHARE_DELETE(share_mode);
- BOOL delete_access_requested = GET_DELETE_ACCESS_REQUESTED(share_mode);
BOOL delete_on_close = GET_DELETE_ON_CLOSE_FLAG(share_mode);
BOOL file_existed = VALID_STAT(*psbuf);
BOOL fcbopen = False;
+ BOOL def_acl = False;
SMB_DEV_T dev = 0;
SMB_INO_T inode = 0;
int num_share_modes = 0;
@@ -637,8 +729,10 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
if (conn->printer) {
/* printers are handled completely differently. Most
of the passed parameters are ignored */
- *Access = DOS_OPEN_WRONLY;
- *action = FILE_WAS_CREATED;
+ if (Access)
+ *Access = DOS_OPEN_WRONLY;
+ if (action)
+ *action = FILE_WAS_CREATED;
return print_fsp_open(conn, fname);
}
@@ -697,16 +791,24 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
switch (GET_OPEN_MODE(share_mode)) {
case DOS_OPEN_WRONLY:
flags = O_WRONLY;
+ if (desired_access == 0)
+ desired_access = FILE_WRITE_DATA;
break;
case DOS_OPEN_FCB:
fcbopen = True;
flags = O_RDWR;
+ if (desired_access == 0)
+ desired_access = FILE_READ_DATA|FILE_WRITE_DATA;
break;
case DOS_OPEN_RDWR:
flags = O_RDWR;
+ if (desired_access == 0)
+ desired_access = FILE_READ_DATA|FILE_WRITE_DATA;
break;
default:
flags = O_RDONLY;
+ if (desired_access == 0)
+ desired_access = FILE_READ_DATA;
break;
}
@@ -742,8 +844,10 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
lock_share_entry(conn, dev, inode);
- num_share_modes = open_mode_check(conn, fname, dev, inode, share_mode,
- &flags, &oplock_request, &all_current_opens_are_level_II);
+ num_share_modes = open_mode_check(conn, fname, dev, inode,
+ desired_access, share_mode,
+ &flags, &oplock_request, &all_current_opens_are_level_II);
+
if(num_share_modes == -1) {
/*
@@ -757,7 +861,8 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
* we can do. We also ensure we're not going to create or tuncate
* the file as we only want an access decision at this stage. JRA.
*/
- fsp_open = open_file(fsp,conn,fname,psbuf,flags|(flags2&~(O_TRUNC|O_CREAT)),mode);
+ fsp_open = open_file(fsp,conn,fname,psbuf,
+ flags|(flags2&~(O_TRUNC|O_CREAT)),mode,desired_access);
DEBUG(4,("open_file_shared : share_mode deny - calling open_file with \
flags=0x%X flags2=0x%X mode=0%o returned %d\n",
@@ -775,6 +880,14 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
*/
}
+ /*
+ * Ensure we pay attention to default ACLs on directories if required.
+ */
+
+ if ((flags2 & O_CREAT) && lp_inherit_acls(SNUM(conn)) &&
+ (def_acl = directory_has_default_acl(conn, dos_to_unix_static(parent_dirname(fname)))))
+ mode = 0777;
+
DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o\n",
flags,flags2,(int)mode));
@@ -782,10 +895,10 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
* open_file strips any O_TRUNC flags itself.
*/
- fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,mode);
+ fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,mode,desired_access);
if (!fsp_open && (flags == O_RDWR) && (errno != ENOENT) && fcbopen) {
- if((fsp_open = open_file(fsp,conn,fname,psbuf,O_RDONLY,mode)) == True)
+ if((fsp_open = open_file(fsp,conn,fname,psbuf,O_RDONLY,mode,desired_access)) == True)
flags = O_RDONLY;
}
@@ -807,8 +920,9 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
lock_share_entry_fsp(fsp);
- num_share_modes = open_mode_check(conn, fname, dev, inode, share_mode,
- &flags, &oplock_request, &all_current_opens_are_level_II);
+ num_share_modes = open_mode_check(conn, fname, dev, inode,
+ desired_access, share_mode,
+ &flags, &oplock_request, &all_current_opens_are_level_II);
if(num_share_modes == -1) {
unlock_share_entry_fsp(fsp);
@@ -874,8 +988,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
fsp->share_mode = SET_DENY_MODE(deny_mode) |
SET_OPEN_MODE(open_mode) |
- SET_ALLOW_SHARE_DELETE(allow_share_delete) |
- SET_DELETE_ACCESS_REQUESTED(delete_access_requested);
+ SET_ALLOW_SHARE_DELETE(allow_share_delete);
DEBUG(10,("open_file_shared : share_mode = %x\n", fsp->share_mode ));
@@ -914,6 +1027,8 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
NTSTATUS result = set_delete_on_close_internal(fsp, delete_on_close);
if (NT_STATUS_V(result) != NT_STATUS_V(NT_STATUS_OK)) {
+ /* Remember to delete the mode we just added. */
+ del_share_mode(fsp, NULL);
unlock_share_entry_fsp(fsp);
fd_close(conn,fsp);
file_free(fsp);
@@ -922,10 +1037,11 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
}
/*
- * Take care of inherited ACLs on created files. JRA.
+ * Take care of inherited ACLs on created files - if default ACL not
+ * selected.
*/
- if (!file_existed && (conn->vfs_ops.fchmod_acl != NULL)) {
+ if (!file_existed && !def_acl && (conn->vfs_ops.fchmod_acl != NULL)) {
int saved_errno = errno; /* We might get ENOSYS in the next call.. */
if (conn->vfs_ops.fchmod_acl(fsp, fsp->fd, mode) == -1 && errno == ENOSYS)
errno = saved_errno; /* Ignore ENOSYS */
@@ -939,77 +1055,10 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
}
/****************************************************************************
- Open a file for permissions read only. Return a pseudo file entry
- with the 'stat_open' flag set
-****************************************************************************/
-
-files_struct *open_file_stat(connection_struct *conn, char *fname,
- SMB_STRUCT_STAT *psbuf, int smb_ofun, int *action)
-{
- extern struct current_user current_user;
- files_struct *fsp = NULL;
-
- if (!VALID_STAT(*psbuf)) {
- DEBUG(0,("open_file_stat: unable to stat name = %s. Error was %s\n", fname, strerror(errno) ));
- return NULL;
- }
-
- if(S_ISDIR(psbuf->st_mode)) {
- DEBUG(0,("open_file_stat: %s is a directory !\n", fname ));
- return NULL;
- }
-
- fsp = file_new(conn);
- if(!fsp)
- return NULL;
-
- *action = FILE_WAS_OPENED;
-
- DEBUG(5,("open_file_stat: opening file %s as a stat entry\n", fname));
-
- /*
- * Setup the files_struct for it.
- */
-
- fsp->mode = psbuf->st_mode;
- fsp->inode = psbuf->st_ino;
- fsp->dev = psbuf->st_dev;
- fsp->size = psbuf->st_size;
- fsp->vuid = current_user.vuid;
- fsp->pos = -1;
- fsp->can_lock = False;
- fsp->can_read = False;
- fsp->can_write = False;
- fsp->share_mode = 0;
- fsp->print_file = False;
- fsp->modified = False;
- fsp->oplock_type = NO_OPLOCK;
- fsp->sent_oplock_break = NO_BREAK_SENT;
- fsp->is_directory = False;
- fsp->stat_open = True;
- fsp->directory_delete_on_close = False;
- fsp->conn = conn;
- /*
- * Note that the file name here is the *untranslated* name
- * ie. it is still in the DOS codepage sent from the client.
- * All use of this filename will pass though the sys_xxxx
- * functions which will do the dos_to_unix translation before
- * mapping into a UNIX filename. JRA.
- */
- string_set(&fsp->fsp_name,fname);
- fsp->wbmpx_ptr = NULL;
- fsp->wcp = NULL; /* Write cache pointer. */
-
- conn->num_files_open++;
-
- return fsp;
-}
-
-/****************************************************************************
Open a file for for write to ensure that we can fchmod it.
****************************************************************************/
-files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf)
+files_struct *open_file_fchmod(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf)
{
files_struct *fsp = NULL;
BOOL fsp_open;
@@ -1021,7 +1070,9 @@ files_struct *open_file_fchmod(connection_struct *conn, char *fname, SMB_STRUCT_
if(!fsp)
return NULL;
- fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0);
+ /* note! we must use a non-zero desired access or we don't get
+ a real file descriptor. Oh what a twisted web we weave. */
+ fsp_open = open_file(fsp,conn,fname,psbuf,O_WRONLY,0,FILE_WRITE_DATA);
/*
* This is not a user visible file open.
@@ -1052,8 +1103,8 @@ int close_file_fchmod(files_struct *fsp)
Open a directory from an NT SMB call.
****************************************************************************/
-files_struct *open_directory(connection_struct *conn, char *fname,
- SMB_STRUCT_STAT *psbuf, int share_mode, int smb_ofun, mode_t unixmode, int *action)
+files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf,
+ uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action)
{
extern struct current_user current_user;
BOOL got_stat = False;
@@ -1152,6 +1203,7 @@ files_struct *open_directory(connection_struct *conn, char *fname,
fsp->can_read = False;
fsp->can_write = False;
fsp->share_mode = share_mode;
+ fsp->desired_access = desired_access;
fsp->print_file = False;
fsp->modified = False;
fsp->oplock_type = NO_OPLOCK;
@@ -1183,6 +1235,9 @@ files_struct *open_directory(connection_struct *conn, char *fname,
return fsp;
}
+#if 0
+
+Old code - I have replaced with correct desired_access checking. JRA.
/*******************************************************************
Check if the share mode on a file allows it to be deleted or unlinked.
@@ -1191,149 +1246,107 @@ files_struct *open_directory(connection_struct *conn, char *fname,
BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op)
{
- int i;
- int ret = False;
- share_mode_entry *old_shares = 0;
- int num_share_modes;
- SMB_STRUCT_STAT sbuf;
- pid_t pid = sys_getpid();
- SMB_DEV_T dev;
- SMB_INO_T inode;
-
- if (vfs_stat(conn,fname,&sbuf) == -1)
- return(True);
-
- dev = sbuf.st_dev;
- inode = sbuf.st_ino;
-
- lock_share_entry(conn, dev, inode);
- num_share_modes = get_share_modes(conn, dev, inode, &old_shares);
-
- /*
- * Check if the share modes will give us access.
- */
-
- if(num_share_modes != 0)
- {
- BOOL broke_oplock;
-
- do
- {
-
- broke_oplock = False;
- for(i = 0; i < num_share_modes; i++)
- {
- share_mode_entry *share_entry = &old_shares[i];
-
- /*
- * Break oplocks before checking share modes. See comment in
- * open_file_shared for details.
- * Check if someone has an oplock on this file. If so we must
- * break it before continuing.
- */
- if(BATCH_OPLOCK_TYPE(share_entry->op_type))
- {
+ int i;
+ int ret = False;
+ share_mode_entry *old_shares = 0;
+ int num_share_modes;
+ SMB_STRUCT_STAT sbuf;
+ pid_t pid = sys_getpid();
+ SMB_DEV_T dev;
+ SMB_INO_T inode;
-#if 0
+ if (vfs_stat(conn,fname,&sbuf) == -1)
+ return(True);
-/* JRA. Try removing this code to see if the new oplock changes
- fix the problem. I'm dubious, but Andrew is recommending we
- try this....
-*/
+ dev = sbuf.st_dev;
+ inode = sbuf.st_ino;
+
+ lock_share_entry(conn, dev, inode);
+ num_share_modes = get_share_modes(conn, dev, inode, &old_shares);
+
+ /*
+ * Check if the share modes will give us access.
+ */
+
+ if(num_share_modes != 0) {
+ BOOL broke_oplock;
- /*
- * It appears that the NT redirector may have a bug, in that
- * it tries to do an SMBmv on a file that it has open with a
- * batch oplock, and then fails to respond to the oplock break
- * request. This only seems to occur when the client is doing an
- * SMBmv to the smbd it is using - thus we try and detect this
- * condition by checking if the file being moved is open and oplocked by
- * this smbd process, and then not sending the oplock break in this
- * special case. If the file was open with a deny mode that
- * prevents the move the SMBmv will fail anyway with a share
- * violation error. JRA.
- */
- if(rename_op && (share_entry->pid == pid))
- {
-
- DEBUG(0,("check_file_sharing: NT redirector workaround - rename attempted on \
-batch oplocked file %s, dev = %x, inode = %.0f\n", fname, (unsigned int)dev, (double)inode));
-
- /*
- * This next line is a test that allows the deny-mode
- * processing to be skipped. This seems to be needed as
- * NT insists on the rename succeeding (in Office 9x no less !).
- * This should be removed as soon as (a) MS fix the redirector
- * bug or (b) NT SMB support in Samba makes NT not issue the
- * call (as is my fervent hope). JRA.
- */
- continue;
- }
- else
-#endif /* 0 */
- {
-
- DEBUG(5,("check_file_sharing: breaking oplock (%x) on file %s, \
+ do {
+
+ broke_oplock = False;
+ for(i = 0; i < num_share_modes; i++) {
+ share_mode_entry *share_entry = &old_shares[i];
+
+ /*
+ * Break oplocks before checking share modes. See comment in
+ * open_file_shared for details.
+ * Check if someone has an oplock on this file. If so we must
+ * break it before continuing.
+ */
+ if(BATCH_OPLOCK_TYPE(share_entry->op_type)) {
+
+ DEBUG(5,("check_file_sharing: breaking oplock (%x) on file %s, \
dev = %x, inode = %.0f\n", share_entry->op_type, fname, (unsigned int)dev, (double)inode));
- /* Oplock break.... */
- unlock_share_entry(conn, dev, inode);
- if(request_oplock_break(share_entry) == False)
- {
- DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \
+ /* Oplock break.... */
+ unlock_share_entry(conn, dev, inode);
+
+ if(request_oplock_break(share_entry) == False) {
+ DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \
dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (double)inode));
- SAFE_FREE(old_shares);
- return False;
- }
- lock_share_entry(conn, dev, inode);
- broke_oplock = True;
- break;
- }
- }
-
- /*
- * If this is a delete request and ALLOW_SHARE_DELETE is set then allow
- * this to proceed. This takes precedence over share modes.
- */
-
- if(!rename_op && GET_ALLOW_SHARE_DELETE(share_entry->share_mode))
- continue;
-
- /*
- * Someone else has a share lock on it, check to see
- * if we can too.
- */
-
- if ((GET_DENY_MODE(share_entry->share_mode) != DENY_DOS) ||
- (share_entry->pid != pid))
- goto free_and_exit;
-
- } /* end for */
-
- if(broke_oplock)
- {
- SAFE_FREE(old_shares);
- num_share_modes = get_share_modes(conn, dev, inode, &old_shares);
- }
- } while(broke_oplock);
- }
-
- /* XXXX exactly what share mode combinations should be allowed for
- deleting/renaming? */
- /*
- * If we got here then either there were no share modes or
- * all share modes were DENY_DOS and the pid == getpid() or
- * delete access was requested and all share modes had the
- * ALLOW_SHARE_DELETE bit set (takes precedence over other
- * share modes).
- */
-
- ret = True;
+ SAFE_FREE(old_shares);
+ return False;
+ }
+ lock_share_entry(conn, dev, inode);
+ broke_oplock = True;
+ break;
+ }
+
+ /*
+ * If this is a delete request and ALLOW_SHARE_DELETE is set then allow
+ * this to proceed. This takes precedence over share modes.
+ */
+
+ if(!rename_op && GET_ALLOW_SHARE_DELETE(share_entry->share_mode))
+ continue;
+
+ /*
+ * Someone else has a share lock on it, check to see
+ * if we can too.
+ */
+ if ((GET_DENY_MODE(share_entry->share_mode) != DENY_DOS) ||
+ (share_entry->pid != pid))
+ goto free_and_exit;
+
+ } /* end for */
+
+ if(broke_oplock) {
+ SAFE_FREE(old_shares);
+ num_share_modes = get_share_modes(conn, dev, inode, &old_shares);
+ }
+ } while(broke_oplock);
+ }
+
+ /*
+ * XXXX exactly what share mode combinations should be allowed for
+ * deleting/renaming?
+ */
+
+ /*
+ * If we got here then either there were no share modes or
+ * all share modes were DENY_DOS and the pid == getpid() or
+ * delete access was requested and all share modes had the
+ * ALLOW_SHARE_DELETE bit set (takes precedence over other
+ * share modes).
+ */
+
+ ret = True;
free_and_exit:
- unlock_share_entry(conn, dev, inode);
- SAFE_FREE(old_shares);
- return(ret);
+ unlock_share_entry(conn, dev, inode);
+ SAFE_FREE(old_shares);
+ return(ret);
}
+#endif
diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c
index cae94bc7a8f..dbd7b63d060 100644
--- a/source/smbd/oplock.c
+++ b/source/smbd/oplock.c
@@ -132,7 +132,7 @@ BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeou
/*
* Read a loopback udp message.
*/
- msg_len = recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN],
+ msg_len = sys_recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN],
buffer_len - OPBRK_CMD_HEADER_LEN, 0, (struct sockaddr *)&from, &fromlen);
if(msg_len < 0) {
@@ -418,7 +418,7 @@ oplocks. Returning success.\n"));
toaddr.sin_port = htons(from_port);
toaddr.sin_family = AF_INET;
- if(sendto( oplock_sock, msg_start, OPLOCK_BREAK_MSG_LEN, 0,
+ if(sys_sendto( oplock_sock, msg_start, OPLOCK_BREAK_MSG_LEN, 0,
(struct sockaddr *)&toaddr, sizeof(toaddr)) < 0) {
DEBUG(0,("process_local_message: sendto process %d failed. Errno was %s\n",
(int)remotepid, strerror(errno)));
@@ -730,8 +730,8 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id,
saved_user_conn = current_user.conn;
saved_vuid = current_user.vuid;
saved_fsp_conn = fsp->conn;
- vfs_GetWd(saved_fsp_conn,saved_dir);
change_to_root_user();
+ vfs_GetWd(saved_fsp_conn,saved_dir);
/* Save the chain fnum. */
file_chain_save();
@@ -929,7 +929,7 @@ dev = %x, inode = %.0f, file_id = %lu and no fsp found !\n",
(unsigned int)dev, (double)inode, file_id );
}
- if(sendto(oplock_sock,op_break_msg,OPLOCK_BREAK_MSG_LEN,0,
+ if(sys_sendto(oplock_sock,op_break_msg,OPLOCK_BREAK_MSG_LEN,0,
(struct sockaddr *)&addr_out,sizeof(addr_out)) < 0) {
if( DEBUGLVL( 0 ) ) {
dbgtext( "request_oplock_break: failed when sending a oplock " );
diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c
index 10520461753..9ca3ecc2609 100644
--- a/source/smbd/oplock_irix.c
+++ b/source/smbd/oplock_irix.c
@@ -57,7 +57,7 @@ static BOOL irix_oplocks_available(void)
unlink(tmpname);
- if(fcntl(fd, F_OPLKREG, pfd[1]) == -1) {
+ if(sys_fcntl_long(fd, F_OPLKREG, pfd[1]) == -1) {
DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \
Disabling kernel oplock support.\n" ));
close(pfd[0]);
@@ -66,7 +66,7 @@ Disabling kernel oplock support.\n" ));
return False;
}
- if(fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) {
+ if(sys_fcntl_long(fd, F_OPLKACK, OP_REVOKE) < 0 ) {
DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \
Disabling kernel oplock support.\n", strerror(errno) ));
close(pfd[0]);
@@ -112,7 +112,7 @@ Error was %s.\n", strerror(errno) ));
* request outstanding.
*/
- if(fcntl(oplock_pipe_read, F_OPLKSTAT, &os) < 0) {
+ if(sys_fcntl_ptr(oplock_pipe_read, F_OPLKSTAT, &os) < 0) {
DEBUG(0,("receive_local_message: fcntl of kernel notification failed. \
Error was %s.\n", strerror(errno) ));
if(errno == EAGAIN) {
@@ -165,7 +165,7 @@ dev = %x, inode = %.0f\n, file_id = %ul", (unsigned int)fsp->dev, (double)fsp->i
static BOOL irix_set_kernel_oplock(files_struct *fsp, int oplock_type)
{
- if (fcntl(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) {
+ if (sys_fcntl_long(fsp->fd, F_OPLKREG, oplock_pipe_write) == -1) {
if(errno != EAGAIN) {
DEBUG(0,("set_file_oplock: Unable to get kernel oplock on file %s, dev = %x, \
inode = %.0f, file_id = %ul. Error was %s\n",
@@ -196,7 +196,7 @@ static void irix_release_kernel_oplock(files_struct *fsp)
* Check and print out the current kernel
* oplock state of this file.
*/
- int state = fcntl(fsp->fd, F_OPLKACK, -1);
+ int state = sys_fcntl_long(fsp->fd, F_OPLKACK, -1);
dbgtext("release_kernel_oplock: file %s, dev = %x, inode = %.0f file_id = %ul, has kernel \
oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev,
(double)fsp->inode, fsp->file_id, state );
@@ -205,7 +205,7 @@ oplock state of %x.\n", fsp->fsp_name, (unsigned int)fsp->dev,
/*
* Remove the kernel oplock on this file.
*/
- if(fcntl(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) {
+ if(sys_fcntl_long(fsp->fd, F_OPLKACK, OP_REVOKE) < 0) {
if( DEBUGLVL( 0 )) {
dbgtext("release_kernel_oplock: Error when removing kernel oplock on file " );
dbgtext("%s, dev = %x, inode = %.0f, file_id = %ul. Error was %s\n",
diff --git a/source/smbd/password.c b/source/smbd/password.c
index 4ccade52cec..b861bfbea5d 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -22,7 +22,6 @@
#include "includes.h"
extern int Protocol;
-extern struct in_addr ipzero;
/* users from session setup */
static pstring session_users="";
@@ -314,6 +313,15 @@ int register_vuid(uid_t uid,gid_t gid, char *unix_name, char *requested_name,
initialise_groups(unix_name, uid, gid);
get_current_groups( &vuser->n_groups, &vuser->groups);
+#ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS
+ /*
+ * Under OSes to which this applies, we get GID 0 as the first
+ * element of vuser->groups, so we put GID back in there.
+ * It is ignored by setgroups
+ */
+ if (vuser->n_groups) vuser->groups[0] = gid;
+#endif /* HAVE_GETGROUPS_TOO_MANY_EGIDS */
+
if (*pptok)
add_supplementary_nt_login_groups(&vuser->n_groups, &vuser->groups, pptok);
@@ -531,28 +539,11 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal,
if (!lm_pwd || !nt_pwd)
return(False);
-#if 0 /* JERRY */
- /* FIXME! this code looks to be unnecessary now that the passdb
- validates that the username exists and has a valid uid */
- if (pwd != NULL && user == NULL) {
- pass = (struct passwd *) pwd;
- user = pass->pw_name;
- } else {
- /* I don't get this call here. I think it should be moved.
- Need to check on it. --jerry */
- pass = smb_getpwnam(user,True);
- }
-
- if (pass == NULL) {
- DEBUG(1,("Couldn't find user '%s' in UNIX password database.\n",user));
- return(False);
- }
-#endif
-
/* get the account information */
pdb_init_sam(&sampass);
if (!pdb_getsampwnam(sampass, user)) {
DEBUG(1,("Couldn't find user '%s' in passdb.\n", user));
+ pdb_free_sam(sampass);
return(False);
}
@@ -883,103 +874,94 @@ and given password ok (%s)\n", user));
static BOOL check_user_equiv(char *user, char *remote, char *equiv_file)
{
- int plus_allowed = 1;
- char *file_host;
- char *file_user;
- char **lines = file_lines_load(equiv_file, NULL, False);
- int i;
-
- DEBUG(5, ("check_user_equiv %s %s %s\n", user, remote, equiv_file));
- if (! lines) return False;
- for (i=0; lines[i]; i++) {
- char *buf = lines[i];
- trim_string(buf," "," ");
-
- if (buf[0] != '#' && buf[0] != '\n')
- {
- BOOL is_group = False;
- int plus = 1;
- char *bp = buf;
- if (strcmp(buf, "NO_PLUS\n") == 0)
- {
- DEBUG(6, ("check_user_equiv NO_PLUS\n"));
- plus_allowed = 0;
- }
- else {
- if (buf[0] == '+')
- {
- bp++;
- if (*bp == '\n' && plus_allowed)
- {
- /* a bare plus means everbody allowed */
- DEBUG(6, ("check_user_equiv everybody allowed\n"));
- file_lines_free(lines);
- return True;
- }
- }
- else if (buf[0] == '-')
- {
- bp++;
- plus = 0;
- }
- if (*bp == '@')
- {
- is_group = True;
- bp++;
- }
- file_host = strtok(bp, " \t\n");
- file_user = strtok(NULL, " \t\n");
- DEBUG(7, ("check_user_equiv %s %s\n", file_host ? file_host : "(null)",
- file_user ? file_user : "(null)" ));
- if (file_host && *file_host)
- {
- BOOL host_ok = False;
+ int plus_allowed = 1;
+ char *file_host;
+ char *file_user;
+ char **lines = file_lines_load(equiv_file, NULL, False);
+ int i;
+
+ DEBUG(5, ("check_user_equiv %s %s %s\n", user, remote, equiv_file));
+
+ if (! lines)
+ return False;
+
+ for (i=0; lines[i]; i++) {
+ char *buf = lines[i];
+ trim_string(buf," "," ");
+
+ if (buf[0] != '#' && buf[0] != '\n') {
+ BOOL is_group = False;
+ int plus = 1;
+ char *bp = buf;
+ if (strcmp(buf, "NO_PLUS\n") == 0) {
+ DEBUG(6, ("check_user_equiv NO_PLUS\n"));
+ plus_allowed = 0;
+ } else {
+ if (buf[0] == '+') {
+ bp++;
+ if (*bp == '\n' && plus_allowed) {
+ /* a bare plus means everbody allowed */
+ DEBUG(6, ("check_user_equiv everybody allowed\n"));
+ file_lines_free(lines);
+ return True;
+ }
+ } else if (buf[0] == '-') {
+ bp++;
+ plus = 0;
+ }
+ if (*bp == '@') {
+ is_group = True;
+ bp++;
+ }
+ file_host = strtok(bp, " \t\n");
+ file_user = strtok(NULL, " \t\n");
+ DEBUG(7, ("check_user_equiv %s %s\n", file_host ? file_host : "(null)",
+ file_user ? file_user : "(null)" ));
+ if (file_host && *file_host) {
+ BOOL host_ok = False;
#if defined(HAVE_NETGROUP) && defined(HAVE_YP_GET_DEFAULT_DOMAIN)
- if (is_group)
- {
- static char *mydomain = NULL;
- if (!mydomain)
- yp_get_default_domain(&mydomain);
- if (mydomain && innetgr(file_host,remote,user,mydomain))
- host_ok = True;
- }
+ if (is_group) {
+ static char *mydomain = NULL;
+ if (!mydomain)
+ yp_get_default_domain(&mydomain);
+ if (mydomain && innetgr(file_host,remote,user,mydomain))
+ host_ok = True;
+ }
#else
- if (is_group)
- {
- DEBUG(1,("Netgroups not configured\n"));
- continue;
- }
+ if (is_group) {
+ DEBUG(1,("Netgroups not configured\n"));
+ continue;
+ }
#endif
- /* is it this host */
- /* the fact that remote has come from a call of gethostbyaddr
- * means that it may have the fully qualified domain name
- * so we could look up the file version to get it into
- * a canonical form, but I would rather just type it
- * in full in the equiv file
- */
- if (!host_ok && !is_group && strequal(remote, file_host))
- host_ok = True;
-
- if (!host_ok)
- continue;
-
- /* is it this user */
- if (file_user == 0 || strequal(user, file_user))
- {
- DEBUG(5, ("check_user_equiv matched %s%s %s\n",
- (plus ? "+" : "-"), file_host,
- (file_user ? file_user : "")));
- file_lines_free(lines);
- return (plus ? True : False);
- }
- }
- }
- }
- }
- file_lines_free(lines);
- return False;
+ /* is it this host */
+ /* the fact that remote has come from a call of gethostbyaddr
+ * means that it may have the fully qualified domain name
+ * so we could look up the file version to get it into
+ * a canonical form, but I would rather just type it
+ * in full in the equiv file
+ */
+ if (!host_ok && !is_group && strequal(remote, file_host))
+ host_ok = True;
+
+ if (!host_ok)
+ continue;
+
+ /* is it this user */
+ if (file_user == 0 || strequal(user, file_user)) {
+ DEBUG(5, ("check_user_equiv matched %s%s %s\n",
+ (plus ? "+" : "-"), file_host,
+ (file_user ? file_user : "")));
+ file_lines_free(lines);
+ return (plus ? True : False);
+ }
+ }
+ }
+ }
+ }
+ file_lines_free(lines);
+ return False;
}
/****************************************************************************
@@ -1204,164 +1186,210 @@ use this machine as the password server.\n"));
return(True);
}
+static char *mutex_server_name;
+
+static BOOL grab_server_mutex(const char *name)
+{
+ mutex_server_name = strdup(name);
+ if (!mutex_server_name) {
+ DEBUG(0,("grab_server_mutex: malloc failed for %s\n", name));
+ return False;
+ }
+ if (!message_named_mutex(name, 20)) {
+ DEBUG(10,("grab_server_mutex: failed for %s\n", name));
+ SAFE_FREE(mutex_server_name);
+ return False;
+ }
+
+ return True;
+}
+
+static void release_server_mutex(void)
+{
+ if (mutex_server_name) {
+ message_named_mutex_release(mutex_server_name);
+ SAFE_FREE(mutex_server_name);
+ }
+}
+
/***********************************************************************
Connect to a remote machine for domain security authentication
given a name or IP address.
************************************************************************/
-static BOOL connect_to_domain_password_server(struct cli_state *pcli,
- char *server, unsigned char *trust_passwd)
+static BOOL connect_to_domain_password_server(struct cli_state **ppcli,
+ char *server, unsigned char *trust_passwd)
{
- struct in_addr dest_ip;
- fstring remote_machine;
-
- if(!cli_initialise(pcli)) {
- DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n"));
- return False;
- }
-
- if (is_ipaddress(server)) {
- struct in_addr to_ip;
-
- /* we shouldn't have 255.255.255.255 forthe IP address of
- a password server anyways */
- if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) {
- DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server));
- return False;
- }
-
- if (!name_status_find("*", 0, 0x20, to_ip, remote_machine)) {
- DEBUG(1, ("connect_to_domain_password_server: Can't "
- "resolve name for IP %s\n", server));
- return False;
- }
- } else {
- fstrcpy(remote_machine, server);
- }
-
- standard_sub_basic(remote_machine);
- strupper(remote_machine);
-
- if(!resolve_name( remote_machine, &dest_ip, 0x20)) {
- DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine));
- cli_shutdown(pcli);
- return False;
- }
-
- if (ismyip(dest_ip)) {
- DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n",
- remote_machine));
- cli_shutdown(pcli);
- return False;
- }
+ struct in_addr dest_ip;
+ fstring remote_machine;
+ struct cli_state *pcli = NULL;
+
+ *ppcli = NULL;
+
+ if(!(pcli = cli_initialise(NULL))) {
+ DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n"));
+ return False;
+ }
+
+ if (is_ipaddress(server)) {
+ struct in_addr to_ip;
+
+ /* we shouldn't have 255.255.255.255 forthe IP address of a password server anyways */
+ if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) {
+ DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server));
+ return False;
+ }
+
+ if (!name_status_find("*", 0, 0x20, to_ip, remote_machine)) {
+ DEBUG(1, ("connect_to_domain_password_server: Can't " "resolve name for IP %s\n", server));
+ return False;
+ }
+ } else {
+ fstrcpy(remote_machine, server);
+ }
+
+ standard_sub_basic(remote_machine);
+ strupper(remote_machine);
+
+ if(!resolve_name( remote_machine, &dest_ip, 0x20)) {
+ DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine));
+ cli_shutdown(pcli);
+ return False;
+ }
- if (!cli_connect(pcli, remote_machine, &dest_ip)) {
- DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \
+ if (ismyip(dest_ip)) {
+ DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n",
+ remote_machine));
+ cli_shutdown(pcli);
+ return False;
+ }
+
+ /* 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 (!grab_server_mutex(server))
+ return False;
+
+ if (!cli_connect(pcli, remote_machine, &dest_ip)) {
+ DEBUG(0,("connect_to_domain_password_server: unable to connect to SMB server on \
machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
- cli_shutdown(pcli);
- return False;
- }
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
- if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) {
- DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \
+ if (!attempt_netbios_session_request(pcli, global_myname, remote_machine, &dest_ip)) {
+ DEBUG(0,("connect_to_password_server: machine %s rejected the NetBIOS \
session request. Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
- return False;
- }
+ release_server_mutex();
+ return False;
+ }
- pcli->protocol = PROTOCOL_NT1;
+ pcli->protocol = PROTOCOL_NT1;
- if (!cli_negprot(pcli)) {
- DEBUG(0,("connect_to_domain_password_server: machine %s rejected the negotiate protocol. \
+ if (!cli_negprot(pcli)) {
+ DEBUG(0,("connect_to_domain_password_server: machine %s rejected the negotiate protocol. \
Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
- cli_shutdown(pcli);
- return False;
- }
-
- if (pcli->protocol != PROTOCOL_NT1) {
- DEBUG(0,("connect_to_domain_password_server: machine %s didn't negotiate NT protocol.\n",
- remote_machine));
- cli_shutdown(pcli);
- return False;
- }
-
- /*
- * Do an anonymous session setup.
- */
-
- if (!cli_session_setup(pcli, "", "", 0, "", 0, "")) {
- DEBUG(0,("connect_to_domain_password_server: machine %s rejected the session setup. \
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ if (pcli->protocol != PROTOCOL_NT1) {
+ DEBUG(0,("connect_to_domain_password_server: machine %s didn't negotiate NT protocol.\n",
+ remote_machine));
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ /*
+ * Do an anonymous session setup.
+ */
+
+ if (!cli_session_setup(pcli, "", "", 0, "", 0, "")) {
+ DEBUG(0,("connect_to_domain_password_server: machine %s rejected the session setup. \
Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
- cli_shutdown(pcli);
- return False;
- }
-
- if (!(pcli->sec_mode & 1)) {
- DEBUG(1,("connect_to_domain_password_server: machine %s isn't in user level security mode\n",
- remote_machine));
- cli_shutdown(pcli);
- return False;
- }
-
- if (!cli_send_tconX(pcli, "IPC$", "IPC", "", 1)) {
- DEBUG(0,("connect_to_domain_password_server: machine %s rejected the tconX on the IPC$ share. \
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ if (!(pcli->sec_mode & 1)) {
+ DEBUG(1,("connect_to_domain_password_server: machine %s isn't in user level security mode\n",
+ remote_machine));
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ if (!cli_send_tconX(pcli, "IPC$", "IPC", "", 1)) {
+ DEBUG(0,("connect_to_domain_password_server: machine %s rejected the tconX on the IPC$ share. \
Error was : %s.\n", remote_machine, cli_errstr(pcli) ));
- cli_shutdown(pcli);
- return False;
- }
-
- /*
- * We now have an anonymous connection to IPC$ on the domain password server.
- */
-
- /*
- * Even if the connect succeeds we need to setup the netlogon
- * pipe here. We do this as we may just have changed the domain
- * account password on the PDC and yet we may be talking to
- * a BDC that doesn't have this replicated yet. In this case
- * a successful connect to a DC needs to take the netlogon connect
- * into account also. This patch from "Bjart Kvarme" <bjart.kvarme@usit.uio.no>.
- */
-
- if(cli_nt_session_open(pcli, PIPE_NETLOGON) == False) {
- DEBUG(0,("connect_to_domain_password_server: unable to open the domain client session to \
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ /*
+ * We now have an anonymous connection to IPC$ on the domain password server.
+ */
+
+ /*
+ * Even if the connect succeeds we need to setup the netlogon
+ * pipe here. We do this as we may just have changed the domain
+ * account password on the PDC and yet we may be talking to
+ * a BDC that doesn't have this replicated yet. In this case
+ * a successful connect to a DC needs to take the netlogon connect
+ * into account also. This patch from "Bjart Kvarme" <bjart.kvarme@usit.uio.no>.
+ */
+
+ if(cli_nt_session_open(pcli, PIPE_NETLOGON) == False) {
+ DEBUG(0,("connect_to_domain_password_server: unable to open the domain client session to \
machine %s. Error was : %s.\n", remote_machine, cli_errstr(pcli)));
- cli_nt_session_close(pcli);
- cli_ulogoff(pcli);
- cli_shutdown(pcli);
- return False;
- }
-
- if (!NT_STATUS_IS_OK(cli_nt_setup_creds(pcli, trust_passwd))) {
- DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \
+ cli_nt_session_close(pcli);
+ cli_ulogoff(pcli);
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ if (!NT_STATUS_IS_OK(cli_nt_setup_creds(pcli, trust_passwd))) {
+ DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \
%s. Error was : %s.\n", remote_machine, cli_errstr(pcli)));
- cli_nt_session_close(pcli);
- cli_ulogoff(pcli);
- cli_shutdown(pcli);
- return(False);
- }
+ cli_nt_session_close(pcli);
+ cli_ulogoff(pcli);
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return(False);
+ }
+
+ *ppcli = pcli;
- return True;
+ /* We exit here with the mutex *locked*. JRA */
+ return True;
}
/***********************************************************************
Utility function to attempt a connection to an IP address of a DC.
************************************************************************/
-static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, unsigned char *trust_passwd)
+static BOOL attempt_connect_to_dc(struct cli_state **ppcli, struct in_addr *ip, unsigned char *trust_passwd)
{
- fstring dc_name;
+ fstring dc_name;
- /*
- * Ignore addresses we have already tried.
- */
+ /*
+ * Ignore addresses we have already tried.
+ */
- if (ip_equal(ipzero, *ip))
- return False;
+ if (is_zero_ip(*ip))
+ return False;
- if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name))
- return False;
+ if (!lookup_dc_name(global_myname, lp_workgroup(), ip, dc_name))
+ return False;
- return connect_to_domain_password_server(pcli, dc_name, trust_passwd);
+ return connect_to_domain_password_server(ppcli, dc_name, trust_passwd);
}
/***********************************************************************
@@ -1369,7 +1397,7 @@ static BOOL attempt_connect_to_dc(struct cli_state *pcli, struct in_addr *ip, un
the PDC and BDC's for this DOMAIN, and query them in turn.
************************************************************************/
-static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd, time_t last_change_time)
+static BOOL find_connect_pdc(struct cli_state **ppcli, unsigned char *trust_passwd, time_t last_change_time)
{
struct in_addr *ip_list = NULL;
int count = 0;
@@ -1400,10 +1428,10 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd
if(!is_local_net(ip_list[i]))
continue;
- if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
+ if((connected_ok = attempt_connect_to_dc(ppcli, &ip_list[i], trust_passwd)))
break;
- ip_list[i] = ipzero; /* Tried and failed. */
+ zero_ip(&ip_list[i]); /* Tried and failed. */
}
/*
@@ -1412,8 +1440,10 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd
if(!connected_ok) {
i = (sys_random() % count);
- if (!(connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
- ip_list[i] = ipzero; /* Tried and failed. */
+ if (!is_zero_ip(ip_list[i])) {
+ if (!(connected_ok = attempt_connect_to_dc(ppcli, &ip_list[i], trust_passwd)))
+ zero_ip(&ip_list[i]); /* Tried and failed. */
+ }
}
/*
@@ -1426,13 +1456,15 @@ static BOOL find_connect_pdc(struct cli_state *pcli, unsigned char *trust_passwd
* Note that from a WINS server the #1 IP address is the PDC.
*/
for(i = 0; i < count; i++) {
- if((connected_ok = attempt_connect_to_dc(pcli, &ip_list[i], trust_passwd)))
+ if (is_zero_ip(ip_list[i]))
+ continue;
+
+ if((connected_ok = attempt_connect_to_dc(ppcli, &ip_list[i], trust_passwd)))
break;
}
}
SAFE_FREE(ip_list);
-
return connected_ok;
}
@@ -1446,204 +1478,203 @@ BOOL domain_client_validate( char *user, char *domain,
char *smb_ntpasswd, int smb_ntpasslen,
BOOL *user_exists, NT_USER_TOKEN **pptoken)
{
- unsigned char local_challenge[8];
- unsigned char local_lm_response[24];
- unsigned char local_nt_response[24];
- unsigned char trust_passwd[16];
- fstring remote_machine;
- char *p, *pserver;
- NET_ID_INFO_CTR ctr;
- NET_USER_INFO_3 info3;
- struct cli_state cli;
- uint32 smb_uid_low;
- BOOL connected_ok = False;
- time_t last_change_time;
- NTSTATUS status;
-
- if (pptoken)
- *pptoken = NULL;
-
- if(user_exists != NULL)
- *user_exists = True; /* Only set false on a very specific error. */
+ unsigned char local_challenge[8];
+ unsigned char local_lm_response[24];
+ unsigned char local_nt_response[24];
+ unsigned char trust_passwd[16];
+ fstring remote_machine;
+ char *p, *pserver;
+ NET_ID_INFO_CTR ctr;
+ NET_USER_INFO_3 info3;
+ struct cli_state *pcli = NULL;
+ uint32 smb_uid_low;
+ BOOL connected_ok = False;
+ time_t last_change_time;
+ NTSTATUS status;
+
+ if (pptoken)
+ *pptoken = NULL;
+
+ if(user_exists != NULL)
+ *user_exists = True; /* Only set false on a very specific error. */
- /*
- * Check that the requested domain is not our own machine name.
- * If it is, we should never check the PDC here, we use our own local
- * password file.
- */
-
- if(strequal( domain, global_myname)) {
- DEBUG(3,("domain_client_validate: Requested domain was for this machine.\n"));
- return False;
- }
-
- /*
- * Next, check that the passwords given were encrypted.
- */
-
- if(((smb_apasslen != 24) && (smb_apasslen != 0)) ||
- ((smb_ntpasslen != 24) && (smb_ntpasslen != 0))) {
-
- /*
- * Not encrypted - do so.
- */
-
- DEBUG(3,("domain_client_validate: User passwords not in encrypted format.\n"));
- generate_random_buffer( local_challenge, 8, False);
- SMBencrypt( (uchar *)smb_apasswd, local_challenge, local_lm_response);
- SMBNTencrypt((uchar *)smb_ntpasswd, local_challenge, local_nt_response);
- smb_apasslen = 24;
- smb_ntpasslen = 24;
- smb_apasswd = (char *)local_lm_response;
- smb_ntpasswd = (char *)local_nt_response;
- } else {
-
- /*
- * Encrypted - get the challenge we sent for these
- * responses.
- */
-
- if (!last_challenge(local_challenge)) {
- DEBUG(0,("domain_client_validate: no challenge done - password failed\n"));
- return False;
- }
- }
-
- /*
- * Get the machine account password for our primary domain
- */
- if (!secrets_fetch_trust_account_password(global_myworkgroup, trust_passwd, &last_change_time))
- {
- DEBUG(0, ("domain_client_validate: could not fetch trust account password for domain %s\n", global_myworkgroup));
- return False;
- }
-
- /* Test if machine password is expired and need to be changed */
- if (time(NULL) > last_change_time + lp_machine_password_timeout())
- global_machine_password_needs_changing = True;
-
- /*
- * At this point, smb_apasswd points to the lanman response to
- * the challenge in local_challenge, and smb_ntpasswd points to
- * the NT response to the challenge in local_challenge. Ship
- * these over the secure channel to a domain controller and
- * see if they were valid.
- */
-
- ZERO_STRUCT(cli);
-
- /*
- * Treat each name in the 'password server =' line as a potential
- * PDC/BDC. Contact each in turn and try and authenticate.
- */
-
- pserver = lp_passwordserver();
- if (! *pserver) pserver = "*";
- p = pserver;
-
- while (!connected_ok &&
- next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine))) {
- if(strequal(remote_machine, "*")) {
- connected_ok = find_connect_pdc(&cli, trust_passwd, last_change_time);
- } else {
- connected_ok = connect_to_domain_password_server(&cli, remote_machine, trust_passwd);
- }
- }
-
- if (!connected_ok) {
- DEBUG(0,("domain_client_validate: Domain password server not available.\n"));
- cli_shutdown(&cli);
- return False;
- }
-
- /* We really don't care what LUID we give the user. */
- generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False);
-
- ZERO_STRUCT(info3);
-
- status = cli_nt_login_network(&cli, domain, user, smb_uid_low, (char *)local_challenge,
- ((smb_apasslen != 0) ? smb_apasswd : NULL),
- ((smb_ntpasslen != 0) ? smb_ntpasswd : NULL),
- &ctr, &info3);
-
- if (!NT_STATUS_IS_OK(status)) {
-
- DEBUG(0,("domain_client_validate: unable to validate password for user %s in domain \
+ /*
+ * Check that the requested domain is not our own machine name.
+ * If it is, we should never check the PDC here, we use our own local
+ * password file.
+ */
+
+ if(strequal( domain, global_myname)) {
+ DEBUG(3,("domain_client_validate: Requested domain was for this machine.\n"));
+ return False;
+ }
+
+ /*
+ * Next, check that the passwords given were encrypted.
+ */
+
+ if(((smb_apasslen != 24) && (smb_apasslen != 0)) ||
+ ((smb_ntpasslen != 24) && (smb_ntpasslen != 0))) {
+
+ /*
+ * Not encrypted - do so.
+ */
+
+ DEBUG(3,("domain_client_validate: User passwords not in encrypted format.\n"));
+ generate_random_buffer( local_challenge, 8, False);
+ SMBencrypt( (uchar *)smb_apasswd, local_challenge, local_lm_response);
+ SMBNTencrypt((uchar *)smb_ntpasswd, local_challenge, local_nt_response);
+ smb_apasslen = 24;
+ smb_ntpasslen = 24;
+ smb_apasswd = (char *)local_lm_response;
+ smb_ntpasswd = (char *)local_nt_response;
+ } else {
+
+ /*
+ * Encrypted - get the challenge we sent for these
+ * responses.
+ */
+
+ if (!last_challenge(local_challenge)) {
+ DEBUG(0,("domain_client_validate: no challenge done - password failed\n"));
+ return False;
+ }
+ }
+
+ /*
+ * Get the machine account password for our primary domain
+ */
+
+ if (!secrets_fetch_trust_account_password(global_myworkgroup, trust_passwd, &last_change_time)) {
+ DEBUG(0, ("domain_client_validate: could not fetch trust account password for domain %s\n", global_myworkgroup));
+ return False;
+ }
+
+ /* Test if machine password is expired and need to be changed */
+ if (time(NULL) > last_change_time + lp_machine_password_timeout())
+ global_machine_password_needs_changing = True;
+
+ /*
+ * At this point, smb_apasswd points to the lanman response to
+ * the challenge in local_challenge, and smb_ntpasswd points to
+ * the NT response to the challenge in local_challenge. Ship
+ * these over the secure channel to a domain controller and
+ * see if they were valid.
+ */
+
+ /*
+ * Treat each name in the 'password server =' line as a potential
+ * PDC/BDC. Contact each in turn and try and authenticate.
+ */
+
+ pserver = lp_passwordserver();
+ if (! *pserver)
+ pserver = "*";
+ p = pserver;
+
+ while (!connected_ok &&
+ next_token(&p,remote_machine,LIST_SEP,sizeof(remote_machine))) {
+ if(strequal(remote_machine, "*")) {
+ connected_ok = find_connect_pdc(&pcli, trust_passwd, last_change_time);
+ } else {
+ connected_ok = connect_to_domain_password_server(&pcli, remote_machine, trust_passwd);
+ }
+ }
+
+ if (!connected_ok) {
+ DEBUG(0,("domain_client_validate: Domain password server not available.\n"));
+ if (pcli)
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
+
+ /* We really don't care what LUID we give the user. */
+ generate_random_buffer( (unsigned char *)&smb_uid_low, 4, False);
+
+ ZERO_STRUCT(info3);
+
+ status = cli_nt_login_network(pcli, domain, user, smb_uid_low, (char *)local_challenge,
+ ((smb_apasslen != 0) ? smb_apasswd : NULL),
+ ((smb_ntpasslen != 0) ? smb_ntpasswd : NULL),
+ &ctr, &info3);
+
+ if (!NT_STATUS_IS_OK(status)) {
+
+ DEBUG(0,("domain_client_validate: unable to validate password for user %s in domain \
%s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, get_nt_error_msg(status) ));
- cli_nt_session_close(&cli);
- cli_ulogoff(&cli);
- cli_shutdown(&cli);
+ cli_nt_session_close(pcli);
+ cli_ulogoff(pcli);
+ cli_shutdown(pcli);
+ release_server_mutex();
- if((NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NO_SUCH_USER)) && (user_exists != NULL))
- *user_exists = False;
+ if((NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NO_SUCH_USER)) && (user_exists != NULL))
+ *user_exists = False;
- return False;
- }
+ return False;
+ }
- /*
- * Here, if we really want it, we have lots of info about the user in info3.
- */
+ /*
+ * Here, if we really want it, we have lots of info about the user in info3.
+ */
- /* Return group membership as returned by NT. This contains group
- membership in nested groups which doesn't seem to be accessible by any
- other means. We merge this into the NT_USER_TOKEN associated with the vuid
- later on. */
-
- if (pptoken && (info3.num_groups2 != 0)) {
- NT_USER_TOKEN *ptok;
- int i;
- DOM_SID domain_sid;
+ /* Return group membership as returned by NT. This contains group
+ membership in nested groups which doesn't seem to be accessible by any
+ other means. We merge this into the NT_USER_TOKEN associated with the vuid
+ later on. */
- *pptoken = NULL;
+ if (pptoken && (info3.num_groups2 != 0)) {
+ NT_USER_TOKEN *ptok;
+ int i;
- if ((ptok = (NT_USER_TOKEN *)malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) {
- DEBUG(0, ("domain_client_validate: Out of memory allocating NT_USER_TOKEN\n"));
- return False;
- }
+ *pptoken = NULL;
- 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"));
- SAFE_FREE(ptok);
- return False;
- }
+ if ((ptok = (NT_USER_TOKEN *)malloc( sizeof(NT_USER_TOKEN) ) ) == NULL) {
+ DEBUG(0, ("domain_client_validate: Out of memory allocating NT_USER_TOKEN\n"));
+ release_server_mutex();
+ return False;
+ }
- if (!secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) {
- DEBUG(0, ("domain_client_validate: unable to fetch domain sid.\n"));
- delete_nt_token(&ptok);
- return False;
- }
+ 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"));
+ SAFE_FREE(ptok);
+ release_server_mutex();
+ return False;
+ }
- for (i = 0; i < ptok->num_sids; i++) {
- sid_copy(&ptok->user_sids[i], &domain_sid);
- sid_append_rid(&ptok->user_sids[i], info3.gids[i].g_rid);
- }
- *pptoken = ptok;
- }
+ 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);
+ }
+ *pptoken = ptok;
+ }
#if 0
- /*
- * We don't actually need to do this - plus it fails currently with
- * NT_STATUS_INVALID_INFO_CLASS - we need to know *exactly* what to
- * send here. JRA.
- */
-
- if(cli_nt_logoff(&cli, &ctr) == False) {
- DEBUG(0,("domain_client_validate: unable to log off user %s in domain \
-%s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, cli_errstr(&cli)));
- cli_nt_session_close(&cli);
- cli_ulogoff(&cli);
- cli_shutdown(&cli);
- return False;
- }
+ /*
+ * We don't actually need to do this - plus it fails currently with
+ * NT_STATUS_INVALID_INFO_CLASS - we need to know *exactly* what to
+ * send here. JRA.
+ */
+
+ if(cli_nt_logoff(pcli, &ctr) == False) {
+ DEBUG(0,("domain_client_validate: unable to log off user %s in domain \
+%s to Domain controller %s. Error was %s.\n", user, domain, remote_machine, cli_errstr(pcli)));
+ cli_nt_session_close(pcli);
+ cli_ulogoff(pcli);
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return False;
+ }
#endif /* 0 */
- /* 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..... */
+ /* 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..... */
- cli_nt_session_close(&cli);
- cli_ulogoff(&cli);
- cli_shutdown(&cli);
- return True;
+ cli_nt_session_close(pcli);
+ cli_ulogoff(pcli);
+ cli_shutdown(pcli);
+ release_server_mutex();
+ return True;
}
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index 99c5760314b..6a0aa982b42 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -154,13 +154,13 @@ static void print_canon_ace_list(const char *name, canon_ace *ace_list)
Map POSIX ACL perms to canon_ace permissions (a mode_t containing only S_(R|W|X)USR bits).
****************************************************************************/
-static mode_t convert_permset_to_mode_t(SMB_ACL_PERMSET_T permset)
+static mode_t convert_permset_to_mode_t(connection_struct *conn, SMB_ACL_PERMSET_T permset)
{
mode_t ret = 0;
- ret |= (sys_acl_get_perm(permset, SMB_ACL_READ) ? S_IRUSR : 0);
- ret |= (sys_acl_get_perm(permset, SMB_ACL_WRITE) ? S_IWUSR : 0);
- ret |= (sys_acl_get_perm(permset, SMB_ACL_EXECUTE) ? S_IXUSR : 0);
+ ret |= (conn->vfs_ops.sys_acl_get_perm(conn, permset, SMB_ACL_READ) ? S_IRUSR : 0);
+ ret |= (conn->vfs_ops.sys_acl_get_perm(conn, permset, SMB_ACL_WRITE) ? S_IWUSR : 0);
+ ret |= (conn->vfs_ops.sys_acl_get_perm(conn, permset, SMB_ACL_EXECUTE) ? S_IXUSR : 0);
return ret;
}
@@ -188,20 +188,20 @@ static mode_t unix_perms_to_acl_perms(mode_t mode, int r_mask, int w_mask, int x
an SMB_ACL_PERMSET_T.
****************************************************************************/
-static int map_acl_perms_to_permset(mode_t mode, SMB_ACL_PERMSET_T *p_permset)
+static int map_acl_perms_to_permset(connection_struct *conn, mode_t mode, SMB_ACL_PERMSET_T *p_permset)
{
- if (sys_acl_clear_perms(*p_permset) == -1)
+ if (conn->vfs_ops.sys_acl_clear_perms(conn, *p_permset) == -1)
return -1;
if (mode & S_IRUSR) {
- if (sys_acl_add_perm(*p_permset, SMB_ACL_READ) == -1)
+ if (conn->vfs_ops.sys_acl_add_perm(conn, *p_permset, SMB_ACL_READ) == -1)
return -1;
}
if (mode & S_IWUSR) {
- if (sys_acl_add_perm(*p_permset, SMB_ACL_WRITE) == -1)
+ if (conn->vfs_ops.sys_acl_add_perm(conn, *p_permset, SMB_ACL_WRITE) == -1)
return -1;
}
if (mode & S_IXUSR) {
- if (sys_acl_add_perm(*p_permset, SMB_ACL_EXECUTE) == -1)
+ if (conn->vfs_ops.sys_acl_add_perm(conn, *p_permset, SMB_ACL_EXECUTE) == -1)
return -1;
}
return 0;
@@ -440,8 +440,15 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp,
if (security_info_sent & OWNER_SECURITY_INFORMATION) {
sid_copy(&owner_sid, psd->owner_sid);
if (!sid_to_uid( &owner_sid, puser, &sid_type)) {
- DEBUG(3,("unpack_nt_owners: unable to validate owner sid.\n"));
+#if ACL_FORCE_UNMAPPABLE
+ /* this allows take ownership to work reasonably */
+ extern struct current_user current_user;
+ *puser = current_user.uid;
+#else
+ DEBUG(3,("unpack_nt_owners: unable to validate owner sid for %s.\n",
+ sid_string_static(&owner_sid)));
return False;
+#endif
}
}
@@ -453,8 +460,14 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp,
if (security_info_sent & GROUP_SECURITY_INFORMATION) {
sid_copy(&grp_sid, psd->grp_sid);
if (!sid_to_gid( &grp_sid, pgrp, &sid_type)) {
+#if ACL_FORCE_UNMAPPABLE
+ /* this allows take group ownership to work reasonably */
+ extern struct current_user current_user;
+ *pgrp = current_user.gid;
+#else
DEBUG(3,("unpack_nt_owners: unable to validate group sid.\n"));
return False;
+#endif
}
}
@@ -1425,6 +1438,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
DOM_SID *powner, DOM_SID *pgroup)
{
extern DOM_SID global_sid_World;
+ connection_struct *conn = fsp->conn;
mode_t acl_mask = (S_IRUSR|S_IWUSR|S_IXUSR);
canon_ace *list_head = NULL;
canon_ace *ace = NULL;
@@ -1433,7 +1447,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
SMB_ACL_ENTRY_T entry;
size_t ace_count;
- while ( posix_acl && (sys_acl_get_entry(posix_acl, entry_id, &entry) == 1)) {
+ while ( posix_acl && (conn->vfs_ops.sys_acl_get_entry(conn, posix_acl, entry_id, &entry) == 1)) {
SMB_ACL_TAG_T tagtype;
SMB_ACL_PERMSET_T permset;
DOM_SID sid;
@@ -1445,10 +1459,10 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
entry_id = SMB_ACL_NEXT_ENTRY;
/* Is this a MASK entry ? */
- if (sys_acl_get_tag_type(entry, &tagtype) == -1)
+ if (conn->vfs_ops.sys_acl_get_tag_type(conn, entry, &tagtype) == -1)
continue;
- if (sys_acl_get_permset(entry, &permset) == -1)
+ if (conn->vfs_ops.sys_acl_get_permset(conn, entry, &permset) == -1)
continue;
/* Decide which SID to use based on the ACL type. */
@@ -1461,7 +1475,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
break;
case SMB_ACL_USER:
{
- uid_t *puid = (uid_t *)sys_acl_get_qualifier(entry);
+ uid_t *puid = (uid_t *)conn->vfs_ops.sys_acl_get_qualifier(conn, entry);
if (puid == NULL) {
DEBUG(0,("canonicalise_acl: Failed to get uid.\n"));
continue;
@@ -1469,7 +1483,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
uid_to_sid( &sid, *puid);
unix_ug.uid = *puid;
owner_type = UID_ACE;
- sys_acl_free_qualifier((void *)puid,tagtype);
+ conn->vfs_ops.sys_acl_free_qualifier(conn, (void *)puid,tagtype);
break;
}
case SMB_ACL_GROUP_OBJ:
@@ -1480,7 +1494,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
break;
case SMB_ACL_GROUP:
{
- gid_t *pgid = (gid_t *)sys_acl_get_qualifier(entry);
+ gid_t *pgid = (gid_t *)conn->vfs_ops.sys_acl_get_qualifier(conn, entry);
if (pgid == NULL) {
DEBUG(0,("canonicalise_acl: Failed to get gid.\n"));
continue;
@@ -1488,11 +1502,11 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
gid_to_sid( &sid, *pgid);
unix_ug.gid = *pgid;
owner_type = GID_ACE;
- sys_acl_free_qualifier((void *)pgid,tagtype);
+ conn->vfs_ops.sys_acl_free_qualifier(conn, (void *)pgid,tagtype);
break;
}
case SMB_ACL_MASK:
- acl_mask = convert_permset_to_mode_t(permset);
+ acl_mask = convert_permset_to_mode_t(conn, permset);
continue; /* Don't count the mask as an entry. */
case SMB_ACL_OTHER:
/* Use the Everyone SID */
@@ -1514,7 +1528,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
ZERO_STRUCTP(ace);
ace->type = tagtype;
- ace->perms = convert_permset_to_mode_t(permset);
+ ace->perms = convert_permset_to_mode_t(conn, permset);
ace->attr = ALLOW_ACE;
ace->trustee = sid;
ace->unix_ug = unix_ug;
@@ -1571,8 +1585,9 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_
static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL default_ace, BOOL *pacl_set_support)
{
+ connection_struct *conn = fsp->conn;
BOOL ret = False;
- SMB_ACL_T the_acl = sys_acl_init((int)count_canon_ace_list(the_ace) + 1);
+ SMB_ACL_T the_acl = conn->vfs_ops.sys_acl_init(conn, (int)count_canon_ace_list(the_ace) + 1);
canon_ace *p_ace;
int i;
SMB_ACL_ENTRY_T mask_entry;
@@ -1601,7 +1616,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Get the entry for this ACE.
*/
- if (sys_acl_create_entry( &the_acl, &the_entry) == -1) {
+ if (conn->vfs_ops.sys_acl_create_entry(conn, &the_acl, &the_entry) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to create entry %d. (%s)\n",
i, strerror(errno) ));
goto done;
@@ -1622,7 +1637,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* First tell the entry what type of ACE this is.
*/
- if (sys_acl_set_tag_type(the_entry, p_ace->type) == -1) {
+ if (conn->vfs_ops.sys_acl_set_tag_type(conn, the_entry, p_ace->type) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to set tag type on entry %d. (%s)\n",
i, strerror(errno) ));
goto done;
@@ -1634,7 +1649,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
*/
if ((p_ace->type == SMB_ACL_USER) || (p_ace->type == SMB_ACL_GROUP)) {
- if (sys_acl_set_qualifier(the_entry,(void *)&p_ace->unix_ug.uid) == -1) {
+ if (conn->vfs_ops.sys_acl_set_qualifier(conn, the_entry,(void *)&p_ace->unix_ug.uid) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to set qualifier on entry %d. (%s)\n",
i, strerror(errno) ));
goto done;
@@ -1645,13 +1660,13 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Convert the mode_t perms in the canon_ace to a POSIX permset.
*/
- if (sys_acl_get_permset(the_entry, &the_permset) == -1) {
+ if (conn->vfs_ops.sys_acl_get_permset(conn, the_entry, &the_permset) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to get permset on entry %d. (%s)\n",
i, strerror(errno) ));
goto done;
}
- if (map_acl_perms_to_permset(p_ace->perms, &the_permset) == -1) {
+ if (map_acl_perms_to_permset(conn, p_ace->perms, &the_permset) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to create permset for mode (%u) on entry %d. (%s)\n",
(unsigned int)p_ace->perms, i, strerror(errno) ));
goto done;
@@ -1661,7 +1676,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* ..and apply them to the entry.
*/
- if (sys_acl_set_permset(the_entry, the_permset) == -1) {
+ if (conn->vfs_ops.sys_acl_set_permset(conn, the_entry, the_permset) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to add permset on entry %d. (%s)\n",
i, strerror(errno) ));
goto done;
@@ -1675,27 +1690,27 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Add in a mask of rwx.
*/
- if (sys_acl_create_entry( &the_acl, &mask_entry) == -1) {
+ if (conn->vfs_ops.sys_acl_create_entry( conn, &the_acl, &mask_entry) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to create mask entry. (%s)\n", strerror(errno) ));
goto done;
}
- if (sys_acl_set_tag_type(mask_entry, SMB_ACL_MASK) == -1) {
+ if (conn->vfs_ops.sys_acl_set_tag_type(conn, mask_entry, SMB_ACL_MASK) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to set tag type on mask entry. (%s)\n",strerror(errno) ));
goto done;
}
- if (sys_acl_get_permset(mask_entry, &mask_permset) == -1) {
+ if (conn->vfs_ops.sys_acl_get_permset(conn, mask_entry, &mask_permset) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to get mask permset. (%s)\n", strerror(errno) ));
goto done;
}
- if (map_acl_perms_to_permset(S_IRUSR|S_IWUSR|S_IXUSR, &mask_permset) == -1) {
+ if (map_acl_perms_to_permset(conn, S_IRUSR|S_IWUSR|S_IXUSR, &mask_permset) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to create mask permset. (%s)\n", strerror(errno) ));
goto done;
}
- if (sys_acl_set_permset(mask_entry, mask_permset) == -1) {
+ if (conn->vfs_ops.sys_acl_set_permset(conn, mask_entry, mask_permset) == -1) {
DEBUG(0,("set_canon_ace_list: Failed to add mask permset. (%s)\n", strerror(errno) ));
goto done;
}
@@ -1704,7 +1719,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Check if the ACL is valid.
*/
- if (sys_acl_valid(the_acl) == -1) {
+ if (conn->vfs_ops.sys_acl_valid(conn, the_acl) == -1) {
DEBUG(0,("set_canon_ace_list: ACL type (%s) is invalid for set (%s).\n",
the_acl_type == SMB_ACL_TYPE_DEFAULT ? "directory default" : "file",
strerror(errno) ));
@@ -1716,27 +1731,27 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
*/
if(default_ace || fsp->is_directory || fsp->fd == -1) {
- if (sys_acl_set_file(dos_to_unix(fsp->fsp_name,False), the_acl_type, the_acl) == -1) {
+ if (conn->vfs_ops.sys_acl_set_file(conn, dos_to_unix_static(fsp->fsp_name), the_acl_type, the_acl) == -1) {
/*
* Some systems allow all the above calls and only fail with no ACL support
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
*/
if (errno == ENOSYS)
*pacl_set_support = False;
- DEBUG(2,("set_canon_ace_list: sys_acl_set_file type %s failed for file %s (%s).\n",
+ DEBUG(2,("set_canon_ace_list: conn->vfs_ops.sys_acl_set_file type %s failed for file %s (%s).\n",
the_acl_type == SMB_ACL_TYPE_DEFAULT ? "directory default" : "file",
fsp->fsp_name, strerror(errno) ));
goto done;
}
} else {
- if (sys_acl_set_fd(fsp->fd, the_acl) == -1) {
+ if (conn->vfs_ops.sys_acl_set_fd(fsp, fsp->fd, the_acl) == -1) {
/*
* Some systems allow all the above calls and only fail with no ACL support
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
*/
if (errno == ENOSYS)
*pacl_set_support = False;
- DEBUG(2,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n",
+ DEBUG(2,("set_canon_ace_list: conn->vfs_ops.sys_acl_set_file failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) ));
goto done;
}
@@ -1747,7 +1762,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
done:
if (the_acl != NULL)
- sys_acl_free_acl(the_acl);
+ conn->vfs_ops.sys_acl_free_acl(conn, the_acl);
return ret;
}
@@ -1846,6 +1861,7 @@ static int nt_ace_comp( SEC_ACE *a1, SEC_ACE *a2)
size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
{
+ connection_struct *conn = fsp->conn;
SMB_STRUCT_STAT sbuf;
SEC_ACE *nt_ace_list = NULL;
DOM_SID owner_sid;
@@ -1874,14 +1890,14 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
* Get the ACL from the path.
*/
- posix_acl = sys_acl_get_file( dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_ACCESS);
+ posix_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_ACCESS);
/*
* If it's a directory get the default POSIX ACL.
*/
if(fsp->is_directory)
- dir_acl = sys_acl_get_file( dos_to_unix(fsp->fsp_name, False), SMB_ACL_TYPE_DEFAULT);
+ dir_acl = conn->vfs_ops.sys_acl_get_file( conn, dos_to_unix_static(fsp->fsp_name), SMB_ACL_TYPE_DEFAULT);
} else {
@@ -1892,7 +1908,7 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
/*
* Get the ACL from the fd.
*/
- posix_acl = sys_acl_get_fd(fsp->fd);
+ posix_acl = conn->vfs_ops.sys_acl_get_fd(fsp, fsp->fd);
}
DEBUG(5,("get_nt_acl : file ACL %s, directory ACL %s\n",
@@ -1983,9 +1999,9 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
done:
if (posix_acl)
- sys_acl_free_acl(posix_acl);
+ conn->vfs_ops.sys_acl_free_acl(conn, posix_acl);
if (dir_acl)
- sys_acl_free_acl(dir_acl);
+ conn->vfs_ops.sys_acl_free_acl(conn, dir_acl);
free_canon_ace_list(file_ace);
free_canon_ace_list(dir_ace);
SAFE_FREE(nt_ace_list);
@@ -1993,6 +2009,52 @@ size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc)
return sd_size;
}
+/*
+ try to chown a file. We will be able to chown it under the following conditions
+
+ 1) if we have root privileges, then it will just work
+ 2) if we have write permission to the file and dos_filemodes is set
+ then allow chown to the currently authenticated user.
+
+ */
+static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid)
+{
+ int ret;
+ extern struct current_user current_user;
+ files_struct *fsp;
+ SMB_STRUCT_STAT st;
+
+ /* try the direct way first */
+ ret = vfs_chown(conn, fname, uid, gid);
+ if (ret == 0) return 0;
+
+ if(!CAN_WRITE(conn) || !lp_dos_filemode(SNUM(conn)))
+ return -1;
+
+ if (vfs_stat(conn,fname,&st)) {
+ return -1;
+ }
+
+ fsp = open_file_fchmod(conn,fname,&st);
+ if (!fsp) {
+ return -1;
+ }
+
+ /* only allow chown to the current user. This is more secure,
+ and also copes with the case where the SID in a take ownership ACL is
+ a local SID on the users workstation
+ */
+ uid = current_user.uid;
+
+ become_root();
+ ret = vfswrap_fchown(fsp, fsp->fd, uid, gid);
+ unbecome_root();
+
+ close_file_fchmod(fsp);
+
+ return ret;
+}
+
/****************************************************************************
Reply to set a security descriptor on an fsp. security_info_sent is the
description of the following NT ACL.
@@ -2049,7 +2111,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
DEBUG(3,("set_nt_acl: chown %s. uid = %u, gid = %u.\n",
fsp->fsp_name, (unsigned int)user, (unsigned int)grp ));
- if(vfs_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) {
+ if(try_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) {
DEBUG(3,("set_nt_acl: chown %s, %u, %u failed. Error = %s.\n",
fsp->fsp_name, (unsigned int)user, (unsigned int)grp, strerror(errno) ));
return False;
@@ -2091,7 +2153,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
if ((file_ace_list == NULL) && (dir_ace_list == NULL)) {
/* W2K traverse DACL set - ignore. */
return True;
- }
+ }
if (!acl_perms) {
DEBUG(3,("set_nt_acl: cannot set permissions\n"));
@@ -2138,8 +2200,8 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
* No default ACL - delete one if it exists.
*/
- if (sys_acl_delete_def_file(dos_to_unix(fsp->fsp_name,False)) == -1) {
- DEBUG(3,("set_nt_acl: sys_acl_delete_def_file failed (%s)\n", strerror(errno)));
+ if (conn->vfs_ops.sys_acl_delete_def_file(conn, dos_to_unix_static(fsp->fsp_name)) == -1) {
+ DEBUG(3,("set_nt_acl: conn->vfs_ops.sys_acl_delete_def_file failed (%s)\n", strerror(errno)));
free_canon_ace_list(file_ace_list);
return False;
}
@@ -2166,7 +2228,7 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
DEBUG(3,("set_nt_acl: chmod %s. perms = 0%o.\n",
fsp->fsp_name, (unsigned int)posix_perms ));
- if(conn->vfs_ops.chmod(conn,dos_to_unix(fsp->fsp_name, False), posix_perms) == -1) {
+ if(conn->vfs_ops.chmod(conn,dos_to_unix_static(fsp->fsp_name), posix_perms) == -1) {
DEBUG(3,("set_nt_acl: chmod %s, 0%o failed. Error = %s.\n",
fsp->fsp_name, (unsigned int)posix_perms, strerror(errno) ));
free_canon_ace_list(file_ace_list);
@@ -2188,13 +2250,13 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
and set the mask to rwx. Needed to preserve complex ACLs set by NT.
****************************************************************************/
-static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode)
+static int chmod_acl_internals( connection_struct *conn, SMB_ACL_T posix_acl, mode_t mode)
{
int entry_id = SMB_ACL_FIRST_ENTRY;
SMB_ACL_ENTRY_T entry;
int num_entries = 0;
- while ( sys_acl_get_entry(posix_acl, entry_id, &entry) == 1) {
+ while ( conn->vfs_ops.sys_acl_get_entry(conn, posix_acl, entry_id, &entry) == 1) {
SMB_ACL_TAG_T tagtype;
SMB_ACL_PERMSET_T permset;
mode_t perms;
@@ -2203,10 +2265,10 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode)
if (entry_id == SMB_ACL_FIRST_ENTRY)
entry_id = SMB_ACL_NEXT_ENTRY;
- if (sys_acl_get_tag_type(entry, &tagtype) == -1)
+ if (conn->vfs_ops.sys_acl_get_tag_type(conn, entry, &tagtype) == -1)
return -1;
- if (sys_acl_get_permset(entry, &permset) == -1)
+ if (conn->vfs_ops.sys_acl_get_permset(conn, entry, &permset) == -1)
return -1;
num_entries++;
@@ -2228,10 +2290,10 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode)
continue;
}
- if (map_acl_perms_to_permset(perms, &permset) == -1)
+ if (map_acl_perms_to_permset(conn, perms, &permset) == -1)
return -1;
- if (sys_acl_set_permset(entry, permset) == -1)
+ if (conn->vfs_ops.sys_acl_set_permset(conn, entry, permset) == -1)
return -1;
}
@@ -2252,22 +2314,22 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode)
Note that name is in UNIX character set.
****************************************************************************/
-int chmod_acl(const char *name, mode_t mode)
+int chmod_acl(connection_struct *conn, const char *name, mode_t mode)
{
SMB_ACL_T posix_acl = NULL;
int ret = -1;
- if ((posix_acl = sys_acl_get_file(name, SMB_ACL_TYPE_ACCESS)) == NULL)
+ if ((posix_acl = conn->vfs_ops.sys_acl_get_file(conn, name, SMB_ACL_TYPE_ACCESS)) == NULL)
return -1;
- if ((ret = chmod_acl_internals(posix_acl, mode)) == -1)
+ if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1)
goto done;
- ret = sys_acl_set_file(name, SMB_ACL_TYPE_ACCESS, posix_acl);
+ ret = conn->vfs_ops.sys_acl_set_file(conn, name, SMB_ACL_TYPE_ACCESS, posix_acl);
done:
- sys_acl_free_acl(posix_acl);
+ conn->vfs_ops.sys_acl_free_acl(conn, posix_acl);
return ret;
}
@@ -2276,21 +2338,35 @@ int chmod_acl(const char *name, mode_t mode)
and set the mask to rwx. Needed to preserve complex ACLs set by NT.
****************************************************************************/
-int fchmod_acl(int fd, mode_t mode)
+int fchmod_acl(files_struct *fsp, int fd, mode_t mode)
{
+ connection_struct *conn = fsp->conn;
SMB_ACL_T posix_acl = NULL;
int ret = -1;
- if ((posix_acl = sys_acl_get_fd(fd)) == NULL)
+ if ((posix_acl = conn->vfs_ops.sys_acl_get_fd(fsp, fd)) == NULL)
return -1;
- if ((ret = chmod_acl_internals(posix_acl, mode)) == -1)
+ if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1)
goto done;
- ret = sys_acl_set_fd(fd, posix_acl);
+ ret = conn->vfs_ops.sys_acl_set_fd(fsp, fd, posix_acl);
done:
- sys_acl_free_acl(posix_acl);
+ conn->vfs_ops.sys_acl_free_acl(conn, posix_acl);
return ret;
}
+
+BOOL directory_has_default_acl(connection_struct *conn, const char *fname)
+{
+ SMB_ACL_T dir_acl = conn->vfs_ops.sys_acl_get_file( conn, fname, SMB_ACL_TYPE_DEFAULT);
+ BOOL has_acl = False;
+ SMB_ACL_ENTRY_T entry;
+
+ if (dir_acl != NULL && (conn->vfs_ops.sys_acl_get_entry(conn, dir_acl, SMB_ACL_FIRST_ENTRY, &entry) == 1))
+ has_acl = True;
+
+ conn->vfs_ops.sys_acl_free_acl(conn, dir_acl);
+ return has_acl;
+}
diff --git a/source/smbd/process.c b/source/smbd/process.c
index 1299fd20e3a..e882853e6de 100644
--- a/source/smbd/process.c
+++ b/source/smbd/process.c
@@ -47,6 +47,7 @@ extern int global_oplock_break;
extern userdom_struct current_user_info;
extern int smb_read_error;
extern VOLATILE sig_atomic_t reload_after_sighup;
+extern VOLATILE sig_atomic_t got_sig_term;
extern BOOL global_machine_password_needs_changing;
extern fstring global_myworkgroup;
extern pstring global_myname;
@@ -108,9 +109,10 @@ BOOL push_oplock_pending_smb_message(char *buf, int msg_len)
}
/****************************************************************************
-do all async processing in here. This includes UDB oplock messages, kernel
-oplock messages, change notify events etc.
+ Do all async processing in here. This includes UDB oplock messages, kernel
+ oplock messages, change notify events etc.
****************************************************************************/
+
static void async_processing(fd_set *fds, char *buffer, int buffer_len)
{
/* check for oplock messages (both UDP and kernel) */
@@ -118,6 +120,10 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len)
process_local_message(buffer, buffer_len);
}
+ if (got_sig_term) {
+ exit_server("Caught TERM signal");
+ }
+
/* check for async change notify events */
process_pending_change_notify_queue(0);
@@ -126,7 +132,7 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len)
change_to_root_user();
DEBUG(1,("Reloading services after SIGHUP\n"));
reload_services(False);
- reload_after_sighup = False;
+ reload_after_sighup = 0;
}
}
@@ -1063,7 +1069,7 @@ void check_reload(int t)
if (reload_after_sighup || (t >= last_smb_conf_reload_time+SMBD_RELOAD_CHECK))
{
reload_services(True);
- reload_after_sighup = False;
+ reload_after_sighup = 0;
last_smb_conf_reload_time = t;
}
}
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index ae8d4b0ad47..562b0492ca0 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -236,9 +236,9 @@ int reply_tcon(connection_struct *conn,
* Ensure the user and password names are in UNIX codepage format.
*/
- pstrcpy(user,dos_to_unix(user,False));
+ pstrcpy(user,dos_to_unix_static(user));
if (!doencrypt)
- pstrcpy(password,dos_to_unix(password,False));
+ pstrcpy(password,dos_to_unix_static(password));
/*
* Pass the user through the NT -> unix user mapping
@@ -346,9 +346,9 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
* Ensure the user and password names are in UNIX codepage format.
*/
- pstrcpy(user,dos_to_unix(user,False));
+ pstrcpy(user,dos_to_unix_static(user));
if (!doencrypt)
- pstrcpy(password,dos_to_unix(password,False));
+ pstrcpy(password,dos_to_unix_static(password));
/*
* Pass the user through the NT -> unix user mapping
@@ -385,7 +385,8 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
/* what does setting this bit do? It is set by NT4 and
may affect the ability to autorun mounted cdroms */
- SSVAL(outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS);
+ SSVAL(outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS|
+ (lp_csc_policy(SNUM(conn)) << 2));
init_dfsroot(conn, inbuf, outbuf);
}
@@ -726,7 +727,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
* Incoming user is in DOS codepage format. Convert
* to UNIX.
*/
- pstrcpy(user,dos_to_unix(user,False));
+ pstrcpy(user,dos_to_unix_static(user));
if (!doencrypt && (lp_security() != SEC_SERVER)) {
smb_apasslen = strlen(smb_apasswd);
@@ -812,8 +813,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
* Ensure the plaintext passwords are in UNIX format.
*/
if(!doencrypt) {
- pstrcpy(smb_apasswd,dos_to_unix(smb_apasswd,False));
- pstrcpy(smb_ntpasswd,dos_to_unix(smb_ntpasswd,False));
+ pstrcpy(smb_apasswd,dos_to_unix_static(smb_apasswd));
+ pstrcpy(smb_ntpasswd,dos_to_unix_static(smb_ntpasswd));
}
} else {
@@ -823,7 +824,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
/*
* Ensure the plaintext password is in UNIX format.
*/
- pstrcpy(smb_apasswd,dos_to_unix(smb_apasswd,False));
+ pstrcpy(smb_apasswd,dos_to_unix_static(smb_apasswd));
/* trim the password */
smb_apasslen = strlen(smb_apasswd);
@@ -842,8 +843,8 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
* Incoming user and domain are in DOS codepage format. Convert
* to UNIX.
*/
- pstrcpy(user,dos_to_unix(user,False));
- fstrcpy(domain, dos_to_unix(p, False));
+ pstrcpy(user,dos_to_unix_static(user));
+ fstrcpy(domain, dos_to_unix_static(p));
DEBUG(3,("Domain=[%s] NativeOS=[%s] NativeLanMan=[%s]\n",
domain,skip_string(p,1),skip_string(p,2)));
}
@@ -912,7 +913,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
/* Work out who's who */
slprintf(dom_user, sizeof(dom_user) - 1,"%s%s%s",
- dos_to_unix(domain, False), lp_winbind_separator(), user);
+ dos_to_unix_static(domain), lp_winbind_separator(), user);
if (sys_getpwnam(dom_user) != NULL) {
pstrcpy(user, dom_user);
@@ -992,13 +993,30 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
if (lp_map_to_guest() == MAP_TO_GUEST_ON_BAD_USER)
{
- if (smb_getpwnam(user,True))
+ SAM_ACCOUNT *sampass = NULL;
+
+ pdb_init_sam(&sampass);
+
+ /*
+ * This is really bad form. We know that password_ok() failed,
+ * but the return value can't distinguish between a non-existent user
+ * and a bad password. So we try to look the user up again here
+ * to see if he or she exists. We must look up the user in the
+ * "smb passwd file" and not /etc/passwd so that we don't
+ * get confused when the two don't have a one-to-one correspondence.
+ * e.g. a standard UNIX account such as "operator" --jerry
+ */
+
+ if (pdb_getsampwnam(sampass, user))
{
delete_nt_token(&ptok);
DEBUG(1,("Rejecting user '%s': bad password\n", user));
- END_PROFILE(SMBsesssetupX);
+ END_PROFILE(SMBsesssetupX);
+ pdb_free_sam(sampass);
return ERROR_BOTH(NT_STATUS_LOGON_FAILURE,ERRSRV,ERRbadpw);
}
+
+ pdb_free_sam(sampass);
}
/*
@@ -1036,7 +1054,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
p = smb_buf(outbuf);
pstrcpy(p,"Unix"); p = skip_string(p,1);
pstrcpy(p,"Samba "); pstrcat(p,VERSION); p = skip_string(p,1);
- pstrcpy(p,global_myworkgroup); unix_to_dos(p, True); p = skip_string(p,1);
+ pstrcpy(p,global_myworkgroup); unix_to_dos(p); p = skip_string(p,1);
set_message(outbuf,3,PTR_DIFF(p,smb_buf(outbuf)),False);
/* perhaps grab OS version here?? */
}
@@ -1068,6 +1086,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
delete_nt_token(&ptok);
if (sess_vuid == -1) {
+ END_PROFILE(SMBsesssetupX);
return(ERROR_DOS(ERRDOS,ERRnoaccess));
}
@@ -1198,9 +1217,8 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
put_dos_date3(outbuf,smb_vwv1,mtime);
SIVAL(outbuf,smb_vwv3,(uint32)size);
- if (Protocol >= PROTOCOL_NT1) {
- SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | 0x40); /* IS_LONG_NAME */
- }
+ if (Protocol >= PROTOCOL_NT1)
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | FLAGS2_IS_LONG_NAME);
DEBUG( 3, ( "getatr name=%s mode=%d size=%d\n", fname, mode, (uint32)size ) );
@@ -1231,6 +1249,9 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
if (VALID_STAT_OF_DIR(sbuf))
mode |= aDIR;
+ else
+ mode &= ~aDIR;
+
if (check_name(fname,conn))
ok = (file_chmod(conn,fname,mode,NULL) == 0);
if (ok)
@@ -1257,23 +1278,46 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
****************************************************************************/
int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
- int outsize = 0;
- SMB_BIG_UINT dfree,dsize,bsize;
- START_PROFILE(SMBdskattr);
-
- conn->vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize);
-
- outsize = set_message(outbuf,5,0,True);
+ int outsize = 0;
+ SMB_BIG_UINT dfree,dsize,bsize;
+ START_PROFILE(SMBdskattr);
+
+ conn->vfs_ops.disk_free(conn,".",True,&bsize,&dfree,&dsize);
- SSVAL(outbuf,smb_vwv0,dsize);
- SSVAL(outbuf,smb_vwv1,bsize/512);
- SSVAL(outbuf,smb_vwv2,512);
- SSVAL(outbuf,smb_vwv3,dfree);
+ outsize = set_message(outbuf,5,0,True);
+
+ if (Protocol <= PROTOCOL_LANMAN2) {
+ double total_space, free_space;
+ /* we need to scale this to a number that DOS6 can handle. We
+ use floating point so we can handle large drives on systems
+ that don't have 64 bit integers
+
+ we end up displaying a maximum of 2G to DOS systems
+ */
+ total_space = dsize * (double)bsize;
+ free_space = dfree * (double)bsize;
+
+ dsize = (total_space+63*512) / (64*512);
+ dfree = (free_space+63*512) / (64*512);
+
+ if (dsize > 0xFFFF) dsize = 0xFFFF;
+ if (dfree > 0xFFFF) dfree = 0xFFFF;
+
+ SSVAL(outbuf,smb_vwv0,dsize);
+ SSVAL(outbuf,smb_vwv1,64); /* this must be 64 for dos systems */
+ SSVAL(outbuf,smb_vwv2,512); /* and this must be 512 */
+ SSVAL(outbuf,smb_vwv3,dfree);
+ } else {
+ SSVAL(outbuf,smb_vwv0,dsize);
+ SSVAL(outbuf,smb_vwv1,bsize/512);
+ SSVAL(outbuf,smb_vwv2,512);
+ SSVAL(outbuf,smb_vwv3,dfree);
+ }
- DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree));
+ DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree));
- END_PROFILE(SMBdskattr);
- return(outsize);
+ END_PROFILE(SMBdskattr);
+ return(outsize);
}
@@ -1462,9 +1506,8 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
SCVAL(smb_buf(outbuf),0,5);
SSVAL(smb_buf(outbuf),1,numentries*DIR_STRUCT_SIZE);
- if (Protocol >= PROTOCOL_NT1) {
- SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | 0x40); /* IS_LONG_NAME */
- }
+ if (Protocol >= PROTOCOL_NT1)
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | FLAGS2_IS_LONG_NAME);
outsize += DIR_STRUCT_SIZE*numentries;
smb_setlen(outbuf,outsize - 4);
@@ -1887,6 +1930,41 @@ int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
}
/*******************************************************************
+ Check if a user is allowed to rename a file.
+********************************************************************/
+
+static NTSTATUS can_rename(char *fname,connection_struct *conn, SMB_STRUCT_STAT *pst)
+{
+ int smb_action;
+ int access_mode;
+ files_struct *fsp;
+
+ if (!CAN_WRITE(conn))
+ return NT_STATUS_MEDIA_WRITE_PROTECTED;
+
+ if (S_ISDIR(pst->st_mode))
+ return NT_STATUS_OK;
+
+ /* We need a better way to return NT status codes from open... */
+ unix_ERR_class = 0;
+ unix_ERR_code = 0;
+
+ fsp = open_file_shared1(conn, fname, pst, DELETE_ACCESS, SET_DENY_MODE(DENY_ALL),
+ (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action);
+
+ if (!fsp) {
+ NTSTATUS ret = NT_STATUS_ACCESS_DENIED;
+ if (unix_ERR_class == ERRDOS && unix_ERR_code == ERRbadshare)
+ ret = NT_STATUS_SHARING_VIOLATION;
+ unix_ERR_class = 0;
+ unix_ERR_code = 0;
+ return ret;
+ }
+ close_file(fsp,False);
+ return NT_STATUS_OK;
+}
+
+/*******************************************************************
Check if a user is allowed to delete a file.
********************************************************************/
@@ -1894,11 +1972,14 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype)
{
SMB_STRUCT_STAT sbuf;
int fmode;
+ int smb_action;
+ int access_mode;
+ files_struct *fsp;
if (!CAN_WRITE(conn))
return NT_STATUS_MEDIA_WRITE_PROTECTED;
- if (conn->vfs_ops.lstat(conn,dos_to_unix(fname,False),&sbuf) != 0)
+ if (conn->vfs_ops.lstat(conn,dos_to_unix_static(fname),&sbuf) != 0)
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
fmode = dos_mode(conn,fname,&sbuf);
@@ -1912,9 +1993,22 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype)
if ((fmode & ~dirtype) & (aHIDDEN | aSYSTEM))
return NT_STATUS_CANNOT_DELETE;
- if (!check_file_sharing(conn,fname,False))
- return NT_STATUS_SHARING_VIOLATION;
+ /* We need a better way to return NT status codes from open... */
+ unix_ERR_class = 0;
+ unix_ERR_code = 0;
+ fsp = open_file_shared1(conn, fname, &sbuf, DELETE_ACCESS, SET_DENY_MODE(DENY_ALL),
+ (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action);
+
+ if (!fsp) {
+ NTSTATUS ret = NT_STATUS_ACCESS_DENIED;
+ if (unix_ERR_class == ERRDOS && unix_ERR_code == ERRbadshare)
+ ret = NT_STATUS_SHARING_VIOLATION;
+ unix_ERR_class = 0;
+ unix_ERR_code = 0;
+ return ret;
+ }
+ close_file(fsp,False);
return NT_STATUS_OK;
}
@@ -1925,93 +2019,91 @@ static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype)
NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name)
{
- pstring directory;
- pstring mask;
- char *p;
- int count=0;
+ pstring directory;
+ pstring mask;
+ char *p;
+ int count=0;
NTSTATUS error = NT_STATUS_OK;
- BOOL has_wild;
- BOOL exists=False;
- BOOL bad_path = False;
- BOOL rc = True;
- SMB_STRUCT_STAT sbuf;
+ BOOL has_wild;
+ BOOL bad_path = False;
+ BOOL rc = True;
+ SMB_STRUCT_STAT sbuf;
- *directory = *mask = 0;
+ *directory = *mask = 0;
- rc = unix_convert(name,conn,0,&bad_path,&sbuf);
+ rc = unix_convert(name,conn,0,&bad_path,&sbuf);
- p = strrchr(name,'/');
- if (!p) {
- pstrcpy(directory,"./");
- pstrcpy(mask,name);
- } else {
- *p = 0;
- pstrcpy(directory,name);
- pstrcpy(mask,p+1);
- }
+ p = strrchr(name,'/');
+ if (!p) {
+ pstrcpy(directory,".");
+ pstrcpy(mask,name);
+ } else {
+ *p = 0;
+ pstrcpy(directory,name);
+ pstrcpy(mask,p+1);
+ }
- /*
- * We should only check the mangled cache
- * here if unix_convert failed. This means
- * that the path in 'mask' doesn't exist
- * on the file system and so we need to look
- * for a possible mangle. This patch from
- * Tine Smukavec <valentin.smukavec@hermes.si>.
- */
+ /*
+ * We should only check the mangled cache
+ * here if unix_convert failed. This means
+ * that the path in 'mask' doesn't exist
+ * on the file system and so we need to look
+ * for a possible mangle. This patch from
+ * Tine Smukavec <valentin.smukavec@hermes.si>.
+ */
- if (!rc && is_mangled(mask))
- check_mangled_cache( mask );
+ if (!rc && is_mangled(mask))
+ check_mangled_cache( mask );
- has_wild = ms_has_wild(mask);
+ has_wild = ms_has_wild(mask);
- if (!has_wild) {
- pstrcat(directory,"/");
- pstrcat(directory,mask);
+ if (!has_wild) {
+ pstrcat(directory,"/");
+ pstrcat(directory,mask);
error = can_delete(directory,conn,dirtype);
- if (!NT_STATUS_IS_OK(error)) return error;
-
- if (vfs_unlink(conn,directory) == 0) {
- count++;
- }
- if (!count)
- exists = vfs_file_exist(conn,directory,&sbuf);
- } else {
- void *dirptr = NULL;
- char *dname;
+ if (!NT_STATUS_IS_OK(error))
+ return error;
- if (check_name(directory,conn))
- dirptr = OpenDir(conn, directory, True);
+ if (vfs_unlink(conn,directory) == 0)
+ count++;
+ } else {
+ void *dirptr = NULL;
+ char *dname;
+ if (check_name(directory,conn))
+ dirptr = OpenDir(conn, directory, True);
- /* XXXX the CIFS spec says that if bit0 of the flags2 field is set then
- the pattern matches against the long name, otherwise the short name
- We don't implement this yet XXXX
- */
+ /* XXXX the CIFS spec says that if bit0 of the flags2 field is set then
+ the pattern matches against the long name, otherwise the short name
+ We don't implement this yet XXXX
+ */
if (dirptr) {
error = NT_STATUS_OBJECT_NAME_NOT_FOUND;
- if (strequal(mask,"????????.???"))
- pstrcpy(mask,"*");
+ if (strequal(mask,"????????.???"))
+ pstrcpy(mask,"*");
while ((dname = ReadDirName(dirptr))) {
- pstring fname;
- pstrcpy(fname,dname);
+ pstring fname;
+ pstrcpy(fname,dname);
- if(!mask_match(fname, mask, case_sensitive)) continue;
+ if(!mask_match(fname, mask, case_sensitive))
+ continue;
- slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname);
+ slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname);
error = can_delete(fname,conn,dirtype);
- if (!NT_STATUS_IS_OK(error)) continue;
- if (vfs_unlink(conn,fname) == 0) count++;
- DEBUG(3,("unlink_internals: succesful unlink [%s]\n",fname));
- }
- CloseDir(dirptr);
- }
- }
+ if (!NT_STATUS_IS_OK(error))
+ continue;
+ if (vfs_unlink(conn,fname) == 0)
+ count++;
+ DEBUG(3,("unlink_internals: succesful unlink [%s]\n",fname));
+ }
+ CloseDir(dirptr);
+ }
+ }
- if (count == 0 && NT_STATUS_IS_OK(error)) {
+ if (count == 0 && NT_STATUS_IS_OK(error))
error = map_nt_error_from_unix(errno);
- }
return error;
}
@@ -2022,33 +2114,35 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name)
int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
- int outsize = 0;
- pstring name;
- int dirtype;
+ int outsize = 0;
+ pstring name;
+ int dirtype;
NTSTATUS status;
- START_PROFILE(SMBunlink);
- dirtype = SVAL(inbuf,smb_vwv0);
+ START_PROFILE(SMBunlink);
- pstrcpy(name,smb_buf(inbuf) + 1);
+ dirtype = SVAL(inbuf,smb_vwv0);
- RESOLVE_DFSPATH(name, conn, inbuf, outbuf);
+ pstrcpy(name,smb_buf(inbuf) + 1);
+
+ RESOLVE_DFSPATH(name, conn, inbuf, outbuf);
- DEBUG(3,("reply_unlink : %s\n",name));
+ DEBUG(3,("reply_unlink : %s\n",name));
status = unlink_internals(conn, dirtype, name);
- if (!NT_STATUS_IS_OK(status)) return ERROR_NT(status);
+ if (!NT_STATUS_IS_OK(status))
+ return ERROR_NT(status);
- /*
- * Win2k needs a changenotify request response before it will
- * update after a rename..
- */
+ /*
+ * Win2k needs a changenotify request response before it will
+ * update after a rename..
+ */
- process_pending_change_notify_queue((time_t)0);
+ process_pending_change_notify_queue((time_t)0);
- outsize = set_message(outbuf,0,0,True);
+ outsize = set_message(outbuf,0,0,True);
- END_PROFILE(SMBunlink);
+ END_PROFILE(SMBunlink);
return outsize;
}
@@ -2225,7 +2319,7 @@ int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length
* for a write lock. JRA.
*/
- status = do_lock(fsp, conn, SVAL(inbuf,smb_pid),
+ status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid),
(SMB_BIG_UINT)numtoread, (SMB_BIG_UINT)startpos, WRITE_LOCK);
if (NT_STATUS_V(status)) {
@@ -2906,10 +3000,9 @@ int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size,
return ERROR_DOS(ERRDOS,ERRbadfid);
}
- if(fsp->is_directory || fsp->stat_open) {
+ if(fsp->is_directory) {
/*
- * Special case - close NT SMB directory or stat file
- * handle.
+ * Special case - close NT SMB directory handle.
*/
DEBUG(3,("close %s fnum=%d\n", fsp->is_directory ? "directory" : "stat file open", fsp->fnum));
close_file(fsp,True);
@@ -3036,7 +3129,7 @@ int reply_lock(connection_struct *conn,
DEBUG(3,("lock fd=%d fnum=%d offset=%.0f count=%.0f\n",
fsp->fd, fsp->fnum, (double)offset, (double)count));
- status = do_lock(fsp, conn, SVAL(inbuf,smb_pid), count, offset, WRITE_LOCK);
+ status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), count, offset, WRITE_LOCK);
if (NT_STATUS_V(status)) {
if (lp_blocking_locks(SNUM(conn))) {
/*
@@ -3274,7 +3367,7 @@ int reply_printqueue(connection_struct *conn,
SSVAL(p,5, queue[i].job);
SIVAL(p,7,queue[i].size);
SCVAL(p,11,0);
- StrnCpy(p+12,queue[i].user,16);
+ StrnCpy(p+12,queue[i].fs_user,16);
p += 28;
}
@@ -3336,18 +3429,21 @@ int reply_printwrite(connection_struct *conn, char *inbuf,char *outbuf, int dum_
****************************************************************************/
NTSTATUS mkdir_internal(connection_struct *conn, pstring directory)
{
- BOOL bad_path = False;
- SMB_STRUCT_STAT sbuf;
- int ret= -1;
+ BOOL bad_path = False;
+ SMB_STRUCT_STAT sbuf;
+ int ret= -1;
- unix_convert(directory,conn,0,&bad_path,&sbuf);
+ unix_convert(directory,conn,0,&bad_path,&sbuf);
- if (check_name(directory, conn))
- ret = vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory));
+ if (check_name(directory, conn))
+ ret = vfs_mkdir(conn,directory,unix_mode(conn,aDIR,directory));
if (ret == -1) {
+ NTSTATUS nterr = set_bad_path_error(errno, bad_path);
+ if (!NT_STATUS_IS_OK(nterr))
+ return nterr;
return map_nt_error_from_unix(errno);
- }
+ }
return NT_STATUS_OK;
}
@@ -3409,7 +3505,7 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory)
pstrcat(fullname, "/");
pstrcat(fullname, dname);
- if(conn->vfs_ops.lstat(conn,dos_to_unix(fullname,False), &st) != 0) {
+ if(conn->vfs_ops.lstat(conn,dos_to_unix_static(fullname), &st) != 0) {
ret = True;
break;
}
@@ -3481,7 +3577,7 @@ BOOL rmdir_internals(connection_struct *conn, char *directory)
pstrcat(fullname, "/");
pstrcat(fullname, dname);
- if(conn->vfs_ops.lstat(conn,dos_to_unix(fullname, False), &st) != 0)
+ if(conn->vfs_ops.lstat(conn,dos_to_unix_static(fullname), &st) != 0)
break;
if(st.st_mode & S_IFDIR) {
if(lp_recursive_veto_delete(SNUM(conn))) {
@@ -3615,21 +3711,6 @@ static BOOL resolve_wildcards(char *name1,char *name2)
return(True);
}
-/*******************************************************************
- Check if a user is allowed to rename a file.
-********************************************************************/
-
-static NTSTATUS can_rename(char *fname,connection_struct *conn)
-{
- if (!CAN_WRITE(conn))
- return NT_STATUS_ACCESS_DENIED;
-
- if (!check_file_sharing(conn,fname,True))
- return NT_STATUS_SHARING_VIOLATION;
-
- return NT_STATUS_OK;
-}
-
/****************************************************************************
The guts of the rename command, split out so it may be called by the NT SMB
code.
@@ -3756,7 +3837,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
* The source object must exist.
*/
- if (!vfs_object_exist(conn, directory, NULL)) {
+ if (!vfs_object_exist(conn, directory, &sbuf1)) {
DEBUG(3,("rename_internals: source doesn't exist doing rename %s -> %s\n",
directory,newname));
@@ -3781,7 +3862,7 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
return error;
}
- error = can_rename(directory,conn);
+ error = can_rename(directory,conn,&sbuf1);
if (!NT_STATUS_IS_OK(error)) {
DEBUG(3,("rename_internals: Error %s rename %s -> %s\n",
@@ -3789,8 +3870,8 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
return error;
}
- pstrcpy(zdirectory, dos_to_unix(directory, False));
- pstrcpy(znewname, dos_to_unix(newname,False));
+ pstrcpy(zdirectory, dos_to_unix_static(directory));
+ pstrcpy(znewname, dos_to_unix_static(newname));
/*
* If the src and dest names are identical - including case,
@@ -3851,7 +3932,12 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
error = NT_STATUS_ACCESS_DENIED;
slprintf(fname,sizeof(fname)-1,"%s/%s",directory,dname);
- error = can_rename(fname,conn);
+ if (!vfs_object_exist(conn, fname, &sbuf1)) {
+ error = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ DEBUG(6,("rename %s failed. Error %s\n", fname, get_nt_error_msg(error)));
+ continue;
+ }
+ error = can_rename(fname,conn,&sbuf1);
if (!NT_STATUS_IS_OK(error)) {
DEBUG(6,("rename %s failed. Error %s\n", fname, get_nt_error_msg(error)));
continue;
@@ -3871,8 +3957,8 @@ directory = %s, newname = %s, newname_last_component = %s, is_8_3 = %d\n",
continue;
}
- if (!conn->vfs_ops.rename(conn,dos_to_unix(fname,False),
- dos_to_unix(destname,False)))
+ if (!conn->vfs_ops.rename(conn,dos_to_unix_static(fname),
+ dos_to_unix_static(destname)))
count++;
DEBUG(3,("rename_internals: doing rename on %s -> %s\n",fname,destname));
}
@@ -4349,180 +4435,190 @@ SMB_BIG_UINT get_lock_offset( char *data, int data_offset, BOOL large_file_forma
int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
{
- files_struct *fsp = file_fsp(inbuf,smb_vwv2);
- unsigned char locktype = CVAL(inbuf,smb_vwv3);
- unsigned char oplocklevel = CVAL(inbuf,smb_vwv3+1);
- uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
- uint16 num_locks = SVAL(inbuf,smb_vwv7);
- SMB_BIG_UINT count = 0, offset = 0;
- uint16 lock_pid;
- int32 lock_timeout = IVAL(inbuf,smb_vwv4);
- int i;
- char *data;
- BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES)?True:False;
- BOOL err;
+ files_struct *fsp = file_fsp(inbuf,smb_vwv2);
+ unsigned char locktype = CVAL(inbuf,smb_vwv3);
+ unsigned char oplocklevel = CVAL(inbuf,smb_vwv3+1);
+ uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
+ uint16 num_locks = SVAL(inbuf,smb_vwv7);
+ SMB_BIG_UINT count = 0, offset = 0;
+ uint16 lock_pid;
+ int32 lock_timeout = IVAL(inbuf,smb_vwv4);
+ int i;
+ char *data;
+ BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES)?True:False;
+ BOOL err;
NTSTATUS status;
- START_PROFILE(SMBlockingX);
+ START_PROFILE(SMBlockingX);
- CHECK_FSP(fsp,conn);
+ CHECK_FSP(fsp,conn);
- data = smb_buf(inbuf);
+ data = smb_buf(inbuf);
- /* Check if this is an oplock break on a file
- we have granted an oplock on.
- */
+ if (locktype & (LOCKING_ANDX_CANCEL_LOCK | LOCKING_ANDX_CHANGE_LOCKTYPE)) {
+ /* we don't support these - and CANCEL_LOCK makes w2k
+ and XP reboot so I don't really want to be
+ compatible! (tridge) */
+ return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
+ }
+
+ /* Check if this is an oplock break on a file
+ we have granted an oplock on.
+ */
if ((locktype & LOCKING_ANDX_OPLOCK_RELEASE)) {
- /* Client can insist on breaking to none. */
- BOOL break_to_none = (oplocklevel == 0);
+ /* Client can insist on breaking to none. */
+ BOOL break_to_none = (oplocklevel == 0);
- DEBUG(5,("reply_lockingX: oplock break reply (%u) from client for fnum = %d\n",
- (unsigned int)oplocklevel, fsp->fnum ));
+ DEBUG(5,("reply_lockingX: oplock break reply (%u) from client for fnum = %d\n",
+ (unsigned int)oplocklevel, fsp->fnum ));
- /*
- * Make sure we have granted an exclusive or batch oplock on this file.
- */
+ /*
+ * Make sure we have granted an exclusive or batch oplock on this file.
+ */
if(!EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
- DEBUG(0,("reply_lockingX: Error : oplock break from client for fnum = %d and \
+ DEBUG(0,("reply_lockingX: Error : oplock break from client for fnum = %d and \
no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name));
- /* if this is a pure oplock break request then don't send a reply */
- if (num_locks == 0 && num_ulocks == 0) {
- END_PROFILE(SMBlockingX);
- return -1;
- } else {
- END_PROFILE(SMBlockingX);
- return ERROR_DOS(ERRDOS,ERRlock);
- }
- }
+ /* if this is a pure oplock break request then don't send a reply */
+ if (num_locks == 0 && num_ulocks == 0) {
+ END_PROFILE(SMBlockingX);
+ return -1;
+ } else {
+ END_PROFILE(SMBlockingX);
+ return ERROR_DOS(ERRDOS,ERRlock);
+ }
+ }
- if (remove_oplock(fsp, break_to_none) == False) {
- DEBUG(0,("reply_lockingX: error in removing oplock on file %s\n",
- fsp->fsp_name ));
- }
+ if (remove_oplock(fsp, break_to_none) == False) {
+ DEBUG(0,("reply_lockingX: error in removing oplock on file %s\n",
+ fsp->fsp_name ));
+ }
- /* if this is a pure oplock break request then don't send a reply */
+ /* if this is a pure oplock break request then don't send a reply */
if (num_locks == 0 && num_ulocks == 0) {
- /* Sanity check - ensure a pure oplock break is not a
- chained request. */
- if(CVAL(inbuf,smb_vwv0) != 0xff)
- DEBUG(0,("reply_lockingX: Error : pure oplock break is a chained %d request !\n",
- (unsigned int)CVAL(inbuf,smb_vwv0) ));
- END_PROFILE(SMBlockingX);
- return -1;
- }
- }
+ /* Sanity check - ensure a pure oplock break is not a
+ chained request. */
+ if(CVAL(inbuf,smb_vwv0) != 0xff)
+ DEBUG(0,("reply_lockingX: Error : pure oplock break is a chained %d request !\n",
+ (unsigned int)CVAL(inbuf,smb_vwv0) ));
+ END_PROFILE(SMBlockingX);
+ return -1;
+ }
+ }
- /*
- * We do this check *after* we have checked this is not a oplock break
- * response message. JRA.
- */
+ /*
+ * We do this check *after* we have checked this is not a oplock break
+ * response message. JRA.
+ */
- release_level_2_oplocks_on_change(fsp);
+ release_level_2_oplocks_on_change(fsp);
- /* Data now points at the beginning of the list
- of smb_unlkrng structs */
- for(i = 0; i < (int)num_ulocks; i++) {
- lock_pid = get_lock_pid( data, i, large_file_format);
- count = get_lock_count( data, i, large_file_format);
- offset = get_lock_offset( data, i, large_file_format, &err);
+ /* Data now points at the beginning of the list
+ of smb_unlkrng structs */
+ for(i = 0; i < (int)num_ulocks; i++) {
+ lock_pid = get_lock_pid( data, i, large_file_format);
+ count = get_lock_count( data, i, large_file_format);
+ offset = get_lock_offset( data, i, large_file_format, &err);
- /*
- * There is no error code marked "stupid client bug".... :-).
- */
- if(err) {
- END_PROFILE(SMBlockingX);
- return ERROR_DOS(ERRDOS,ERRnoaccess);
- }
+ /*
+ * There is no error code marked "stupid client bug".... :-).
+ */
+ if(err) {
+ END_PROFILE(SMBlockingX);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
+ }
- DEBUG(10,("reply_lockingX: unlock start=%.0f, len=%.0f for pid %u, file %s\n",
- (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name ));
+ DEBUG(10,("reply_lockingX: unlock start=%.0f, len=%.0f for pid %u, file %s\n",
+ (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name ));
status = do_unlock(fsp,conn,lock_pid,count,offset);
if (NT_STATUS_V(status)) {
- END_PROFILE(SMBlockingX);
+ END_PROFILE(SMBlockingX);
return ERROR_NT(status);
- }
- }
+ }
+ }
- /* Setup the timeout in seconds. */
- lock_timeout = ((lock_timeout == -1) ? -1 : lock_timeout/1000);
+ /* Setup the timeout in seconds. */
- /* Now do any requested locks */
- data += ((large_file_format ? 20 : 10)*num_ulocks);
+ lock_timeout = ((lock_timeout == -1) ? -1 : lock_timeout/1000);
- /* Data now points at the beginning of the list
- of smb_lkrng structs */
+ /* Now do any requested locks */
+ data += ((large_file_format ? 20 : 10)*num_ulocks);
- for(i = 0; i < (int)num_locks; i++) {
- lock_pid = get_lock_pid( data, i, large_file_format);
- count = get_lock_count( data, i, large_file_format);
- offset = get_lock_offset( data, i, large_file_format, &err);
+ /* Data now points at the beginning of the list
+ of smb_lkrng structs */
- /*
- * There is no error code marked "stupid client bug".... :-).
- */
- if(err) {
- END_PROFILE(SMBlockingX);
- return ERROR_DOS(ERRDOS,ERRnoaccess);
- }
+ for(i = 0; i < (int)num_locks; i++) {
+ lock_pid = get_lock_pid( data, i, large_file_format);
+ count = get_lock_count( data, i, large_file_format);
+ offset = get_lock_offset( data, i, large_file_format, &err);
+
+ /*
+ * There is no error code marked "stupid client bug".... :-).
+ */
+ if(err) {
+ END_PROFILE(SMBlockingX);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
+ }
- DEBUG(10,("reply_lockingX: lock start=%.0f, len=%.0f for pid %u, file %s\n",
- (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name ));
+ DEBUG(10,("reply_lockingX: lock start=%.0f, len=%.0f for pid %u, file %s timeout = %d\n",
+ (double)offset, (double)count, (unsigned int)lock_pid, fsp->fsp_name,
+ (int)lock_timeout ));
+
+ status = do_lock_spin(fsp,conn,lock_pid, count,offset,
+ ((locktype & 1) ? READ_LOCK : WRITE_LOCK));
- status = do_lock(fsp,conn,lock_pid, count,offset,
- ((locktype & 1) ? READ_LOCK : WRITE_LOCK));
if (NT_STATUS_V(status)) {
if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn))) {
- /*
- * A blocking lock was requested. Package up
- * this smb into a queued request and push it
- * onto the blocking lock queue.
- */
- if(push_blocking_lock_request(inbuf, length, lock_timeout, i)) {
- END_PROFILE(SMBlockingX);
- return -1;
+ /*
+ * A blocking lock was requested. Package up
+ * this smb into a queued request and push it
+ * onto the blocking lock queue.
+ */
+ if(push_blocking_lock_request(inbuf, length, lock_timeout, i)) {
+ END_PROFILE(SMBlockingX);
+ return -1;
+ }
+ }
+ break;
+ }
}
- }
- break;
- }
- }
- /* If any of the above locks failed, then we must unlock
- all of the previous locks (X/Open spec). */
- if(i != num_locks && num_locks != 0) {
- /*
- * Ensure we don't do a remove on the lock that just failed,
- * as under POSIX rules, if we have a lock already there, we
- * will delete it (and we shouldn't) .....
- */
- for(i--; i >= 0; i--) {
- lock_pid = get_lock_pid( data, i, large_file_format);
- count = get_lock_count( data, i, large_file_format);
- offset = get_lock_offset( data, i, large_file_format, &err);
+ /* If any of the above locks failed, then we must unlock
+ all of the previous locks (X/Open spec). */
+ if(i != num_locks && num_locks != 0) {
+ /*
+ * Ensure we don't do a remove on the lock that just failed,
+ * as under POSIX rules, if we have a lock already there, we
+ * will delete it (and we shouldn't) .....
+ */
+ for(i--; i >= 0; i--) {
+ lock_pid = get_lock_pid( data, i, large_file_format);
+ count = get_lock_count( data, i, large_file_format);
+ offset = get_lock_offset( data, i, large_file_format, &err);
- /*
- * There is no error code marked "stupid client bug".... :-).
- */
- if(err) {
- END_PROFILE(SMBlockingX);
- return ERROR_DOS(ERRDOS,ERRnoaccess);
- }
+ /*
+ * There is no error code marked "stupid client bug".... :-).
+ */
+ if(err) {
+ END_PROFILE(SMBlockingX);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
+ }
do_unlock(fsp,conn,lock_pid,count,offset);
- }
- END_PROFILE(SMBlockingX);
+ }
+ END_PROFILE(SMBlockingX);
return ERROR_NT(status);
- }
+ }
- set_message(outbuf,2,0,True);
+ set_message(outbuf,2,0,True);
- DEBUG( 3, ( "lockingX fnum=%d type=%d num_locks=%d num_ulocks=%d\n",
- fsp->fnum, (unsigned int)locktype, num_locks, num_ulocks ) );
+ DEBUG( 3, ( "lockingX fnum=%d type=%d num_locks=%d num_ulocks=%d\n",
+ fsp->fnum, (unsigned int)locktype, num_locks, num_ulocks ) );
- END_PROFILE(SMBlockingX);
- return chain_reply(inbuf,outbuf,length,bufsize);
+ END_PROFILE(SMBlockingX);
+ return chain_reply(inbuf,outbuf,length,bufsize);
}
/* Back from the dead for OS/2..... JRA. */
@@ -4609,54 +4705,54 @@ int reply_readbmpx(connection_struct *conn, char *inbuf,char *outbuf,int length,
int reply_setattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
{
- struct utimbuf unix_times;
- int outsize = 0;
- files_struct *fsp = file_fsp(inbuf,smb_vwv0);
- START_PROFILE(SMBsetattrE);
+ struct utimbuf unix_times;
+ int outsize = 0;
+ files_struct *fsp = file_fsp(inbuf,smb_vwv0);
+ START_PROFILE(SMBsetattrE);
- outsize = set_message(outbuf,0,0,True);
+ outsize = set_message(outbuf,0,0,True);
- CHECK_FSP(fsp,conn);
+ if(!fsp || (fsp->conn != conn)) {
+ END_PROFILE(SMBgetattrE);
+ return ERROR_DOS(ERRDOS,ERRbadfid);
+ }
- /* Convert the DOS times into unix times. Ignore create
- time as UNIX can't set this.
- */
- unix_times.actime = make_unix_date2(inbuf+smb_vwv3);
- unix_times.modtime = make_unix_date2(inbuf+smb_vwv5);
+ /*
+ * Convert the DOS times into unix times. Ignore create
+ * time as UNIX can't set this.
+ */
+ unix_times.actime = make_unix_date2(inbuf+smb_vwv3);
+ unix_times.modtime = make_unix_date2(inbuf+smb_vwv5);
- /*
- * Patch from Ray Frush <frush@engr.colostate.edu>
- * Sometimes times are sent as zero - ignore them.
- */
+ /*
+ * Patch from Ray Frush <frush@engr.colostate.edu>
+ * Sometimes times are sent as zero - ignore them.
+ */
- if ((unix_times.actime == 0) && (unix_times.modtime == 0))
- {
- /* Ignore request */
- if( DEBUGLVL( 3 ) )
- {
- dbgtext( "reply_setattrE fnum=%d ", fsp->fnum);
- dbgtext( "ignoring zero request - not setting timestamps of 0\n" );
- }
- END_PROFILE(SMBsetattrE);
- return(outsize);
- }
- else if ((unix_times.actime != 0) && (unix_times.modtime == 0))
- {
- /* set modify time = to access time if modify time was 0 */
- unix_times.modtime = unix_times.actime;
- }
+ if ((unix_times.actime == 0) && (unix_times.modtime == 0)) {
+ /* Ignore request */
+ if( DEBUGLVL( 3 ) ) {
+ dbgtext( "reply_setattrE fnum=%d ", fsp->fnum);
+ dbgtext( "ignoring zero request - not setting timestamps of 0\n" );
+ }
+ END_PROFILE(SMBsetattrE);
+ return(outsize);
+ } else if ((unix_times.actime != 0) && (unix_times.modtime == 0)) {
+ /* set modify time = to access time if modify time was 0 */
+ unix_times.modtime = unix_times.actime;
+ }
- /* Set the date on this file */
- if(file_utime(conn, fsp->fsp_name, &unix_times)) {
- END_PROFILE(SMBsetattrE);
- return ERROR_DOS(ERRDOS,ERRnoaccess);
- }
+ /* Set the date on this file */
+ if(file_utime(conn, fsp->fsp_name, &unix_times)) {
+ END_PROFILE(SMBsetattrE);
+ return ERROR_DOS(ERRDOS,ERRnoaccess);
+ }
- DEBUG( 3, ( "reply_setattrE fnum=%d actime=%d modtime=%d\n",
- fsp->fnum, (int)unix_times.actime, (int)unix_times.modtime ) );
+ DEBUG( 3, ( "reply_setattrE fnum=%d actime=%d modtime=%d\n",
+ fsp->fnum, (int)unix_times.actime, (int)unix_times.modtime ) );
- END_PROFILE(SMBsetattrE);
- return(outsize);
+ END_PROFILE(SMBsetattrE);
+ return(outsize);
}
@@ -4857,44 +4953,47 @@ int reply_writebs(connection_struct *conn, char *inbuf,char *outbuf, int dum_siz
int reply_getattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
{
- SMB_STRUCT_STAT sbuf;
- int outsize = 0;
- int mode;
- files_struct *fsp = file_fsp(inbuf,smb_vwv0);
- START_PROFILE(SMBgetattrE);
+ SMB_STRUCT_STAT sbuf;
+ int outsize = 0;
+ int mode;
+ files_struct *fsp = file_fsp(inbuf,smb_vwv0);
+ START_PROFILE(SMBgetattrE);
- outsize = set_message(outbuf,11,0,True);
+ outsize = set_message(outbuf,11,0,True);
- CHECK_FSP(fsp,conn);
+ if(!fsp || (fsp->conn != conn)) {
+ END_PROFILE(SMBgetattrE);
+ return ERROR_DOS(ERRDOS,ERRbadfid);
+ }
- /* Do an fstat on this file */
- if(vfs_fstat(fsp,fsp->fd, &sbuf)) {
- END_PROFILE(SMBgetattrE);
- return(UNIXERROR(ERRDOS,ERRnoaccess));
- }
+ /* Do an stat on this file */
+
+ if(fsp_stat(fsp, &sbuf)) {
+ END_PROFILE(SMBgetattrE);
+ return(UNIXERROR(ERRDOS,ERRnoaccess));
+ }
- mode = dos_mode(conn,fsp->fsp_name,&sbuf);
+ mode = dos_mode(conn,fsp->fsp_name,&sbuf);
- /* Convert the times into dos times. Set create
- date to be last modify date as UNIX doesn't save
- this */
- put_dos_date2(outbuf,smb_vwv0,get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))));
- put_dos_date2(outbuf,smb_vwv2,sbuf.st_atime);
- put_dos_date2(outbuf,smb_vwv4,sbuf.st_mtime);
- if (mode & aDIR)
- {
- SIVAL(outbuf,smb_vwv6,0);
- SIVAL(outbuf,smb_vwv8,0);
- }
- else
- {
- SIVAL(outbuf,smb_vwv6,(uint32)sbuf.st_size);
- SIVAL(outbuf,smb_vwv8,SMB_ROUNDUP(sbuf.st_size,1024));
- }
- SSVAL(outbuf,smb_vwv10, mode);
+ /* Convert the times into dos times. Set create
+ * date to be last modify date as UNIX doesn't save
+ * this.
+ */
+
+ put_dos_date2(outbuf,smb_vwv0,get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))));
+ put_dos_date2(outbuf,smb_vwv2,sbuf.st_atime);
+ put_dos_date2(outbuf,smb_vwv4,sbuf.st_mtime);
+ if (mode & aDIR) {
+ SIVAL(outbuf,smb_vwv6,0);
+ SIVAL(outbuf,smb_vwv8,0);
+ } else {
+ SIVAL(outbuf,smb_vwv6,(uint32)sbuf.st_size);
+ SIVAL(outbuf,smb_vwv8,SMB_ROUNDUP(sbuf.st_size,1024));
+ }
+ SSVAL(outbuf,smb_vwv10, mode);
- DEBUG( 3, ( "reply_getattrE fnum=%d\n", fsp->fnum));
+ DEBUG( 3, ( "reply_getattrE fnum=%d\n", fsp->fnum));
- END_PROFILE(SMBgetattrE);
- return(outsize);
+ END_PROFILE(SMBgetattrE);
+ return(outsize);
}
diff --git a/source/smbd/server.c b/source/smbd/server.c
index b3b428a9b42..b18921e1af3 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -61,26 +61,43 @@ void smbd_set_server_fd(int fd)
}
/****************************************************************************
- when exiting, take the whole family
+ Terminate signal.
****************************************************************************/
-static void *dflt_sig(void)
+
+VOLATILE sig_atomic_t got_sig_term = 0;
+
+static void sig_term(void)
+{
+ got_sig_term = 1;
+ sys_select_signal();
+}
+
+/****************************************************************************
+ Catch a sighup.
+****************************************************************************/
+
+VOLATILE sig_atomic_t reload_after_sighup = 0;
+
+static void sig_hup(int sig)
{
- exit_server("caught signal");
- return NULL;
+ reload_after_sighup = 1;
+ sys_select_signal();
}
/****************************************************************************
Send a SIGTERM to our process group.
*****************************************************************************/
+
static void killkids(void)
{
- if(am_parent) kill(0,SIGTERM);
+ if(am_parent)
+ kill(0,SIGTERM);
}
-
/****************************************************************************
- open the socket communication
+ Open the socket communication - inetd.
****************************************************************************/
+
static BOOL open_sockets_inetd(void)
{
/* Started from inetd. fd 0 is the socket. */
@@ -97,10 +114,10 @@ static BOOL open_sockets_inetd(void)
return True;
}
-
/****************************************************************************
- open the socket communication
+ Open the socket communication.
****************************************************************************/
+
static BOOL open_sockets(BOOL is_daemon,BOOL interactive, int port)
{
int num_interfaces = iface_count();
@@ -212,10 +229,13 @@ max can be %d\n",
num = sys_select(FD_SETSIZE,&lfds,NULL,NULL,NULL);
if (num == -1 && errno == EINTR) {
- extern VOLATILE sig_atomic_t reload_after_sighup;
+ if (got_sig_term) {
+ exit_server("Caught TERM signal");
+ }
/* check for sighup processing */
if (reload_after_sighup) {
+ DEBUG(0,("Got SIGHUP\n"));
change_to_root_user();
DEBUG(1,("Reloading services after SIGHUP\n"));
reload_services(False);
@@ -320,8 +340,9 @@ max can be %d\n",
}
/****************************************************************************
- reload the services file
- **************************************************************************/
+ Reload the services file.
+ **************************************************************************/
+
BOOL reload_services(BOOL test)
{
BOOL ret;
@@ -370,30 +391,11 @@ BOOL reload_services(BOOL test)
return(ret);
}
-
-
-/****************************************************************************
- Catch a sighup.
-****************************************************************************/
-
-VOLATILE sig_atomic_t reload_after_sighup = False;
-
-static void sig_hup(int sig)
-{
- BlockSignals(True,SIGHUP);
- DEBUG(0,("Got SIGHUP\n"));
-
- sys_select_signal();
- reload_after_sighup = True;
- BlockSignals(False,SIGHUP);
-}
-
-
-
#if DUMP_CORE
/*******************************************************************
-prepare to dump a core file - carefully!
+ Prepare to dump a core file - carefully !
********************************************************************/
+
static BOOL dump_core(void)
{
char *p;
@@ -443,8 +445,9 @@ static void decrement_smbd_process_count(void)
}
/****************************************************************************
-exit the server
+ Exit the server.
****************************************************************************/
+
void exit_server(char *reason)
{
static int firsttime=1;
@@ -494,8 +497,9 @@ void exit_server(char *reason)
}
/****************************************************************************
- initialise connect, service and file structs
+ Initialise connect, service and file structs.
****************************************************************************/
+
static void init_structs(void )
{
/*
@@ -526,8 +530,9 @@ static void init_structs(void )
}
/****************************************************************************
-usage on the program
+ Usage on the program.
****************************************************************************/
+
static void usage(char *pname)
{
@@ -548,13 +553,14 @@ static void usage(char *pname)
printf("\n");
}
-
/****************************************************************************
- main program
+ main program.
****************************************************************************/
+
int main(int argc,char *argv[])
{
extern BOOL append_log;
+ extern BOOL AllowDebugChange;
/* shall I run as a daemon */
BOOL is_daemon = False;
BOOL interactive = False;
@@ -611,6 +617,7 @@ static void usage(char *pname)
DEBUGLEVEL = 10000;
else
DEBUGLEVEL = atoi(optarg);
+ AllowDebugChange = False;
break;
case 'p':
@@ -666,7 +673,8 @@ static void usage(char *pname)
gain_root_group_privilege();
fault_setup((void (*)(void *))exit_server);
- CatchSignal(SIGTERM , SIGNAL_CAST dflt_sig);
+ CatchSignal(SIGTERM , SIGNAL_CAST sig_term);
+ CatchSignal(SIGHUP,SIGNAL_CAST sig_hup);
/* we are never interested in SIGPIPE */
BlockSignals(True,SIGPIPE);
@@ -685,6 +693,7 @@ static void usage(char *pname)
* these signals masked, we will have problems, as we won't recieve them. */
BlockSignals(False, SIGHUP);
BlockSignals(False, SIGUSR1);
+ BlockSignals(False, SIGTERM);
/* we want total control over the permissions on created files,
so set our umask to 0 */
@@ -735,8 +744,6 @@ static void usage(char *pname)
fstrcpy(global_myworkgroup, lp_workgroup());
- CatchSignal(SIGHUP,SIGNAL_CAST sig_hup);
-
DEBUG(3,( "loaded services\n"));
if (!is_daemon && !is_a_socket(0)) {
@@ -782,6 +789,11 @@ static void usage(char *pname)
if (!migrate_from_old_password_file(global_myworkgroup))
DEBUG(0,("Failed to migrate from old MAC file.\n"));
+ if(!pdb_generate_sam_sid()) {
+ DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
+ exit(1);
+ }
+
if (!open_sockets(is_daemon,interactive,port))
exit(1);
@@ -804,11 +816,6 @@ static void usage(char *pname)
/* possibly reload the services file. */
reload_services(True);
- if(!pdb_generate_sam_sid()) {
- DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
- exit(1);
- }
-
if (*lp_rootdir()) {
if (sys_chroot(lp_rootdir()) == 0)
DEBUG(2,("Changed root to %s\n", lp_rootdir()));
diff --git a/source/smbd/service.c b/source/smbd/service.c
index 515bcc5c792..22aecdb4929 100644
--- a/source/smbd/service.c
+++ b/source/smbd/service.c
@@ -21,6 +21,8 @@
#include "includes.h"
+#define CHECK_PATH_ON_TCONX 1
+
extern struct timeval smb_last_time;
extern int case_default;
extern BOOL case_preserve;
@@ -225,6 +227,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
BOOL guest = False;
BOOL force = False;
connection_struct *conn;
+ struct stat st;
uid_t euid;
int ret;
@@ -255,7 +258,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
if (*user && Get_Pwnam(user,True)) {
fstring dos_username;
fstrcpy(dos_username, user);
- unix_to_dos(dos_username, True);
+ unix_to_dos(dos_username);
return(make_connection(dos_username,user,password,
pwlen,dev,vuid,ecode));
}
@@ -265,7 +268,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
fstring dos_username;
fstrcpy(user,validated_username(vuid));
fstrcpy(dos_username, user);
- unix_to_dos(dos_username, True);
+ unix_to_dos(dos_username);
return(make_connection(dos_username,user,password,pwlen,dev,vuid,ecode));
}
} else {
@@ -275,7 +278,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
fstring dos_username;
fstrcpy(user,current_user_info.smb_name);
fstrcpy(dos_username, user);
- unix_to_dos(dos_username, True);
+ unix_to_dos(dos_username);
return(make_connection(dos_username,user,password,pwlen,dev,vuid,ecode));
}
}
@@ -496,6 +499,17 @@ connection_struct *make_connection(char *service,char *user,char *password, int
store them. Used by change_to_user() */
initialise_groups(conn->user, conn->uid, conn->gid);
get_current_groups(&conn->ngroups,&conn->groups);
+
+#ifdef HAVE_GETGROUPS_TOO_MANY_EGIDS
+ /*
+ * Some OSes, like FreeBSD return EGID as group 0 from getgroups
+ * and ignore group 0 on setgroups.
+ * get_current_groups returns group 0 as 0, which is wrong.
+ * We set it to gid here to prevent the token creation below
+ * from creating an incorrect token (SID for local group 0).
+ */
+ if (conn->ngroups) conn->groups[0] = conn->gid;
+#endif /* HAVE_GETGROUPS_TOO_MANY_EGIDS */
/* check number of connections */
if (!claim_connection(conn,
@@ -537,8 +551,8 @@ connection_struct *make_connection(char *service,char *user,char *password, int
}
/* Initialise VFS function pointers */
- if (!vfs_init(conn)) {
- DEBUG(0, ("vfs_init failed for service %s\n", lp_servicename(SNUM(conn))));
+ if (!smbd_vfs_init(conn)) {
+ DEBUG(0, ("smbd_vfs_init failed for service %s\n", lp_servicename(SNUM(conn))));
yield_connection(conn, lp_servicename(SNUM(conn)));
conn_free(conn);
return NULL;
@@ -583,6 +597,17 @@ connection_struct *make_connection(char *service,char *user,char *password, int
}
}
+ /*
+ * FIXME!!!! Reenabled this code since it current;y breaks
+ * move_driver_to_download_area() by keeping the root path
+ * of the connection at /tmp. I'll work on a real fix, but this
+ * will keep people happy for a temporary meaure. --jerry
+ */
+#if CHECK_PATH_ON_TCONX
+ /* win2000 does not check the permissions on the directory
+ during the tree connect, instead relying on permission
+ check during individual operations. To match this behaviour
+ I have disabled this chdir check (tridge) */
if (vfs_ChDir(conn,conn->connectpath) != 0) {
DEBUG(0,("%s (%s) Can't change directory to %s (%s)\n",
remote_machine, conn->client_address,
@@ -593,12 +618,23 @@ connection_struct *make_connection(char *service,char *user,char *password, int
*ecode = ERRnosuchshare;
return NULL;
}
+#else
+ /* the alternative is just to check the directory exists */
+ if (stat(conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) {
+ DEBUG(0,("%s is not a directory\n", conn->connectpath));
+ change_to_root_user();
+ yield_connection(conn, lp_servicename(SNUM(conn)));
+ conn_free(conn);
+ *ecode = ERRnosuchshare;
+ return NULL;
+ }
+#endif
string_set(&conn->origpath,conn->connectpath);
#if SOFTLINK_OPTIMISATION
- /* resolve any soft links early */
- {
+ /* resolve any soft links early if possible */
+ if (vfs_ChDir(conn,conn->connectpath) == 0) {
pstring s;
pstrcpy(s,conn->connectpath);
vfs_GetWd(conn,s);
@@ -633,6 +669,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
/* Invoke VFS make connection hook */
if (conn->vfs_ops.connect) {
+ DEBUG(10,("calling vfs_ops.connect for service %s (options = %s)\n", service, lp_vfs_options(SNUM(conn)) ));
if (conn->vfs_ops.connect(conn, service, user) < 0)
return NULL;
}
@@ -684,6 +721,10 @@ void close_cnum(connection_struct *conn, uint16 vuid)
standard_sub_conn(conn,cmd);
smbrun(cmd,NULL);
}
+
+ /* make sure we leave the directory available for unmount */
+ vfs_ChDir(conn, "/");
+
conn_free(conn);
}
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 4168edf7705..9af0b0ddb58 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -523,15 +523,23 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
continue;
}
} else if (vfs_stat(conn,pathreal,&sbuf) != 0) {
- /* Needed to show the msdfs symlinks as directories */
- if(!lp_host_msdfs() || !lp_msdfs_root(SNUM(conn))
- || !is_msdfs_link(conn, pathreal, NULL, NULL)) {
+
+ /* Needed to show the msdfs symlinks as
+ * directories */
+
+ if(lp_host_msdfs() &&
+ lp_msdfs_root(SNUM(conn)) &&
+ is_msdfs_link(conn, pathreal, NULL, NULL,
+ &sbuf)) {
+
+ DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s as a directory\n", pathreal));
+ sbuf.st_mode = (sbuf.st_mode & 0xFFF) | S_IFDIR;
+
+ } else {
+
DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n",
pathreal,strerror(errno)));
continue;
- } else {
- DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s as a directory\n", pathreal));
- sbuf.st_mode = (sbuf.st_mode & 0xFFF) | S_IFDIR;
}
}
@@ -1367,7 +1375,7 @@ static int call_trans2qfsinfo(connection_struct *conn, char *inbuf, char *outbuf
SIVAL(pdata,4,255); /* Max filename component length */
/* NOTE! the fstype must *not* be null terminated or win98 won't recognise it
and will think we can't do long filenames */
- fstype_len = dos_PutUniCode(pdata+12,unix_to_dos(fstype,False),sizeof(pstring), False);
+ fstype_len = dos_PutUniCode(pdata+12,unix_to_dos_static(fstype),sizeof(pstring), False);
SIVAL(pdata,8,fstype_len);
data_len = 12 + fstype_len;
SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
@@ -1413,12 +1421,13 @@ static int call_trans2qfsinfo(connection_struct *conn, char *inbuf, char *outbuf
case SMB_QUERY_FS_SIZE_INFO:
case SMB_FS_SIZE_INFORMATION:
{
- SMB_BIG_UINT dfree,dsize,bsize;
+ SMB_BIG_UINT dfree,dsize,bsize,secs_per_unit;;
data_len = 24;
conn->vfs_ops.disk_free(conn,".",False,&bsize,&dfree,&dsize);
- SBIG_UINT(pdata,0,dsize);
- SBIG_UINT(pdata,8,dfree);
- SIVAL(pdata,16,bsize/512);
+ secs_per_unit = 2;
+ SBIG_UINT(pdata,0,dsize*(bsize/(512*secs_per_unit)));
+ SBIG_UINT(pdata,8,dfree*(bsize/(512*secs_per_unit)));
+ SIVAL(pdata,16,secs_per_unit);
SIVAL(pdata,20,512);
break;
}
@@ -1509,12 +1518,14 @@ static int call_trans2setfsinfo(connection_struct *conn, char *inbuf, char *outb
Utility function to set bad path error.
****************************************************************************/
-void set_bad_path_error(int err, BOOL bad_path)
+NTSTATUS set_bad_path_error(int err, BOOL bad_path)
{
if((err == ENOENT) && bad_path) {
unix_ERR_class = ERRDOS;
unix_ERR_code = ERRbadpath;
+ return NT_STATUS_OBJECT_PATH_NOT_FOUND;
}
+ return NT_STATUS_OK;
}
/****************************************************************************
@@ -1537,6 +1548,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
SMB_STRUCT_STAT sbuf;
pstring fname1;
char *fname;
+ pstring dos_fname;
char *fullpathname;
char *p;
int l;
@@ -1559,7 +1571,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = %d\n", info_level));
- if(fsp && (fsp->is_directory || fsp->stat_open)) {
+ if(fsp && (fsp->is_directory || fsp->fd == -1)) {
/*
* This is actually a QFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
@@ -1690,6 +1702,14 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
sbuf.st_mtime &= ~1;
}
+ /* NT expects the name to be in an exact form */
+ if (strequal(fname,"."))
+ pstrcpy(dos_fname, "\\");
+ else {
+ snprintf(dos_fname, sizeof(dos_fname), "\\%s", fname);
+ string_replace( dos_fname, '/','\\');
+ }
+
switch (info_level) {
case SMB_INFO_STANDARD:
case SMB_INFO_QUERY_EA_SIZE:
@@ -1719,7 +1739,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
break;
case 6:
- return ERROR_DOS(ERRDOS,ERRbadfunc); /* os/2 needs this */
+ return ERROR_DOS(ERRDOS,ERRbadfunc); /* os/2 needs this */
case SMB_FILE_BASIC_INFORMATION:
case SMB_QUERY_FILE_BASIC_INFO:
@@ -1780,6 +1800,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
*short_name = '\0';
}
strupper(short_name);
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
l = dos_PutUniCode(pdata + 4, short_name, sizeof(pstring), False);
data_size = 4 + l;
SIVAL(pdata,0,l);
@@ -1794,13 +1815,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
* you like hearing about me suffering.... :-). JRA.
*/
- if(strequal(".", fname) && (global_client_caps & CAP_UNICODE)) {
- l = l*2;
- SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
- dos_PutUniCode(pdata + 4, "\\",sizeof(pstring), False);
- } else {
- pstrcpy(pdata+4,fname);
- }
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
+ l = dos_PutUniCode(pdata + 4, dos_fname,sizeof(pstring), False);
data_size = 4 + l;
SIVAL(pdata,0,l);
break;
@@ -1844,7 +1860,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
pdata += 4;
pdata += 4; /* alignment */
SIVAL(pdata,0,l);
- pstrcpy(pdata+4,fname);
+ pstrcpy(pdata+4,dos_fname);
pdata += 4 + l;
data_size = PTR_DIFF(pdata,(*ppdata));
break;
@@ -1864,12 +1880,10 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
case SMB_FILE_NAME_INFORMATION:
/* Pathname with leading '\'. */
{
- pstring new_fname;
size_t byte_len;
- pstrcpy(new_fname, "\\");
- pstrcat(new_fname, fname);
- byte_len = dos_PutUniCode(pdata+4,new_fname,max_data_bytes,False);
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
+ byte_len = dos_PutUniCode(pdata+4,dos_fname,max_data_bytes,False);
SIVAL(pdata,0,byte_len);
data_size = 4 + byte_len;
break;
@@ -1899,7 +1913,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
/* Not yet finished... JRA */
case 1018:
{
- pstring new_fname;
size_t byte_len;
put_long_date(pdata,c_time);
@@ -1923,22 +1936,30 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
case SMB_FILE_ALTERNATE_NAME_INFORMATION:
/* Last component of pathname. */
{
- size_t byte_len = dos_PutUniCode(pdata+4,fname,max_data_bytes,False);
+ size_t byte_len = dos_PutUniCode(pdata+4,dos_fname,max_data_bytes,False);
SIVAL(pdata,0,byte_len);
data_size = 4 + byte_len;
break;
}
+#if 0
+ /*
+ * NT4 server just returns "invalid query" to this - if we try to answer
+ * it then NTws gets a BSOD! (tridge).
+ * W2K seems to want this. JRA.
+ */
+ case SMB_QUERY_FILE_STREAM_INFO:
+#endif
case SMB_FILE_STREAM_INFORMATION:
if (mode & aDIR) {
data_size = 0;
} else {
- size_t byte_len = dos_PutUniCode(pdata+24,"::$DATA", 0xE, False);
- SIVAL(pdata,0,0); /* ??? */
+ size_t byte_len = dos_PutUniCode(pdata+24,"::$DATA", 14, False);
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
+ SIVAL(pdata,0,0); /* Next stream (none). */
SIVAL(pdata,4,byte_len); /* Byte length of unicode string ::$DATA */
SOFF_T(pdata,8,size);
- SIVAL(pdata,16,allocation_size);
- SIVAL(pdata,20,0); /* ??? */
+ SOFF_T(pdata,16,allocation_size);
data_size = 24 + byte_len;
}
break;
@@ -1968,25 +1989,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
data_size = 8;
break;
-#if 0
- /*
- * NT4 server just returns "invalid query" to this - if we try to answer
- * it then NTws gets a BSOD! (tridge).
- * W2K seems to want this. JRA.
- */
-
- case SMB_QUERY_FILE_STREAM_INFO:
- if (get_remote_arch() != RA_WIN2K)
- return ERROR_DOS(ERRDOS,ERRunknownlevel);
- data_size = 24 + l;
- SIVAL(pdata,0,pos);
- SIVAL(pdata,4,size);
- SIVAL(pdata,12,allocation_size);
- SIVAL(pdata,20,l);
- pstrcpy(pdata+24,fname);
- break;
-#endif
-
/*
* CIFS UNIX Extensions.
*/
@@ -2062,13 +2064,13 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
if(!S_ISLNK(sbuf.st_mode))
return(UNIXERROR(ERRSRV,ERRbadlink));
#else
- return(UNIXERROR(ERRDOS,ErrNotALink));
+ return(UNIXERROR(ERRDOS,ERRbadlink));
#endif
- len = conn->vfs_ops.readlink(conn,dos_to_unix(fullpathname,False), buffer, sizeof(pstring)-1); /* read link */
+ len = conn->vfs_ops.readlink(conn,dos_to_unix_static(fullpathname), buffer, sizeof(pstring)-1); /* read link */
if (len == -1)
return(UNIXERROR(ERRDOS,ERRnoaccess));
buffer[len] = 0;
- unix_to_dos(buffer,True);
+ unix_to_dos(buffer);
pstrcpy(pdata,buffer); /* write '\0' terminated string */
pdata += strlen(buffer)+1;
data_size = PTR_DIFF(pdata,(*ppdata));
@@ -2106,7 +2108,7 @@ NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close)
* Only allow delete on close for files/directories opened with delete intent.
*/
- if (delete_on_close && !GET_DELETE_ACCESS_REQUESTED(fsp->share_mode)) {
+ if (delete_on_close && !(fsp->desired_access & DELETE_ACCESS)) {
DEBUG(10,("set_delete_on_close_internal: file %s delete on close flag set but delete access denied.\n",
fsp->fsp_name ));
return NT_STATUS_ACCESS_DENIED;
@@ -2116,11 +2118,6 @@ NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close)
fsp->directory_delete_on_close = delete_on_close;
DEBUG(10, ("set_delete_on_close_internal: %s delete on close flag for fnum = %d, directory %s\n",
delete_on_close ? "Added" : "Removed", fsp->fnum, fsp->fsp_name ));
- } else if(fsp->stat_open) {
-
- DEBUG(10, ("set_delete_on_close_internal: %s delete on close flag for fnum = %d, stat open %s\n",
- delete_on_close ? "Added" : "Removed", fsp->fnum, fsp->fsp_name ));
-
} else {
files_struct *iterate_fsp;
@@ -2211,10 +2208,10 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in
pstrcpy(link_dest, "./");
}
- if (conn->vfs_ops.realpath(conn,dos_to_unix(link_dest,False),resolved_name) == NULL)
+ if (conn->vfs_ops.realpath(conn,dos_to_unix_static(link_dest),resolved_name) == NULL)
return -1;
- pstrcpy(link_dest, unix_to_dos(resolved_name,False));
+ pstrcpy(link_dest, unix_to_dos_static(resolved_name));
pstrcat(link_dest, "/");
pstrcat(link_dest, last_component);
@@ -2270,7 +2267,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
fsp = file_fsp(params,0);
info_level = SVAL(params,2);
- if(fsp && (fsp->is_directory || fsp->stat_open)) {
+ if(fsp && (fsp->is_directory || fsp->fd == -1)) {
/*
* This is actually a SETFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
@@ -2358,6 +2355,11 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
SSVAL(params,0,0);
+ if (fsp) {
+ /* the pending modtime overrides the current modtime */
+ sbuf.st_mtime = fsp->pending_modtime;
+ }
+
size = sbuf.st_size;
tvs.modtime = sbuf.st_mtime;
tvs.actime = sbuf.st_atime;
@@ -2435,6 +2437,10 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
tvs.modtime = MIN(write_time, changed_time);
+ if (write_time > tvs.modtime && write_time != 0xffffffff) {
+ tvs.modtime = write_time;
+ }
+
/* Prefer a defined time to an undefined one. */
if (tvs.modtime == (time_t)0 || tvs.modtime == (time_t)-1)
tvs.modtime = (write_time == (time_t)0 || write_time == (time_t)-1
@@ -2486,7 +2492,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char
return -1;
}
- new_fsp = open_file_shared(conn, fname, &sbuf,
+ new_fsp = open_file_shared1(conn, fname, &sbuf,FILE_WRITE_DATA,
SET_OPEN_MODE(DOS_OPEN_RDWR),
(FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN),
0, 0, &access_mode, &action);
@@ -2634,7 +2640,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
0%o for file %s\n", (double)dev, unixmode, fname ));
/* Ok - do the mknod. */
- if (conn->vfs_ops.mknod(conn,dos_to_unix(fname,False), unixmode, dev) != 0)
+ if (conn->vfs_ops.mknod(conn,dos_to_unix_static(fname), unixmode, dev) != 0)
return(UNIXERROR(ERRDOS,ERRnoaccess));
SSVAL(params,0,0);
@@ -2696,8 +2702,8 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
if (ensure_link_is_safe(conn, link_dest, link_dest) != 0)
return(UNIXERROR(ERRDOS,ERRnoaccess));
- dos_to_unix(link_dest, True);
- dos_to_unix(fname, True);
+ dos_to_unix(link_dest);
+ dos_to_unix(fname);
DEBUG(10,("call_trans2setfilepathinfo: SMB_SET_FILE_UNIX_LINK doing symlink %s -> %s\n",
fname, link_dest ));
@@ -2724,8 +2730,8 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
if (ensure_link_is_safe(conn, link_dest, link_dest) != 0)
return(UNIXERROR(ERRDOS,ERRnoaccess));
- dos_to_unix(link_dest, True);
- dos_to_unix(fname, True);
+ dos_to_unix(link_dest);
+ dos_to_unix(fname);
DEBUG(10,("call_trans2setfilepathinfo: SMB_SET_FILE_UNIX_LINK doing hard link %s -> %s\n",
fname, link_dest ));
@@ -2751,6 +2757,11 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
DEBUG(6,("actime: %s " , ctime(&tvs.actime)));
DEBUG(6,("modtime: %s ", ctime(&tvs.modtime)));
DEBUG(6,("size: %.0f ", (double)size));
+ if (S_ISDIR(sbuf.st_mode))
+ dosmode |= aDIR;
+ else
+ dosmode &= ~aDIR;
+
DEBUG(6,("dosmode: %x\n" , dosmode));
if(!((info_level == SMB_SET_FILE_END_OF_FILE_INFO) ||
@@ -2777,7 +2788,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
* NT does this a lot. It's actually pointless
* setting the time here, as it will be overwritten
* on the next write, so we save the request
- * away and will set it on file code. JRA.
+ * away and will set it on file close. JRA.
*/
if (tvs.modtime != (time_t)0 && tvs.modtime != (time_t)-1) {
@@ -2809,6 +2820,8 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
if(size != sbuf.st_size) {
+ int ret;
+
DEBUG(10,("call_trans2setfilepathinfo: file %s : setting new size to %.0f\n",
fname, (double)size ));
@@ -2834,11 +2847,14 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
if (new_fsp == NULL)
return(UNIXERROR(ERRDOS,ERRbadpath));
- vfs_set_filelen(new_fsp, size);
+ ret = vfs_set_filelen(new_fsp, size);
close_file(new_fsp,True);
} else {
- vfs_set_filelen(fsp, size);
+ ret = vfs_set_filelen(fsp, size);
}
+
+ if (ret == -1)
+ return (UNIXERROR(ERRHRD,ERRdiskfull));
}
SSVAL(params,0,0);
@@ -3232,9 +3248,8 @@ int reply_trans2(connection_struct *conn, char *inbuf,char *outbuf,int length,in
}
}
- if (Protocol >= PROTOCOL_NT1) {
- SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | 0x40); /* IS_LONG_NAME */
- }
+ if (Protocol >= PROTOCOL_NT1)
+ SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_IS_LONG_NAME);
/* Now we must call the relevant TRANS2 function */
switch(tran_call) {
diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index 5204f36ad6e..89d89b33c36 100644
--- a/source/smbd/uid.c
+++ b/source/smbd/uid.c
@@ -116,7 +116,6 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid)
(vuser != 0) && (current_user.vuid == vuid) &&
(current_user.uid == vuser->uid)) {
DEBUG(4,("change_to_user: Skipping user change - already user\n"));
- return(True);
}
snum = SNUM(conn);
@@ -450,7 +449,7 @@ BOOL lookup_name(const char *name, DOM_SID *psid, enum SID_NAME_USE *name_type)
*name_type = SID_NAME_UNKNOWN;
- if (!winbind_lookup_name(name, psid, name_type) || (*name_type != SID_NAME_USER) ) {
+ if (!winbind_lookup_name(NULL, name, psid, name_type) || (*name_type != SID_NAME_USER) ) {
BOOL ret = False;
DEBUG(10, ("lookup_name: winbind lookup for %s failed - trying local\n", name));
@@ -611,6 +610,11 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype)
fstring dom_name, name, sid_str;
enum SID_NAME_USE name_type;
+
+ /* if we know its local then don't try winbindd */
+ if (sid_compare_domain(&global_sam_sid, psid) == 0)
+ return local_sid_to_uid(puid, psid, sidtype);
+
*sidtype = SID_NAME_UNKNOWN;
/*
@@ -643,7 +647,7 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype)
if (!winbind_sid_to_uid(puid, psid)) {
DEBUG(10,("sid_to_uid: winbind lookup for sid %s failed.\n",
sid_to_string(sid_str, psid) ));
- return False;
+ return local_sid_to_uid(puid, psid, sidtype);;
}
DEBUG(10,("sid_to_uid: winbindd %s -> %u\n",
diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c
index 1fa9e72fcc3..4545671de94 100644
--- a/source/smbd/vfs-wrap.c
+++ b/source/smbd/vfs-wrap.c
@@ -21,15 +21,11 @@
#include "includes.h"
-/* Check for NULL pointer parameters in vfswrap_* functions */
-
-#define VFS_CHECK_NULL
-
/* We don't want to have NULL function pointers lying around. Someone
is sure to try and execute them. These stubs are used to prevent
this possibility. */
-int vfswrap_dummy_connect(connection_struct *conn, char *service, char *user)
+int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user)
{
return 0; /* Return >= 0 for success */
}
@@ -40,37 +36,23 @@ void vfswrap_dummy_disconnect(connection_struct *conn)
/* Disk operations */
-SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
SMB_BIG_UINT result;
-#ifdef VFS_CHECK_NULL
- if ((path == NULL) || (bsize == NULL) || (dfree == NULL) ||
- (dsize == NULL)) {
-
- smb_panic("NULL pointer passed to vfswrap_disk_free() function\n");
- }
-#endif
-
result = sys_disk_free(path, small_query, bsize, dfree, dsize);
return result;
}
/* Directory operations */
-DIR *vfswrap_opendir(connection_struct *conn, char *fname)
+DIR *vfswrap_opendir(connection_struct *conn, const char *fname)
{
DIR *result;
START_PROFILE(syscall_opendir);
-#ifdef VFS_CHECK_NULL
- if (fname == NULL) {
- smb_panic("NULL pointer passed to vfswrap_opendir()\n");
- }
-#endif
-
result = opendir(fname);
END_PROFILE(syscall_opendir);
return result;
@@ -82,32 +64,24 @@ struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp)
START_PROFILE(syscall_readdir);
-#ifdef VFS_CHECK_NULL
- if (dirp == NULL) {
- smb_panic("NULL pointer passed to vfswrap_readdir()\n");
- }
-#endif
-
result = readdir(dirp);
END_PROFILE(syscall_readdir);
return result;
}
-int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode)
+int vfswrap_mkdir(connection_struct *conn, const char *path, mode_t mode)
{
- int result;
+ int result;
+ BOOL has_dacl = False;
- START_PROFILE(syscall_mkdir);
+ START_PROFILE(syscall_mkdir);
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_mkdir()\n");
- }
-#endif
+ if (lp_inherit_acls(SNUM(conn)) && (has_dacl = directory_has_default_acl(conn, parent_dirname(path))))
+ mode = 0777;
- result = mkdir(path, mode);
+ result = mkdir(path, mode);
- if (result == 0) {
+ if (result == 0 && !has_dacl) {
/*
* We need to do this as the default behavior of POSIX ACLs
* is to set the mask to be the requested group permission
@@ -122,22 +96,16 @@ int vfswrap_mkdir(connection_struct *conn, char *path, mode_t mode)
}
}
- END_PROFILE(syscall_mkdir);
- return result;
+ END_PROFILE(syscall_mkdir);
+ return result;
}
-int vfswrap_rmdir(connection_struct *conn, char *path)
+int vfswrap_rmdir(connection_struct *conn, const char *path)
{
int result;
START_PROFILE(syscall_rmdir);
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_rmdir()\n");
- }
-#endif
-
result = rmdir(path);
END_PROFILE(syscall_rmdir);
return result;
@@ -149,12 +117,6 @@ int vfswrap_closedir(connection_struct *conn, DIR *dirp)
START_PROFILE(syscall_closedir);
-#ifdef VFS_CHECK_NULL
- if (dirp == NULL) {
- smb_panic("NULL pointer passed to vfswrap_closedir()\n");
- }
-#endif
-
result = closedir(dirp);
END_PROFILE(syscall_closedir);
return result;
@@ -162,21 +124,15 @@ int vfswrap_closedir(connection_struct *conn, DIR *dirp)
/* File operations */
-int vfswrap_open(connection_struct *conn, char *fname, int flags, mode_t mode)
+int vfswrap_open(connection_struct *conn, const char *fname, int flags, mode_t mode)
{
- int result;
-
- START_PROFILE(syscall_open);
+ int result;
-#ifdef VFS_CHECK_NULL
- if (fname == NULL) {
- smb_panic("NULL pointer passed to vfswrap_open()\n");
- }
-#endif
+ START_PROFILE(syscall_open);
- result = sys_open(fname, flags, mode);
- END_PROFILE(syscall_open);
- return result;
+ result = sys_open(fname, flags, mode);
+ END_PROFILE(syscall_open);
+ return result;
}
int vfswrap_close(files_struct *fsp, int fd)
@@ -196,13 +152,7 @@ ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n)
START_PROFILE_BYTES(syscall_read, n);
-#ifdef VFS_CHECK_NULL
- if (data == NULL) {
- smb_panic("NULL pointer passed to vfswrap_read()\n");
- }
-#endif
-
- result = read(fd, data, n);
+ result = sys_read(fd, data, n);
END_PROFILE(syscall_read);
return result;
}
@@ -213,26 +163,35 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n)
START_PROFILE_BYTES(syscall_write, n);
-#ifdef VFS_CHECK_NULL
- if (data == NULL) {
- smb_panic("NULL pointer passed to vfswrap_write()\n");
- }
-#endif
-
- result = write(fd, data, n);
+ result = sys_write(fd, data, n);
END_PROFILE(syscall_write);
return result;
}
SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
{
- SMB_OFF_T result;
+ SMB_OFF_T result = 0;
- START_PROFILE(syscall_lseek);
+ START_PROFILE(syscall_lseek);
- result = sys_lseek(filedes, offset, whence);
- END_PROFILE(syscall_lseek);
- return result;
+ /* Cope with 'stat' file opens. */
+ if (filedes != -1)
+ result = sys_lseek(filedes, offset, whence);
+
+ /*
+ * We want to maintain the fiction that we can seek
+ * on a fifo for file system purposes. This allows
+ * people to set up UNIX fifo's that feed data to Windows
+ * applications. JRA.
+ */
+
+ if((result == -1) && (errno == ESPIPE)) {
+ result = 0;
+ errno = 0;
+ }
+
+ END_PROFILE(syscall_lseek);
+ return result;
}
/*********************************************************
@@ -240,7 +199,7 @@ SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int wh
<warrenb@hpcvscdp.cv.hp.com>
**********************************************************/
-static int copy_reg(char *source, const char *dest)
+static int copy_reg(const char *source, const char *dest)
{
SMB_STRUCT_STAT source_stats;
int ifd;
@@ -314,18 +273,11 @@ static int copy_reg(char *source, const char *dest)
return 0;
}
-int vfswrap_rename(connection_struct *conn, char *oldname, char *newname)
+int vfswrap_rename(connection_struct *conn, const char *oldname, const char *newname)
{
int result;
START_PROFILE(syscall_rename);
-
-#ifdef VFS_CHECK_NULL
- if ((oldname == NULL) || (newname == NULL)) {
- smb_panic("NULL pointer passed to vfswrap_rename()\n");
- }
-#endif
-
result = rename(oldname, newname);
if (errno == EXDEV) {
/* Rename across filesystems needed. */
@@ -341,7 +293,6 @@ int vfswrap_fsync(files_struct *fsp, int fd)
int result;
START_PROFILE(syscall_fsync);
-
result = fsync(fd);
END_PROFILE(syscall_fsync);
return result;
@@ -350,18 +301,11 @@ int vfswrap_fsync(files_struct *fsp, int fd)
#endif
}
-int vfswrap_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *sbuf)
+int vfswrap_stat(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf)
{
int result;
START_PROFILE(syscall_stat);
-
-#ifdef VFS_CHECK_NULL
- if ((fname == NULL) || (sbuf == NULL)) {
- smb_panic("NULL pointer passed to vfswrap_stat()\n");
- }
-#endif
-
result = sys_stat(fname, sbuf);
END_PROFILE(syscall_stat);
return result;
@@ -372,64 +316,37 @@ int vfswrap_fstat(files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf)
int result;
START_PROFILE(syscall_fstat);
-
-#ifdef VFS_CHECK_NULL
- if (sbuf == NULL) {
- smb_panic("NULL pointer passed to vfswrap_fstat()\n");
- }
-#endif
-
result = sys_fstat(fd, sbuf);
END_PROFILE(syscall_fstat);
return result;
}
-int vfswrap_lstat(connection_struct *conn, char *path, SMB_STRUCT_STAT *sbuf)
+int vfswrap_lstat(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf)
{
int result;
START_PROFILE(syscall_lstat);
-
-#ifdef VFS_CHECK_NULL
- if ((path == NULL) || (sbuf == NULL)) {
- smb_panic("NULL pointer passed to vfswrap_lstat()\n");
- }
-#endif
-
result = sys_lstat(path, sbuf);
END_PROFILE(syscall_lstat);
return result;
}
-int vfswrap_unlink(connection_struct *conn, char *path)
+int vfswrap_unlink(connection_struct *conn, const char *path)
{
int result;
START_PROFILE(syscall_unlink);
-
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_unlink()\n");
- }
-#endif
-
result = unlink(path);
END_PROFILE(syscall_unlink);
return result;
}
-int vfswrap_chmod(connection_struct *conn, char *path, mode_t mode)
+int vfswrap_chmod(connection_struct *conn, const char *path, mode_t mode)
{
int result;
START_PROFILE(syscall_chmod);
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_chmod()\n");
- }
-#endif
-
/*
* We need to do this due to the fact that the default POSIX ACL
* chmod modifies the ACL *mask* for the group owner, not the
@@ -454,10 +371,10 @@ int vfswrap_chmod(connection_struct *conn, char *path, mode_t mode)
int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode)
{
- int result;
+ int result;
struct vfs_ops *vfs_ops = &fsp->conn->vfs_ops;
- START_PROFILE(syscall_fchmod);
+ START_PROFILE(syscall_fchmod);
/*
* We need to do this due to the fact that the default POSIX ACL
@@ -475,23 +392,16 @@ int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode)
errno = saved_errno;
}
- result = fchmod(fd, mode);
- END_PROFILE(syscall_fchmod);
- return result;
+ result = fchmod(fd, mode);
+ END_PROFILE(syscall_fchmod);
+ return result;
}
-int vfswrap_chown(connection_struct *conn, char *path, uid_t uid, gid_t gid)
+int vfswrap_chown(connection_struct *conn, const char *path, uid_t uid, gid_t gid)
{
int result;
START_PROFILE(syscall_chown);
-
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_chown()\n");
- }
-#endif
-
result = sys_chown(path, uid, gid);
END_PROFILE(syscall_chown);
return result;
@@ -508,18 +418,11 @@ int vfswrap_fchown(files_struct *fsp, int fd, uid_t uid, gid_t gid)
return result;
}
-int vfswrap_chdir(connection_struct *conn, char *path)
+int vfswrap_chdir(connection_struct *conn, const char *path)
{
int result;
START_PROFILE(syscall_chdir);
-
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_chdir()\n");
- }
-#endif
-
result = chdir(path);
END_PROFILE(syscall_chdir);
return result;
@@ -530,30 +433,16 @@ char *vfswrap_getwd(connection_struct *conn, char *path)
char *result;
START_PROFILE(syscall_getwd);
-
-#ifdef VFS_CHECK_NULL
- if (path == NULL) {
- smb_panic("NULL pointer passed to vfswrap_getwd()\n");
- }
-#endif
-
result = sys_getwd(path);
END_PROFILE(syscall_getwd);
return result;
}
-int vfswrap_utime(connection_struct *conn, char *path, struct utimbuf *times)
+int vfswrap_utime(connection_struct *conn, const char *path, struct utimbuf *times)
{
int result;
START_PROFILE(syscall_utime);
-
-#ifdef VFS_CHECK_NULL
- if ((path == NULL) || (times == NULL)) {
- smb_panic("NULL pointer passed to vfswrap_utime()\n");
- }
-#endif
-
result = utime(path, times);
END_PROFILE(syscall_utime);
return result;
@@ -696,7 +585,6 @@ BOOL vfswrap_lock(files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T
BOOL result;
START_PROFILE(syscall_fcntl_lock);
-
result = fcntl_lock(fd, op, offset, count,type);
END_PROFILE(syscall_fcntl_lock);
return result;
@@ -707,12 +595,6 @@ int vfswrap_symlink(connection_struct *conn, const char *oldpath, const char *ne
int result;
START_PROFILE(syscall_symlink);
-
-#ifdef VFS_CHECK_NULL
- if ((oldpath == NULL) || (newpath == NULL))
- smb_panic("NULL pointer passed to vfswrap_symlink()\n");
-#endif
-
result = sys_symlink(oldpath, newpath);
END_PROFILE(syscall_symlink);
return result;
@@ -723,12 +605,6 @@ int vfswrap_readlink(connection_struct *conn, const char *path, char *buf, size_
int result;
START_PROFILE(syscall_readlink);
-
-#ifdef VFS_CHECK_NULL
- if ((path == NULL) || (buf == NULL))
- smb_panic("NULL pointer passed to vfswrap_readlink()\n");
-#endif
-
result = sys_readlink(path, buf, bufsiz);
END_PROFILE(syscall_readlink);
return result;
@@ -739,11 +615,6 @@ int vfswrap_link(connection_struct *conn, const char *oldpath, const char *newpa
int result;
START_PROFILE(syscall_link);
-
-#ifdef VFS_CHECK_NULL
- if ((oldpath == NULL) || (newpath == NULL))
- smb_panic("NULL pointer passed to vfswrap_link()\n");
-#endif
result = sys_link(oldpath, newpath);
END_PROFILE(syscall_link);
return result;
@@ -754,11 +625,6 @@ int vfswrap_mknod(connection_struct *conn, const char *pathname, mode_t mode, SM
int result;
START_PROFILE(syscall_mknod);
-
-#ifdef VFS_CHECK_NULL
- if (pathname == NULL)
- smb_panic("NULL pointer passed to vfswrap_mknod()\n");
-#endif
result = sys_mknod(pathname, mode, dev);
END_PROFILE(syscall_mknod);
return result;
@@ -769,11 +635,6 @@ char *vfswrap_realpath(connection_struct *conn, const char *path, char *resolved
char *result;
START_PROFILE(syscall_realpath);
-
-#ifdef VFS_CHECK_NULL
- if ((path == NULL) || (resolved_path == NULL))
- smb_panic("NULL pointer passed to vfswrap_realpath()\n");
-#endif
result = sys_realpath(path, resolved_path);
END_PROFILE(syscall_realpath);
return result;
@@ -789,7 +650,7 @@ size_t vfswrap_fget_nt_acl(files_struct *fsp, int fd, SEC_DESC **ppdesc)
return result;
}
-size_t vfswrap_get_nt_acl(files_struct *fsp, char *name, SEC_DESC **ppdesc)
+size_t vfswrap_get_nt_acl(files_struct *fsp, const char *name, SEC_DESC **ppdesc)
{
size_t result;
@@ -809,7 +670,7 @@ BOOL vfswrap_fset_nt_acl(files_struct *fsp, int fd, uint32 security_info_sent, S
return result;
}
-BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent, SEC_DESC *psd)
+BOOL vfswrap_set_nt_acl(files_struct *fsp, const char *name, uint32 security_info_sent, SEC_DESC *psd)
{
BOOL result;
@@ -819,12 +680,12 @@ BOOL vfswrap_set_nt_acl(files_struct *fsp, char *name, uint32 security_info_sent
return result;
}
-int vfswrap_chmod_acl(connection_struct *conn, char *name, mode_t mode)
+int vfswrap_chmod_acl(connection_struct *conn, const char *name, mode_t mode)
{
int result;
START_PROFILE(chmod_acl);
- result = chmod_acl(name, mode);
+ result = chmod_acl(conn, name, mode);
END_PROFILE(chmod_acl);
return result;
}
@@ -834,7 +695,117 @@ int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode)
int result;
START_PROFILE(fchmod_acl);
- result = fchmod_acl(fd, mode);
+ result = fchmod_acl(fsp, fd, mode);
END_PROFILE(fchmod_acl);
return result;
}
+
+int vfswrap_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
+{
+ return sys_acl_get_entry(theacl, entry_id, entry_p);
+}
+
+int vfswrap_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p)
+{
+ return sys_acl_get_tag_type(entry_d, tag_type_p);
+}
+
+int vfswrap_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p)
+{
+ return sys_acl_get_permset(entry_d, permset_p);
+}
+
+void * vfswrap_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d)
+{
+ return sys_acl_get_qualifier(entry_d);
+}
+
+SMB_ACL_T vfswrap_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type)
+{
+ return sys_acl_get_file(path_p, type);
+}
+
+SMB_ACL_T vfswrap_sys_acl_get_fd(struct files_struct *fsp, int fd)
+{
+ return sys_acl_get_fd(fd);
+}
+
+int vfswrap_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset)
+{
+ return sys_acl_clear_perms(permset);
+}
+
+int vfswrap_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
+{
+ return sys_acl_add_perm(permset, perm);
+}
+
+char * vfswrap_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen)
+{
+ return sys_acl_to_text(theacl, plen);
+}
+
+SMB_ACL_T vfswrap_sys_acl_init(struct connection_struct *conn, int count)
+{
+ return sys_acl_init(count);
+}
+
+int vfswrap_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry)
+{
+ return sys_acl_create_entry(pacl, pentry);
+}
+
+int vfswrap_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype)
+{
+ return sys_acl_set_tag_type(entry, tagtype);
+}
+
+int vfswrap_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual)
+{
+ return sys_acl_set_qualifier(entry, qual);
+}
+
+int vfswrap_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
+{
+ return sys_acl_set_permset(entry, permset);
+}
+
+int vfswrap_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl )
+{
+ return sys_acl_valid(theacl );
+}
+
+int vfswrap_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
+{
+ return sys_acl_set_file(name, acltype, theacl);
+}
+
+int vfswrap_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl)
+{
+ return sys_acl_set_fd(fd, theacl);
+}
+
+int vfswrap_sys_acl_delete_def_file(struct connection_struct *conn, const char *path)
+{
+ return sys_acl_delete_def_file(path);
+}
+
+int vfswrap_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
+{
+ return sys_acl_get_perm(permset, perm);
+}
+
+int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text)
+{
+ return sys_acl_free_text(text);
+}
+
+int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl)
+{
+ return sys_acl_free_acl(posix_acl);
+}
+
+int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype)
+{
+ return sys_acl_free_qualifier(qualifier, tagtype);
+}
diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c
index 229880c9f15..fd25d995634 100644
--- a/source/smbd/vfs.c
+++ b/source/smbd/vfs.c
@@ -81,13 +81,36 @@ struct vfs_ops default_vfs_ops = {
vfswrap_fset_nt_acl,
vfswrap_set_nt_acl,
+ /* POSIX ACL operations. */
#if defined(HAVE_NO_ACLS)
NULL,
- NULL
+ NULL,
#else
vfswrap_chmod_acl,
- vfswrap_fchmod_acl
+ vfswrap_fchmod_acl,
#endif
+ vfswrap_sys_acl_get_entry,
+ vfswrap_sys_acl_get_tag_type,
+ vfswrap_sys_acl_get_permset,
+ vfswrap_sys_acl_get_qualifier,
+ vfswrap_sys_acl_get_file,
+ vfswrap_sys_acl_get_fd,
+ vfswrap_sys_acl_clear_perms,
+ vfswrap_sys_acl_add_perm,
+ vfswrap_sys_acl_to_text,
+ vfswrap_sys_acl_init,
+ vfswrap_sys_acl_create_entry,
+ vfswrap_sys_acl_set_tag_type,
+ vfswrap_sys_acl_set_qualifier,
+ vfswrap_sys_acl_set_permset,
+ vfswrap_sys_acl_valid,
+ vfswrap_sys_acl_set_file,
+ vfswrap_sys_acl_set_fd,
+ vfswrap_sys_acl_delete_def_file,
+ vfswrap_sys_acl_get_perm,
+ vfswrap_sys_acl_free_text,
+ vfswrap_sys_acl_free_acl,
+ vfswrap_sys_acl_free_qualifier
};
/****************************************************************************
@@ -96,48 +119,47 @@ struct vfs_ops default_vfs_ops = {
static BOOL vfs_init_default(connection_struct *conn)
{
- DEBUG(3, ("Initialising default vfs hooks\n"));
+ DEBUG(3, ("Initialising default vfs hooks\n"));
- memcpy(&conn->vfs_ops, &default_vfs_ops, sizeof(struct vfs_ops));
- return True;
+ memcpy(&conn->vfs_ops, &default_vfs_ops, sizeof(struct vfs_ops));
+ return True;
}
/****************************************************************************
initialise custom vfs hooks
****************************************************************************/
-#ifdef HAVE_LIBDL
static BOOL vfs_init_custom(connection_struct *conn)
{
int vfs_version = -1;
- struct vfs_ops *ops, *(*init_fptr)(int *);
+ struct vfs_ops *ops, *(*init_fptr)(int *, struct vfs_ops *);
- DEBUG(3, ("Initialising custom vfs hooks from %s\n",
- lp_vfsobj(SNUM(conn))));
+ DEBUG(3, ("Initialising custom vfs hooks from %s\n", lp_vfsobj(SNUM(conn))));
- /* Open object file */
+ /* Open object file */
- if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), RTLD_NOW | RTLD_GLOBAL)) == NULL) {
- DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), dlerror()));
+ if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), RTLD_NOW | RTLD_GLOBAL)) == NULL) {
+ DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), sys_dlerror()));
return False;
- }
+ }
- /* Get handle on vfs_init() symbol */
+ /* Get handle on vfs_init() symbol */
- init_fptr = (struct vfs_ops *(*)(int *))sys_dlsym(conn->dl_handle, "vfs_init");
+ init_fptr = (struct vfs_ops *(*)(int *, struct vfs_ops *))sys_dlsym(conn->dl_handle, "vfs_init");
- if (init_fptr == NULL) {
- DEBUG(0, ("No vfs_init() symbol found in %s\n",
- lp_vfsobj(SNUM(conn))));
+ if (init_fptr == NULL) {
+ DEBUG(0, ("No vfs_init() symbol found in %s\n", lp_vfsobj(SNUM(conn))));
return False;
- }
+ }
- /* Initialise vfs_ops structure */
+ /* Initialise vfs_ops structure */
- if ((ops = init_fptr(&vfs_version)) == NULL) {
- DEBUG(0, ("vfs_init function from %s failed\n", lp_vfsobj(SNUM(conn))));
+ conn->vfs_ops = default_vfs_ops;
+
+ if ((ops = init_fptr(&vfs_version, &default_vfs_ops)) == NULL) {
+ DEBUG(0, ("vfs_init function from %s failed\n", lp_vfsobj(SNUM(conn))));
return False;
- }
+ }
if (vfs_version != SMB_VFS_INTERFACE_VERSION) {
DEBUG(0, ("vfs_init returned wrong interface version info (was %d, should be %d)\n",
@@ -145,151 +167,28 @@ static BOOL vfs_init_custom(connection_struct *conn)
return False;
}
- /* Fill in unused operations with default (disk based) ones.
- There's probably a neater way to do this then a whole bunch of
- if statements. */
-
- memcpy(&conn->vfs_ops, ops, sizeof(struct vfs_ops));
-
- if (conn->vfs_ops.connect == NULL)
- conn->vfs_ops.connect = default_vfs_ops.connect;
-
- if (conn->vfs_ops.disconnect == NULL)
- conn->vfs_ops.disconnect = default_vfs_ops.disconnect;
-
- if (conn->vfs_ops.disk_free == NULL)
- conn->vfs_ops.disk_free = default_vfs_ops.disk_free;
-
- if (conn->vfs_ops.opendir == NULL)
- conn->vfs_ops.opendir = default_vfs_ops.opendir;
-
- if (conn->vfs_ops.readdir == NULL)
- conn->vfs_ops.readdir = default_vfs_ops.readdir;
-
- if (conn->vfs_ops.mkdir == NULL)
- conn->vfs_ops.mkdir = default_vfs_ops.mkdir;
-
- if (conn->vfs_ops.rmdir == NULL)
- conn->vfs_ops.rmdir = default_vfs_ops.rmdir;
-
- if (conn->vfs_ops.closedir == NULL)
- conn->vfs_ops.closedir = default_vfs_ops.closedir;
-
- if (conn->vfs_ops.open == NULL)
- conn->vfs_ops.open = default_vfs_ops.open;
-
- if (conn->vfs_ops.close == NULL)
- conn->vfs_ops.close = default_vfs_ops.close;
-
- if (conn->vfs_ops.read == NULL)
- conn->vfs_ops.read = default_vfs_ops.read;
-
- if (conn->vfs_ops.write == NULL)
- conn->vfs_ops.write = default_vfs_ops.write;
-
- if (conn->vfs_ops.lseek == NULL)
- conn->vfs_ops.lseek = default_vfs_ops.lseek;
-
- if (conn->vfs_ops.rename == NULL)
- conn->vfs_ops.rename = default_vfs_ops.rename;
-
- if (conn->vfs_ops.fsync == NULL)
- conn->vfs_ops.fsync = default_vfs_ops.fsync;
-
- if (conn->vfs_ops.stat == NULL)
- conn->vfs_ops.stat = default_vfs_ops.stat;
-
- if (conn->vfs_ops.fstat == NULL)
- conn->vfs_ops.fstat = default_vfs_ops.fstat;
-
- if (conn->vfs_ops.lstat == NULL)
- conn->vfs_ops.lstat = default_vfs_ops.lstat;
-
- if (conn->vfs_ops.unlink == NULL)
- conn->vfs_ops.unlink = default_vfs_ops.unlink;
-
- if (conn->vfs_ops.chmod == NULL)
- conn->vfs_ops.chmod = default_vfs_ops.chmod;
-
- if (conn->vfs_ops.fchmod == NULL)
- conn->vfs_ops.fchmod = default_vfs_ops.fchmod;
-
- if (conn->vfs_ops.chown == NULL)
- conn->vfs_ops.chown = default_vfs_ops.chown;
-
- if (conn->vfs_ops.fchown == NULL)
- conn->vfs_ops.fchown = default_vfs_ops.fchown;
-
- if (conn->vfs_ops.chdir == NULL)
- conn->vfs_ops.chdir = default_vfs_ops.chdir;
-
- if (conn->vfs_ops.getwd == NULL)
- conn->vfs_ops.getwd = default_vfs_ops.getwd;
-
- if (conn->vfs_ops.utime == NULL)
- conn->vfs_ops.utime = default_vfs_ops.utime;
-
- if (conn->vfs_ops.ftruncate == NULL)
- conn->vfs_ops.ftruncate = default_vfs_ops.ftruncate;
-
- if (conn->vfs_ops.lock == NULL)
- conn->vfs_ops.lock = default_vfs_ops.lock;
-
- if (conn->vfs_ops.symlink == NULL)
- conn->vfs_ops.symlink = default_vfs_ops.symlink;
-
- if (conn->vfs_ops.readlink == NULL)
- conn->vfs_ops.readlink = default_vfs_ops.readlink;
-
- if (conn->vfs_ops.link == NULL)
- conn->vfs_ops.link = default_vfs_ops.link;
-
- if (conn->vfs_ops.mknod == NULL)
- conn->vfs_ops.mknod = default_vfs_ops.mknod;
-
- if (conn->vfs_ops.fget_nt_acl == NULL)
- conn->vfs_ops.fget_nt_acl = default_vfs_ops.fget_nt_acl;
-
- if (conn->vfs_ops.get_nt_acl == NULL)
- conn->vfs_ops.get_nt_acl = default_vfs_ops.get_nt_acl;
-
- if (conn->vfs_ops.fset_nt_acl == NULL)
- conn->vfs_ops.fset_nt_acl = default_vfs_ops.fset_nt_acl;
-
- if (conn->vfs_ops.set_nt_acl == NULL)
- conn->vfs_ops.set_nt_acl = default_vfs_ops.set_nt_acl;
-
- if (conn->vfs_ops.chmod_acl == NULL)
- conn->vfs_ops.chmod_acl = default_vfs_ops.chmod_acl;
-
- if (conn->vfs_ops.fchmod_acl == NULL)
- conn->vfs_ops.fchmod_acl = default_vfs_ops.fchmod_acl;
+ if (ops != &conn->vfs_ops) {
+ memcpy(&conn->vfs_ops, ops, sizeof(struct vfs_ops));
+ }
- return True;
+ return True;
}
-#endif
/*****************************************************************
Generic VFS init.
******************************************************************/
-BOOL vfs_init(connection_struct *conn)
+BOOL smbd_vfs_init(connection_struct *conn)
{
if (*lp_vfsobj(SNUM(conn))) {
-#ifdef HAVE_LIBDL
-
/* Loadable object file */
if (!vfs_init_custom(conn)) {
- DEBUG(0, ("vfs_init: vfs_init_custom failed\n"));
+ DEBUG(0, ("smbd_vfs_init: vfs_init_custom failed\n"));
return False;
}
return True;
-#else
- DEBUG(0, ("vfs_init: No libdl present - cannot use VFS objects\n"));
- return False;
-#endif
}
/* Normal share - initialise with disk access functions */
@@ -301,7 +200,7 @@ BOOL vfs_init(connection_struct *conn)
Check if directory exists.
********************************************************************/
-BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *st)
+BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st)
{
SMB_STRUCT_STAT st2;
BOOL ret;
@@ -316,20 +215,20 @@ BOOL vfs_directory_exist(connection_struct *conn, char *dname, SMB_STRUCT_STAT *
if(!ret)
errno = ENOTDIR;
- return ret;
+ return ret;
}
/*******************************************************************
vfs mkdir wrapper that calls dos_to_unix.
********************************************************************/
-int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode)
+int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode)
{
int ret;
pstring name;
SMB_STRUCT_STAT sbuf;
- pstrcpy(name,dos_to_unix(fname,False)); /* paranoia copy */
+ pstrcpy(name,dos_to_unix_static(fname)); /* paranoia copy */
if(!(ret=conn->vfs_ops.mkdir(conn,name,mode))) {
/*
* Check if high bits should have been set,
@@ -349,18 +248,18 @@ int vfs_mkdir(connection_struct *conn, char *fname, mode_t mode)
char *vfs_getwd(connection_struct *conn, char *unix_path)
{
- char *wd;
- wd = conn->vfs_ops.getwd(conn,unix_path);
- if (wd)
- unix_to_dos(wd, True);
- return wd;
+ char *wd;
+ wd = conn->vfs_ops.getwd(conn,unix_path);
+ if (wd)
+ unix_to_dos(wd);
+ return wd;
}
/*******************************************************************
Check if an object exists in the vfs.
********************************************************************/
-BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf)
+BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf)
{
SMB_STRUCT_STAT st;
@@ -378,7 +277,7 @@ BOOL vfs_object_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf)
Check if a file exists in the vfs.
********************************************************************/
-BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf)
+BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf)
{
SMB_STRUCT_STAT st;
@@ -403,7 +302,7 @@ ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count)
while (total < byte_count)
{
ssize_t ret = fsp->conn->vfs_ops.read(fsp, fsp->fd, buf + total,
- byte_count - total);
+ byte_count - total);
if (ret == 0) return total;
if (ret == -1) {
@@ -421,7 +320,7 @@ ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count)
Write data to a fd on the vfs.
****************************************************************************/
-ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N)
+ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N)
{
size_t total=0;
ssize_t ret;
@@ -578,7 +477,7 @@ char *vfs_readdirname(connection_struct *conn, void *p)
{
static pstring buf;
memcpy(buf, dname, NAMLEN(ptr)+1);
- unix_to_dos(buf, True);
+ unix_to_dos(buf);
dname = buf;
}
@@ -655,7 +554,7 @@ static BOOL handle_vfs_option(char *pszParmValue, char **ptr)
A wrapper for vfs_chdir().
********************************************************************/
-int vfs_ChDir(connection_struct *conn, char *path)
+int vfs_ChDir(connection_struct *conn, const char *path)
{
int res;
static pstring LastDir="";
@@ -677,12 +576,11 @@ int vfs_ChDir(connection_struct *conn, char *path)
/* number of list structures for a caching GetWd function. */
#define MAX_GETWDCACHE (50)
-struct
-{
- SMB_DEV_T dev; /* These *must* be compatible with the types returned in a stat() call. */
- SMB_INO_T inode; /* These *must* be compatible with the types returned in a stat() call. */
- char *dos_path; /* The pathname in DOS format. */
- BOOL valid;
+struct {
+ SMB_DEV_T dev; /* These *must* be compatible with the types returned in a stat() call. */
+ SMB_INO_T inode; /* These *must* be compatible with the types returned in a stat() call. */
+ char *dos_path; /* The pathname in DOS format. */
+ BOOL valid;
} ino_list[MAX_GETWDCACHE];
extern BOOL use_getwd_cache;
@@ -718,98 +616,87 @@ static void array_promote(char *array,int elsize,int element)
char *vfs_GetWd(connection_struct *conn, char *path)
{
- pstring s;
- static BOOL getwd_cache_init = False;
- SMB_STRUCT_STAT st, st2;
- int i;
-
- *s = 0;
-
- if (!use_getwd_cache)
- return(vfs_getwd(conn,path));
-
- /* init the cache */
- if (!getwd_cache_init)
- {
- getwd_cache_init = True;
- for (i=0;i<MAX_GETWDCACHE;i++)
- {
- string_set(&ino_list[i].dos_path,"");
- ino_list[i].valid = False;
- }
- }
-
- /* Get the inode of the current directory, if this doesn't work we're
- in trouble :-) */
-
- if (vfs_stat(conn, ".",&st) == -1)
- {
- DEBUG(0,("Very strange, couldn't stat \".\" path=%s\n", path));
- return(vfs_getwd(conn,path));
- }
-
-
- for (i=0; i<MAX_GETWDCACHE; i++)
- if (ino_list[i].valid)
- {
-
- /* If we have found an entry with a matching inode and dev number
- then find the inode number for the directory in the cached string.
- If this agrees with that returned by the stat for the current
- directory then all is o.k. (but make sure it is a directory all
- the same...) */
-
- if (st.st_ino == ino_list[i].inode &&
- st.st_dev == ino_list[i].dev)
- {
- if (vfs_stat(conn,ino_list[i].dos_path,&st2) == 0)
- {
- if (st.st_ino == st2.st_ino &&
- st.st_dev == st2.st_dev &&
- (st2.st_mode & S_IFMT) == S_IFDIR)
- {
- pstrcpy (path, ino_list[i].dos_path);
-
- /* promote it for future use */
- array_promote((char *)&ino_list[0],sizeof(ino_list[0]),i);
- return (path);
- }
- else
- {
- /* If the inode is different then something's changed,
- scrub the entry and start from scratch. */
- ino_list[i].valid = False;
- }
- }
- }
- }
+ pstring s;
+ static BOOL getwd_cache_init = False;
+ SMB_STRUCT_STAT st, st2;
+ int i;
+
+ *s = 0;
+
+ if (!use_getwd_cache)
+ return(vfs_getwd(conn,path));
+
+ /* init the cache */
+ if (!getwd_cache_init) {
+ getwd_cache_init = True;
+ for (i=0;i<MAX_GETWDCACHE;i++) {
+ string_set(&ino_list[i].dos_path,"");
+ ino_list[i].valid = False;
+ }
+ }
+ /* Get the inode of the current directory, if this doesn't work we're
+ in trouble :-) */
- /* We don't have the information to hand so rely on traditional methods.
- The very slow getcwd, which spawns a process on some systems, or the
- not quite so bad getwd. */
+ if (vfs_stat(conn, ".",&st) == -1) {
+ DEBUG(0,("Very strange, couldn't stat \".\" path=%s\n", path));
+ return(vfs_getwd(conn,path));
+ }
- if (!vfs_getwd(conn,s))
- {
- DEBUG(0,("vfs_GetWd: vfs_getwd call failed, errno %s\n",strerror(errno)));
- return (NULL);
- }
- pstrcpy(path,s);
+ for (i=0; i<MAX_GETWDCACHE; i++) {
+ if (ino_list[i].valid) {
+
+ /* If we have found an entry with a matching inode and dev number
+ then find the inode number for the directory in the cached string.
+ If this agrees with that returned by the stat for the current
+ directory then all is o.k. (but make sure it is a directory all
+ the same...) */
+
+ if (st.st_ino == ino_list[i].inode && st.st_dev == ino_list[i].dev) {
+ if (vfs_stat(conn,ino_list[i].dos_path,&st2) == 0) {
+ if (st.st_ino == st2.st_ino && st.st_dev == st2.st_dev &&
+ (st2.st_mode & S_IFMT) == S_IFDIR) {
+ pstrcpy (path, ino_list[i].dos_path);
+
+ /* promote it for future use */
+ array_promote((char *)&ino_list[0],sizeof(ino_list[0]),i);
+ return (path);
+
+ } else {
+ /* If the inode is different then something's changed,
+ scrub the entry and start from scratch. */
+ ino_list[i].valid = False;
+ }
+ }
+ }
+ }
+ }
- DEBUG(5,("vfs_GetWd %s, inode %.0f, dev %.0f\n",s,(double)st.st_ino,(double)st.st_dev));
+ /* We don't have the information to hand so rely on traditional methods.
+ The very slow getcwd, which spawns a process on some systems, or the
+ not quite so bad getwd. */
- /* add it to the cache */
- i = MAX_GETWDCACHE - 1;
- string_set(&ino_list[i].dos_path,s);
- ino_list[i].dev = st.st_dev;
- ino_list[i].inode = st.st_ino;
- ino_list[i].valid = True;
+ if (!vfs_getwd(conn,s)) {
+ DEBUG(0,("vfs_GetWd: vfs_getwd call failed, errno %s\n",strerror(errno)));
+ return (NULL);
+ }
- /* put it at the top of the list */
- array_promote((char *)&ino_list[0],sizeof(ino_list[0]),i);
+ pstrcpy(path,s);
- return (path);
+ DEBUG(5,("vfs_GetWd %s, inode %.0f, dev %.0f\n",s,(double)st.st_ino,(double)st.st_dev));
+
+ /* add it to the cache */
+ i = MAX_GETWDCACHE - 1;
+ string_set(&ino_list[i].dos_path,s);
+ ino_list[i].dev = st.st_dev;
+ ino_list[i].inode = st.st_ino;
+ ino_list[i].valid = True;
+
+ /* put it at the top of the list */
+ array_promote((char *)&ino_list[0],sizeof(ino_list[0]),i);
+
+ return (path);
}
/*******************************************************************
@@ -822,121 +709,109 @@ char *vfs_GetWd(connection_struct *conn, char *path)
BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks)
{
#ifndef REDUCE_PATHS
- return True;
+ return True;
#else
- pstring dir2;
- pstring wd;
- pstring base_name;
- pstring newname;
- char *p=NULL;
- BOOL relative = (*s != '/');
-
- *dir2 = *wd = *base_name = *newname = 0;
-
- if (widelinks)
- {
- unix_clean_name(s);
- /* can't have a leading .. */
- if (strncmp(s,"..",2) == 0 && (s[2]==0 || s[2]=='/'))
- {
- DEBUG(3,("Illegal file name? (%s)\n",s));
- return(False);
- }
+ pstring dir2;
+ pstring wd;
+ pstring base_name;
+ pstring newname;
+ char *p=NULL;
+ BOOL relative = (*s != '/');
+
+ *dir2 = *wd = *base_name = *newname = 0;
+
+ if (widelinks) {
+ unix_clean_name(s);
+ /* can't have a leading .. */
+ if (strncmp(s,"..",2) == 0 && (s[2]==0 || s[2]=='/')) {
+ DEBUG(3,("Illegal file name? (%s)\n",s));
+ return(False);
+ }
- if (strlen(s) == 0)
- pstrcpy(s,"./");
-
- return(True);
- }
-
- DEBUG(3,("reduce_name [%s] [%s]\n",s,dir));
-
- /* remove any double slashes */
- all_string_sub(s,"//","/",0);
-
- pstrcpy(base_name,s);
- p = strrchr(base_name,'/');
-
- if (!p)
- return(True);
-
- if (!vfs_GetWd(conn,wd))
- {
- DEBUG(0,("couldn't vfs_GetWd for %s %s\n",s,dir));
- return(False);
- }
-
- if (vfs_ChDir(conn,dir) != 0)
- {
- DEBUG(0,("couldn't vfs_ChDir to %s\n",dir));
- return(False);
- }
-
- if (!vfs_GetWd(conn,dir2))
- {
- DEBUG(0,("couldn't vfs_GetWd for %s\n",dir));
- vfs_ChDir(conn,wd);
- return(False);
- }
-
- if (p && (p != base_name))
- {
- *p = 0;
- if (strcmp(p+1,".")==0)
- p[1]=0;
- if (strcmp(p+1,"..")==0)
- *p = '/';
- }
-
- if (vfs_ChDir(conn,base_name) != 0)
- {
- vfs_ChDir(conn,wd);
- DEBUG(3,("couldn't vfs_ChDir for %s %s basename=%s\n",s,dir,base_name));
- return(False);
- }
-
- if (!vfs_GetWd(conn,newname))
- {
- vfs_ChDir(conn,wd);
- DEBUG(2,("couldn't get vfs_GetWd for %s %s\n",s,dir2));
- return(False);
- }
-
- if (p && (p != base_name))
- {
- pstrcat(newname,"/");
- pstrcat(newname,p+1);
- }
-
- {
- size_t l = strlen(dir2);
- if (dir2[l-1] == '/')
- l--;
-
- if (strncmp(newname,dir2,l) != 0)
- {
- vfs_ChDir(conn,wd);
- DEBUG(2,("Bad access attempt? s=%s dir=%s newname=%s l=%d\n",s,dir2,newname,(int)l));
- return(False);
- }
+ if (strlen(s) == 0)
+ pstrcpy(s,"./");
- if (relative)
- {
- if (newname[l] == '/')
- pstrcpy(s,newname + l + 1);
- else
- pstrcpy(s,newname+l);
- }
- else
- pstrcpy(s,newname);
- }
+ return(True);
+ }
+
+ DEBUG(3,("reduce_name [%s] [%s]\n",s,dir));
+
+ /* remove any double slashes */
+ all_string_sub(s,"//","/",0);
+
+ pstrcpy(base_name,s);
+ p = strrchr(base_name,'/');
+
+ if (!p)
+ return(True);
+
+ if (!vfs_GetWd(conn,wd)) {
+ DEBUG(0,("couldn't vfs_GetWd for %s %s\n",s,dir));
+ return(False);
+ }
+
+ if (vfs_ChDir(conn,dir) != 0) {
+ DEBUG(0,("couldn't vfs_ChDir to %s\n",dir));
+ return(False);
+ }
+
+ if (!vfs_GetWd(conn,dir2)) {
+ DEBUG(0,("couldn't vfs_GetWd for %s\n",dir));
+ vfs_ChDir(conn,wd);
+ return(False);
+ }
+
+ if (p && (p != base_name)) {
+ *p = 0;
+ if (strcmp(p+1,".")==0)
+ p[1]=0;
+ if (strcmp(p+1,"..")==0)
+ *p = '/';
+ }
+
+ if (vfs_ChDir(conn,base_name) != 0) {
+ vfs_ChDir(conn,wd);
+ DEBUG(3,("couldn't vfs_ChDir for %s %s basename=%s\n",s,dir,base_name));
+ return(False);
+ }
+
+ if (!vfs_GetWd(conn,newname)) {
+ vfs_ChDir(conn,wd);
+ DEBUG(2,("couldn't get vfs_GetWd for %s %s\n",s,dir2));
+ return(False);
+ }
+
+ if (p && (p != base_name)) {
+ pstrcat(newname,"/");
+ pstrcat(newname,p+1);
+ }
+
+ {
+ size_t l = strlen(dir2);
+ if (dir2[l-1] == '/')
+ l--;
+
+ if (strncmp(newname,dir2,l) != 0) {
+ vfs_ChDir(conn,wd);
+ DEBUG(2,("Bad access attempt? s=%s dir=%s newname=%s l=%d\n",s,dir2,newname,(int)l));
+ return(False);
+ }
+
+ if (relative) {
+ if (newname[l] == '/')
+ pstrcpy(s,newname + l + 1);
+ else
+ pstrcpy(s,newname+l);
+ } else
+ pstrcpy(s,newname);
+ }
- vfs_ChDir(conn,wd);
+ vfs_ChDir(conn,wd);
- if (strlen(s) == 0)
- pstrcpy(s,"./");
+ if (strlen(s) == 0)
+ pstrcpy(s,"./");
- DEBUG(3,("reduced to %s\n",s));
- return(True);
+ DEBUG(3,("reduced to %s\n",s));
+ return(True);
#endif
}
diff --git a/source/smbwrapper/smbw.c b/source/smbwrapper/smbw.c
index 8f60707f0b5..9878d3c70b6 100644
--- a/source/smbwrapper/smbw.c
+++ b/source/smbwrapper/smbw.c
@@ -449,9 +449,8 @@ struct smbw_server *smbw_server(char *server, char *share)
fstring group;
pstring ipenv;
struct in_addr ip;
- extern struct in_addr ipzero;
- ip = ipzero;
+ zero_ip(&ip);
ZERO_STRUCT(c);
get_auth_data_fn(server, share, &workgroup, &username, &password);
@@ -502,7 +501,7 @@ struct smbw_server *smbw_server(char *server, char *share)
again:
slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n);
- ip = ipzero;
+ zero_ip(&ip);
if ((p=smbw_getshared(ipenv))) {
ip = *(interpret_addr2(p));
}
diff --git a/source/tdb/Makefile b/source/tdb/Makefile
index b29bedf92c7..3417759124b 100644
--- a/source/tdb/Makefile
+++ b/source/tdb/Makefile
@@ -2,7 +2,7 @@
# Makefile for tdb directory
#
-CFLAGS = -DSTANDALONE -DTDB_DEBUG -O2 -g -DHAVE_MMAP=1
+CFLAGS = -DSTANDALONE -DTDB_DEBUG -pg -g -DHAVE_MMAP=1
CC = gcc
PROGS = tdbtest tdbtool tdbtorture
@@ -22,5 +22,8 @@ tdbtorture: tdbtorture.o $(TDB_OBJ)
tdbdump: tdbdump.o $(TDB_OBJ)
$(CC) $(CFLAGS) -o tdbdump tdbdump.o $(TDB_OBJ)
+tdbbackup: tdbbackup.o $(TDB_OBJ)
+ $(CC) $(CFLAGS) -o tdbbackup tdbbackup.o $(TDB_OBJ)
+
clean:
rm -f $(PROGS) *.o *~ *% core test.db test.tdb test.gdbm
diff --git a/source/tdb/spinlock.c b/source/tdb/spinlock.c
index b00d115dde7..74472854cf2 100644
--- a/source/tdb/spinlock.c
+++ b/source/tdb/spinlock.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Samba database functions
Copyright (C) Anton Blanchard 2001
@@ -384,11 +383,11 @@ int tdb_create_rwlocks(int fd, unsigned int hash_size)
/* Write it out (appending to end) */
if (write(fd, rwlocks, size) != size) {
- SAFE_FREE(rwlocks);
+ free(rwlocks);
return -1;
}
smp_machine = this_is_smp();
- SAFE_FREE(rwlocks);
+ free(rwlocks);
return 0;
}
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c
index 5a871e7fcc6..c937090de4d 100644
--- a/source/tdb/tdb.c
+++ b/source/tdb/tdb.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Samba database functions
Copyright (C) Andrew Tridgell 1999-2000
Copyright (C) Luke Kenneth Casson Leighton 2000
@@ -85,16 +84,20 @@ TDB_DATA tdb_null;
/* all contexts, to ensure no double-opens (fcntl locks don't nest!) */
static TDB_CONTEXT *tdbs = NULL;
-static void tdb_munmap(TDB_CONTEXT *tdb)
+static int tdb_munmap(TDB_CONTEXT *tdb)
{
if (tdb->flags & TDB_INTERNAL)
- return;
+ return 0;
#ifdef HAVE_MMAP
- if (tdb->map_ptr)
- munmap(tdb->map_ptr, tdb->map_size);
+ if (tdb->map_ptr) {
+ int ret = munmap(tdb->map_ptr, tdb->map_size);
+ if (ret != 0)
+ return ret;
+ }
#endif
tdb->map_ptr = NULL;
+ return 0;
}
static void tdb_mmap(TDB_CONTEXT *tdb)
@@ -166,6 +169,7 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
int rw_type, int lck_type, int probe)
{
struct flock fl;
+ int ret;
if (tdb->flags & TDB_NOLOCK)
return 0;
@@ -180,7 +184,11 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
fl.l_len = 1;
fl.l_pid = 0;
- if (fcntl(tdb->fd,lck_type,&fl) == -1) {
+ do {
+ ret = fcntl(tdb->fd,lck_type,&fl);
+ } while (ret == -1 && errno == EINTR);
+
+ if (ret == -1) {
if (!probe) {
TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n",
tdb->fd, offset, rw_type, lck_type));
@@ -223,28 +231,44 @@ static int tdb_lock(TDB_CONTEXT *tdb, int list, int ltype)
}
/* unlock the database: returns void because it's too late for errors. */
-static void tdb_unlock(TDB_CONTEXT *tdb, int list, int ltype)
+ /* changed to return int it may be interesting to know there
+ has been an error --simo */
+static int tdb_unlock(TDB_CONTEXT *tdb, int list, int ltype)
{
+ int ret = -1;
+
if (tdb->flags & TDB_NOLOCK)
- return;
+ return 0;
/* Sanity checks */
- if (list < -1 || list >= (int)tdb->header.hash_size)
- return;
- if (tdb->locked[list+1].count==0)
- return;
+ if (list < -1 || list >= (int)tdb->header.hash_size) {
+ TDB_LOG((tdb, 0, "tdb_unlock: list %d invalid (%d)\n", list, tdb->header.hash_size));
+ return ret;
+ }
+
+ if (tdb->locked[list+1].count==0) {
+ TDB_LOG((tdb, 0, "tdb_unlock: count is 0\n"));
+ return ret;
+ }
if (tdb->locked[list+1].count == 1) {
/* Down to last nested lock: unlock underneath */
- if (!tdb->read_only && tdb->header.rwlocks)
- tdb_spinunlock(tdb, list, ltype);
- else
- tdb_brlock(tdb, FREELIST_TOP+4*list, F_UNLCK, F_SETLKW, 0);
+ if (!tdb->read_only && tdb->header.rwlocks) {
+ ret = tdb_spinunlock(tdb, list, ltype);
+ } else {
+ ret = tdb_brlock(tdb, FREELIST_TOP+4*list, F_UNLCK, F_SETLKW, 0);
+ }
+ } else {
+ ret = 0;
}
tdb->locked[list+1].count--;
+
+ if (ret)
+ TDB_LOG((tdb, 0,"tdb_unlock: An error occurred unlocking!\n"));
+ return ret;
}
-/* This is based on the hash agorithm from gdbm */
+/* This is based on the hash algorithm from gdbm */
static u32 tdb_hash(TDB_DATA *key)
{
u32 value; /* Used to compute the hash value. */
@@ -287,7 +311,8 @@ static int tdb_oob(TDB_CONTEXT *tdb, tdb_off len, int probe)
}
/* Unmap, update size, remap */
- tdb_munmap(tdb);
+ if (tdb_munmap(tdb) == -1)
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
tdb->map_size = st.st_size;
tdb_mmap(tdb);
return 0;
@@ -435,18 +460,17 @@ static tdb_off tdb_dump_record(TDB_CONTEXT *tdb, tdb_off offset)
return rec.next;
}
-static void tdb_dump_chain(TDB_CONTEXT *tdb, int i)
+static int tdb_dump_chain(TDB_CONTEXT *tdb, int i)
{
tdb_off rec_ptr, top;
top = TDB_HASH_TOP(i);
- tdb_lock(tdb, i, F_WRLCK);
+ if (tdb_lock(tdb, i, F_WRLCK) != 0)
+ return -1;
- if (ofs_read(tdb, top, &rec_ptr) == -1) {
- tdb_unlock(tdb, i, F_WRLCK);
- return;
- }
+ if (ofs_read(tdb, top, &rec_ptr) == -1)
+ return tdb_unlock(tdb, i, F_WRLCK);
if (rec_ptr)
printf("hash=%d\n", i);
@@ -454,7 +478,8 @@ static void tdb_dump_chain(TDB_CONTEXT *tdb, int i)
while (rec_ptr) {
rec_ptr = tdb_dump_record(tdb, rec_ptr);
}
- tdb_unlock(tdb, i, F_WRLCK);
+
+ return tdb_unlock(tdb, i, F_WRLCK);
}
void tdb_dump_all(TDB_CONTEXT *tdb)
@@ -467,30 +492,32 @@ void tdb_dump_all(TDB_CONTEXT *tdb)
tdb_dump_chain(tdb, -1);
}
-void tdb_printfreelist(TDB_CONTEXT *tdb)
+int tdb_printfreelist(TDB_CONTEXT *tdb)
{
+ int ret;
long total_free = 0;
tdb_off offset, rec_ptr;
struct list_struct rec;
- tdb_lock(tdb, -1, F_WRLCK);
+ if ((ret = tdb_lock(tdb, -1, F_WRLCK)) != 0)
+ return ret;
offset = FREELIST_TOP;
/* read in the freelist top */
if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- return;
+ return 0;
}
printf("freelist top=[0x%08x]\n", rec_ptr );
while (rec_ptr) {
if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec), DOCONV()) == -1) {
- return;
+ return -1;
}
if (rec.magic != TDB_FREE_MAGIC) {
printf("bad magic 0x%08x in free list\n", rec.magic);
- return;
+ return -1;
}
printf("entry offset=[0x%08x], rec.rec_len = [0x%08x (%d)]\n", rec.next, rec.rec_len, rec.rec_len );
@@ -502,7 +529,7 @@ void tdb_printfreelist(TDB_CONTEXT *tdb)
printf("total rec_len = [0x%08x (%d)]\n", (int)total_free,
(int)total_free);
- tdb_unlock(tdb, -1, F_WRLCK);
+ return tdb_unlock(tdb, -1, F_WRLCK);
}
/* Remove an element from the freelist. Must have alloc lock. */
@@ -535,7 +562,10 @@ static int tdb_free(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
return -1;
/* set an initial tailer, so if we fail we don't leave a bogus record */
- update_tailer(tdb, offset, rec);
+ if (update_tailer(tdb, offset, rec) != 0) {
+ TDB_LOG((tdb, 0, "tdb_free: upfate_tailer failed!\n"));
+ goto fail;
+ }
/* Look right first (I'm an Australian, dammit) */
right = offset + sizeof(*rec) + rec->rec_len;
@@ -1078,7 +1108,8 @@ static int do_delete(TDB_CONTEXT *tdb, tdb_off rec_ptr, struct list_struct*rec)
rec->magic = TDB_DEAD_MAGIC;
return rec_write(tdb, rec_ptr, rec);
}
- write_unlock_record(tdb, rec_ptr);
+ if (write_unlock_record(tdb, rec_ptr) != 0)
+ return -1;
/* find previous record in hash chain */
if (ofs_read(tdb, TDB_HASH_TOP(rec->full_hash), &i) == -1)
@@ -1121,7 +1152,8 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock,
goto fail;
} else {
/* Otherwise unlock the previous record. */
- unlock_record(tdb, tlock->off);
+ if (unlock_record(tdb, tlock->off) != 0)
+ goto fail;
}
if (want_next) {
@@ -1138,13 +1170,15 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock,
goto fail;
if (!TDB_DEAD(rec)) {
/* Woohoo: we found one! */
- lock_record(tdb, tlock->off);
+ if (lock_record(tdb, tlock->off) != 0)
+ goto fail;
return tlock->off;
}
/* Try to clean dead ones from old traverses */
current = tlock->off;
tlock->off = rec->next;
- do_delete(tdb, current, rec);
+ if (do_delete(tdb, current, rec) != 0)
+ goto fail;
}
tdb_unlock(tdb, tlock->hash, F_WRLCK);
want_next = 0;
@@ -1154,7 +1188,8 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock,
fail:
tlock->off = 0;
- tdb_unlock(tdb, tlock->hash, F_WRLCK);
+ if (tdb_unlock(tdb, tlock->hash, F_WRLCK) != 0)
+ TDB_LOG((tdb, 0, "tdb_next_lock: On error unlock failed!\n"));
return -1;
}
@@ -1185,26 +1220,36 @@ int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state)
key.dptr = tdb_alloc_read(tdb, tl.off + sizeof(rec),
rec.key_len + rec.data_len);
if (!key.dptr) {
- tdb_unlock(tdb, tl.hash, F_WRLCK);
- unlock_record(tdb, tl.off);
- tdb->travlocks.next = tl.next;
- return -1;
+ ret = -1;
+ if (tdb_unlock(tdb, tl.hash, F_WRLCK) != 0)
+ goto out;
+ if (unlock_record(tdb, tl.off) != 0)
+ TDB_LOG((tdb, 0, "tdb_traverse: key.dptr == NULL and unlock_record failed!\n"));
+ goto out;
}
key.dsize = rec.key_len;
dbuf.dptr = key.dptr + rec.key_len;
dbuf.dsize = rec.data_len;
/* Drop chain lock, call out */
- tdb_unlock(tdb, tl.hash, F_WRLCK);
+ if (tdb_unlock(tdb, tl.hash, F_WRLCK) != 0) {
+ ret = -1;
+ goto out;
+ }
if (fn && fn(tdb, key, dbuf, state)) {
/* They want us to terminate traversal */
- unlock_record(tdb, tl.off);
+ ret = count;
+ if (unlock_record(tdb, tl.off) != 0) {
+ TDB_LOG((tdb, 0, "tdb_traverse: unlock_record failed!\n"));;
+ ret = -1;
+ }
tdb->travlocks.next = tl.next;
SAFE_FREE(key.dptr);
return count;
}
SAFE_FREE(key.dptr);
}
+out:
tdb->travlocks.next = tl.next;
if (ret < 0)
return -1;
@@ -1219,7 +1264,8 @@ TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb)
struct list_struct rec;
/* release any old lock */
- unlock_record(tdb, tdb->travlocks.off);
+ if (unlock_record(tdb, tdb->travlocks.off) != 0)
+ return tdb_null;
tdb->travlocks.off = tdb->travlocks.hash = 0;
if (tdb_next_lock(tdb, &tdb->travlocks, &rec) <= 0)
@@ -1227,7 +1273,8 @@ TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb)
/* now read the key */
key.dsize = rec.key_len;
key.dptr =tdb_alloc_read(tdb,tdb->travlocks.off+sizeof(rec),key.dsize);
- tdb_unlock(tdb, BUCKET(tdb->travlocks.hash), F_WRLCK);
+ if (tdb_unlock(tdb, BUCKET(tdb->travlocks.hash), F_WRLCK) != 0)
+ TDB_LOG((tdb, 0, "tdb_firstkey: error occurred while tdb_unlocking!\n"));
return key;
}
@@ -1248,8 +1295,10 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey)
rec.key_len))
|| memcmp(k, oldkey.dptr, oldkey.dsize) != 0) {
/* No, it wasn't: unlock it and start from scratch */
- unlock_record(tdb, tdb->travlocks.off);
- tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK);
+ if (unlock_record(tdb, tdb->travlocks.off) != 0)
+ return tdb_null;
+ if (tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK) != 0)
+ return tdb_null;
tdb->travlocks.off = 0;
}
@@ -1262,7 +1311,10 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey)
if (!tdb->travlocks.off)
return tdb_null;
tdb->travlocks.hash = BUCKET(rec.full_hash);
- lock_record(tdb, tdb->travlocks.off);
+ if (lock_record(tdb, tdb->travlocks.off) != 0) {
+ TDB_LOG((tdb, 0, "tdb_nextkey: lock_record failed (%s)!\n", strerror(errno)));
+ return tdb_null;
+ }
}
oldhash = tdb->travlocks.hash;
@@ -1273,10 +1325,12 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey)
key.dptr = tdb_alloc_read(tdb, tdb->travlocks.off+sizeof(rec),
key.dsize);
/* Unlock the chain of this new record */
- tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK);
+ if (tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK) != 0)
+ TDB_LOG((tdb, 0, "tdb_nextkey: WARNING tdb_unlock failed!\n"));
}
/* Unlock the chain of old record */
- tdb_unlock(tdb, BUCKET(oldhash), F_WRLCK);
+ if (tdb_unlock(tdb, BUCKET(oldhash), F_WRLCK) != 0)
+ TDB_LOG((tdb, 0, "tdb_nextkey: WARNING tdb_unlock failed!\n"));
return key;
}
@@ -1290,7 +1344,8 @@ int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key)
if (!(rec_ptr = tdb_find_lock(tdb, key, F_WRLCK, &rec)))
return -1;
ret = do_delete(tdb, rec_ptr, &rec);
- tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK);
+ if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0)
+ TDB_LOG((tdb, 0, "tdb_delete: WARNING tdb_unlock failed!\n"));
return ret;
}
@@ -1366,20 +1421,22 @@ int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
if (rec_write(tdb, rec_ptr, &rec) == -1
|| tdb_write(tdb, rec_ptr+sizeof(rec), p, key.dsize+dbuf.dsize)==-1
|| ofs_write(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1) {
- fail:
/* Need to tdb_unallocate() here */
- ret = -1;
+ goto fail;
}
out:
SAFE_FREE(p);
tdb_unlock(tdb, BUCKET(hash), F_WRLCK);
return ret;
+fail:
+ ret = -1;
+ goto out;
}
static int tdb_already_open(dev_t device,
ino_t ino)
{
- TDB_CONTEXT *i = NULL;
+ TDB_CONTEXT *i;
for (i = tdbs; i; i = i->next) {
if (i->device == device && i->inode == ino) {
@@ -1411,9 +1468,11 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode,
tdb_log_func log_fn)
{
- TDB_CONTEXT *tdb = NULL;
+ TDB_CONTEXT *tdb;
struct stat st;
int rev = 0, locked;
+ unsigned char *vp;
+ u32 vertest;
if (!(tdb = calloc(1, sizeof *tdb))) {
/* Can't log this */
@@ -1448,12 +1507,15 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
if (tdb->flags & TDB_INTERNAL) {
tdb->flags |= (TDB_NOLOCK | TDB_NOMMAP);
tdb->flags &= ~TDB_CLEAR_IF_FIRST;
- tdb_new_database(tdb, hash_size);
+ if (tdb_new_database(tdb, hash_size) != 0) {
+ TDB_LOG((tdb, 0, "tdb_open_ex: tdb_new_database failed!"));
+ goto fail;
+ }
goto internal;
}
if ((tdb->fd = open(name, open_flags, mode)) == -1) {
- TDB_LOG((tdb, 0, "tdb_open_ex: could not open file %s: %s\n",
+ TDB_LOG((tdb, 5, "tdb_open_ex: could not open file %s: %s\n",
name, strerror(errno)));
goto fail; /* errno set by open(2) */
}
@@ -1488,6 +1550,10 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
}
rev = (tdb->flags & TDB_CONVERT);
}
+ vp = (unsigned char *)&tdb->header.version;
+ vertest = (((u32)vp[0]) << 24) | (((u32)vp[1]) << 16) |
+ (((u32)vp[2]) << 8) | (u32)vp[3];
+ tdb->flags |= (vertest==TDB_VERSION) ? TDB_BIGENDIAN : 0;
if (!rev)
tdb->flags &= ~TDB_CONVERT;
else {
@@ -1525,7 +1591,11 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
tdb_mmap(tdb);
if (locked) {
if (!tdb->read_only)
- tdb_clear_spinlocks(tdb);
+ if (tdb_clear_spinlocks(tdb) != 0) {
+ TDB_LOG((tdb, 0, "tdb_open_ex: "
+ "failed to clear spinlock\n"));
+ goto fail;
+ }
if (tdb_brlock(tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK, 0) == -1) {
TDB_LOG((tdb, 0, "tdb_open_ex: "
"failed to take ACTIVE_LOCK on %s: %s\n",
@@ -1561,7 +1631,8 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
}
SAFE_FREE(tdb->name);
if (tdb->fd != -1)
- close(tdb->fd);
+ if (close(tdb->fd) != 0)
+ TDB_LOG((tdb, 5, "tdb_open_ex: failed to close tdb->fd on error!\n"));
SAFE_FREE(tdb->locked);
SAFE_FREE(tdb);
errno = save_errno;
@@ -1572,7 +1643,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
/* close a database */
int tdb_close(TDB_CONTEXT *tdb)
{
- TDB_CONTEXT **i = NULL;
+ TDB_CONTEXT **i;
int ret = 0;
if (tdb->map_ptr) {
@@ -1682,9 +1753,10 @@ int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key)
{
return tdb_lock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
}
-void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key)
+
+int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key)
{
- tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
+ return tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
}
@@ -1701,14 +1773,21 @@ int tdb_reopen(TDB_CONTEXT *tdb)
{
struct stat st;
- tdb_munmap(tdb);
- close(tdb->fd);
+ if (tdb_munmap(tdb) != 0) {
+ TDB_LOG((tdb, 0, "tdb_reopen: munmap failed (%s)\n", strerror(errno)));
+ goto fail;
+ }
+ if (close(tdb->fd) != 0)
+ TDB_LOG((tdb, 0, "tdb_reopen: WARNING closing tdb->fd failed!\n"));
tdb->fd = open(tdb->name, tdb->open_flags & ~(O_CREAT|O_TRUNC), 0);
if (tdb->fd == -1) {
TDB_LOG((tdb, 0, "tdb_reopen: open failed (%s)\n", strerror(errno)));
goto fail;
}
- fstat(tdb->fd, &st);
+ if (fstat(tdb->fd, &st) != 0) {
+ TDB_LOG((tdb, 0, "tdb_reopen: fstat failed (%s)\n", strerror(errno)));
+ goto fail;
+ }
if (st.st_ino != tdb->inode || st.st_dev != tdb->device) {
TDB_LOG((tdb, 0, "tdb_reopen: file dev/inode has changed!\n"));
goto fail;
@@ -1729,7 +1808,7 @@ fail:
/* reopen all tdb's */
int tdb_reopen_all(void)
{
- TDB_CONTEXT *tdb = NULL;
+ TDB_CONTEXT *tdb;
for (tdb=tdbs; tdb; tdb = tdb->next) {
if (tdb_reopen(tdb) != 0) return -1;
diff --git a/source/tdb/tdb.h b/source/tdb/tdb.h
index 9335725a2ac..8cc908703f8 100644
--- a/source/tdb/tdb.h
+++ b/source/tdb/tdb.h
@@ -2,8 +2,7 @@
#define __TDB_H__
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Samba database functions
Copyright (C) Andrew Tridgell 1999
@@ -39,6 +38,7 @@ extern "C" {
#define TDB_NOLOCK 4 /* don't do any locking */
#define TDB_NOMMAP 8 /* don't use mmap */
#define TDB_CONVERT 16 /* convert endian (internal use) */
+#define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */
#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
@@ -127,11 +127,11 @@ void tdb_unlockall(TDB_CONTEXT *tdb);
/* Low level locking functions: use with care */
int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
-void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
+int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
/* Debug functions. Not used in production. */
void tdb_dump_all(TDB_CONTEXT *tdb);
-void tdb_printfreelist(TDB_CONTEXT *tdb);
+int tdb_printfreelist(TDB_CONTEXT *tdb);
extern TDB_DATA tdb_null;
diff --git a/source/tdb/tdbdump.c b/source/tdb/tdbdump.c
index ddaff162091..66642132093 100644
--- a/source/tdb/tdbdump.c
+++ b/source/tdb/tdbdump.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
simple tdb dump util
Copyright (C) Andrew Tridgell 2001
diff --git a/source/tdb/tdbtest.c b/source/tdb/tdbtest.c
index 80e9c8d07e6..0741073ce11 100644
--- a/source/tdb/tdbtest.c
+++ b/source/tdb/tdbtest.c
@@ -71,9 +71,9 @@ static void compare_db(void)
}
nextkey = tdb_nextkey(db, key);
- SAFE_FREE(key.dptr);
- SAFE_FREE(d.dptr);
- SAFE_FREE(gd.dptr);
+ free(key.dptr);
+ free(d.dptr);
+ free(gd.dptr);
key = nextkey;
}
@@ -92,9 +92,9 @@ static void compare_db(void)
}
gnextkey = gdbm_nextkey(gdbm, gkey);
- SAFE_FREE(gkey.dptr);
- SAFE_FREE(gd.dptr);
- SAFE_FREE(d.dptr);
+ free(gkey.dptr);
+ free(gd.dptr);
+ free(d.dptr);
gkey = gnextkey;
}
}
@@ -138,11 +138,11 @@ static void addrec_db(void)
}
} else {
data = tdb_fetch(db, key);
- SAFE_FREE(data.dptr);
+ if (data.dptr) free(data.dptr);
}
- SAFE_FREE(k);
- SAFE_FREE(d);
+ free(k);
+ free(d);
}
static void addrec_gdbm(void)
@@ -171,11 +171,11 @@ static void addrec_gdbm(void)
}
} else {
data = gdbm_fetch(gdbm, key);
- SAFE_FREE(data.dptr);
+ if (data.dptr) free(data.dptr);
}
- SAFE_FREE(k);
- SAFE_FREE(d);
+ free(k);
+ free(d);
}
static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
diff --git a/source/tdb/tdbtool.c b/source/tdb/tdbtool.c
index d1c199849b3..caa29401418 100644
--- a/source/tdb/tdbtool.c
+++ b/source/tdb/tdbtool.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
Samba database functions
Copyright (C) Andrew Tridgell 1999-2000
Copyright (C) Paul `Rusty' Russell 2000
diff --git a/source/tdb/tdbtorture.c b/source/tdb/tdbtorture.c
index 0cdb60db6ee..c4d912a1477 100644
--- a/source/tdb/tdbtorture.c
+++ b/source/tdb/tdbtorture.c
@@ -43,7 +43,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...)
char *ptr;
asprintf(&ptr,"xterm -e gdb /proc/%d/exe %d", getpid(), getpid());
system(ptr);
- SAFE_FREE(ptr);
+ free(ptr);
}
#endif
}
@@ -129,7 +129,7 @@ static void addrec_db(void)
if (tdb_store(db, key, data, TDB_REPLACE) != 0) {
fatal("tdb_store failed");
}
- SAFE_FREE(data.dptr);
+ if (data.dptr) free(data.dptr);
tdb_chainunlock(db, lockkey);
goto next;
}
@@ -143,12 +143,12 @@ static void addrec_db(void)
#endif
data = tdb_fetch(db, key);
- SAFE_FREE(data.dptr);
+ if (data.dptr) free(data.dptr);
next:
- SAFE_FREE(k);
- SAFE_FREE(d);
- SAFE_FREE(s);
+ free(k);
+ free(d);
+ free(s);
}
static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf,
diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c
index 87dabf165d4..5250d675c91 100644
--- a/source/tdb/tdbutil.c
+++ b/source/tdb/tdbutil.c
@@ -1,6 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Version 3.0
+ Unix SMB/CIFS implementation.
tdb utility functions
Copyright (C) Andrew Tridgell 1992-1998
@@ -53,123 +52,127 @@ void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval)
}
/****************************************************************************
- Fetch a value by a arbitrary blob key, return -1 if not found.
- JRA. DEPRECATED ! Use tdb_fetch_int32_byblob instead.
+ Fetch a int32 value by a arbitrary blob key, return -1 if not found.
+ Output is int32 in native byte order.
****************************************************************************/
-int tdb_fetch_int_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len)
+int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len)
{
TDB_DATA key, data;
- int ret;
+ int32 ret;
key.dptr = keyval;
key.dsize = len;
data = tdb_fetch(tdb, key);
- if (!data.dptr || data.dsize != sizeof(int))
+ if (!data.dptr || data.dsize != sizeof(int32))
return -1;
- memcpy(&ret, data.dptr, sizeof(int));
+ ret = IVAL(data.dptr,0);
SAFE_FREE(data.dptr);
return ret;
}
/****************************************************************************
- Fetch a value by string key, return -1 if not found.
- JRA. DEPRECATED ! Use tdb_fetch_int32 instead.
+ Fetch a int32 value by string key, return -1 if not found.
+ Output is int32 in native byte order.
****************************************************************************/
-int tdb_fetch_int(TDB_CONTEXT *tdb, char *keystr)
+int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr)
{
- return tdb_fetch_int_byblob(tdb, keystr, strlen(keystr) + 1);
+ return tdb_fetch_int32_byblob(tdb, keystr, strlen(keystr) + 1);
}
/****************************************************************************
- Store a value by an arbitary blob key, return 0 on success, -1 on failure.
- JRA. DEPRECATED ! Use tdb_store_int32_byblob instead.
+ Store a int32 value by an arbitary blob key, return 0 on success, -1 on failure.
+ Input is int32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-int tdb_store_int_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int v)
+int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v)
{
TDB_DATA key, data;
+ int32 v_store;
key.dptr = keystr;
key.dsize = len;
- data.dptr = (void *)&v;
- data.dsize = sizeof(int);
+ SIVAL(&v_store,0,v);
+ data.dptr = (void *)&v_store;
+ data.dsize = sizeof(int32);
return tdb_store(tdb, key, data, TDB_REPLACE);
}
/****************************************************************************
- Store a value by string key, return 0 on success, -1 on failure.
- JRA. DEPRECATED ! Use tdb_store_int32 instead.
+ Store a int32 value by string key, return 0 on success, -1 on failure.
+ Input is int32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-int tdb_store_int(TDB_CONTEXT *tdb, char *keystr, int v)
+int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v)
{
- return tdb_store_int_byblob(tdb, keystr, strlen(keystr) + 1, v);
+ return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v);
}
/****************************************************************************
- Fetch a int32 value by a arbitrary blob key, return -1 if not found.
- Output is int32 in native byte order.
+ Fetch a uint32 value by a arbitrary blob key, return -1 if not found.
+ Output is uint32 in native byte order.
****************************************************************************/
-int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len)
+BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 *value)
{
TDB_DATA key, data;
- int32 ret;
key.dptr = keyval;
key.dsize = len;
data = tdb_fetch(tdb, key);
- if (!data.dptr || data.dsize != sizeof(int32))
- return -1;
+ if (!data.dptr || data.dsize != sizeof(uint32))
+ return False;
- ret = IVAL(data.dptr,0);
+ *value = IVAL(data.dptr,0);
SAFE_FREE(data.dptr);
- return ret;
+ return True;
}
/****************************************************************************
- Fetch a int32 value by string key, return -1 if not found.
- Output is int32 in native byte order.
+ Fetch a uint32 value by string key, return -1 if not found.
+ Output is uint32 in native byte order.
****************************************************************************/
-int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr)
+BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value)
{
- return tdb_fetch_int32_byblob(tdb, keystr, strlen(keystr) + 1);
+ return tdb_fetch_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
}
/****************************************************************************
- Store a int32 value by an arbitary blob key, return 0 on success, -1 on failure.
- Input is int32 in native byte order. Output in tdb is in little-endian.
+ Store a uint32 value by an arbitary blob key, return 0 on success, -1 on failure.
+ Input is uint32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v)
+BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 value)
{
TDB_DATA key, data;
- int32 v_store;
+ uint32 v_store;
+ BOOL ret = True;
key.dptr = keystr;
key.dsize = len;
- SIVAL(&v_store,0,v);
+ SIVAL(&v_store, 0, value);
data.dptr = (void *)&v_store;
- data.dsize = sizeof(int32);
+ data.dsize = sizeof(uint32);
- return tdb_store(tdb, key, data, TDB_REPLACE);
+ if (tdb_store(tdb, key, data, TDB_REPLACE) == -1)
+ ret = False;
+
+ return ret;
}
/****************************************************************************
- Store a int32 value by string key, return 0 on success, -1 on failure.
- Input is int32 in native byte order. Output in tdb is in little-endian.
+ Store a uint32 value by string key, return 0 on success, -1 on failure.
+ Input is uint32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v)
+BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value)
{
- return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v);
+ return tdb_store_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
}
-
/****************************************************************************
Store a buffer by a null terminated string key. Return 0 on success, -1
on failure.
@@ -205,29 +208,35 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr)
/****************************************************************************
Atomic integer change. Returns old value. To create, set initial value in *oldval.
- Deprecated. Use int32 version. JRA.
****************************************************************************/
-int tdb_change_int_atomic(TDB_CONTEXT *tdb, char *keystr, int *oldval, int change_val)
+int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val)
{
- int val;
- int ret = -1;
+ int32 val;
+ int32 ret = -1;
if (tdb_lock_bystring(tdb, keystr) == -1)
return -1;
- if ((val = tdb_fetch_int(tdb, keystr)) == -1) {
- if (tdb_error(tdb) != TDB_ERR_NOEXIST)
+ if ((val = tdb_fetch_int32(tdb, keystr)) == -1) {
+ /* The lookup failed */
+ if (tdb_error(tdb) != TDB_ERR_NOEXIST) {
+ /* but not becouse it didn't exist */
goto err_out;
+ }
+ /* Start with 'old' value */
val = *oldval;
} else {
+ /* It worked, set return value (oldval) to tdb data */
*oldval = val;
- val += change_val;
}
- if (tdb_store_int(tdb, keystr, val) == -1)
+ /* Increment value for storage and return next time */
+ val += change_val;
+
+ if (tdb_store_int32(tdb, keystr, val) == -1)
goto err_out;
ret = 0;
@@ -239,35 +248,43 @@ int tdb_change_int_atomic(TDB_CONTEXT *tdb, char *keystr, int *oldval, int chang
}
/****************************************************************************
- Atomic integer change. Returns old value. To create, set initial value in *oldval.
+ Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval.
****************************************************************************/
-int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val)
+BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val)
{
- int32 val;
- int32 ret = -1;
-
+ uint32 val;
+ BOOL ret = False;
+
if (tdb_lock_bystring(tdb, keystr) == -1)
- return -1;
-
- if ((val = tdb_fetch_int32(tdb, keystr)) == -1) {
- if (tdb_error(tdb) != TDB_ERR_NOEXIST)
+ return False;
+
+ if (!tdb_fetch_uint32(tdb, keystr, &val)) {
+ /* It failed */
+ if (tdb_error(tdb) != TDB_ERR_NOEXIST) {
+ /* and not becouse it didn't exist */
goto err_out;
-
+ }
+
+ /* Start with 'old' value */
val = *oldval;
-
+
} else {
+ /* it worked, set return value (oldval) to tdb data */
*oldval = val;
- val += change_val;
+
}
-
- if (tdb_store_int32(tdb, keystr, val) == -1)
+
+ /* get a new value to store */
+ val += change_val;
+
+ if (!tdb_store_uint32(tdb, keystr, val))
goto err_out;
-
- ret = 0;
-
+
+ ret = True;
+
err_out:
-
+
tdb_unlock_bystring(tdb, keystr);
return ret;
}
@@ -472,7 +489,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...)
if (!ptr || !*ptr)
return;
- DEBUG(level, ("tdb(%s): %s", tdb->name, ptr));
+ DEBUG(level, ("tdb(%s): %s", tdb->name ? tdb->name : "unknown", ptr));
SAFE_FREE(ptr);
}
@@ -481,7 +498,7 @@ static void tdb_log(TDB_CONTEXT *tdb, int level, const char *format, ...)
the samba DEBUG() system.
****************************************************************************/
-TDB_CONTEXT *tdb_open_log(char *name, int hash_size, int tdb_flags,
+TDB_CONTEXT *tdb_open_log(const char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode)
{
TDB_CONTEXT *tdb;
diff --git a/source/utils/locktest.c b/source/utils/locktest.c
index 4697067e881..f34e12885be 100644
--- a/source/utils/locktest.c
+++ b/source/utils/locktest.c
@@ -34,7 +34,7 @@ static BOOL use_oplocks;
#define FILENAME "\\locktest.dat"
#define LOCKRANGE 1000
-#define LOCKBASE 0;
+#define LOCKBASE 0
/*
#define LOCKBASE (0x40000000 - 50)
@@ -59,14 +59,16 @@ struct record {
char needed;
};
+#define PRESETS 0
+
+#if PRESETS
static struct record preset[] = {
-#if 0
{36, 5, 0, 0, 0, 8, 1},
{ 2, 6, 0, 1, 0, 1, 1},
{53, 92, 0, 0, 0, 0, 1},
{99, 11, 0, 0, 7, 1, 1},
-#endif
};
+#endif
static struct record *recorded;
@@ -113,7 +115,6 @@ struct cli_state *connect_one(char *share)
char *server_n;
fstring server;
struct in_addr ip;
- extern struct in_addr ipzero;
fstring myname;
static int count;
@@ -125,7 +126,7 @@ struct cli_state *connect_one(char *share)
server_n = server;
- ip = ipzero;
+ zero_ip(&ip);
slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++);
@@ -133,7 +134,7 @@ struct cli_state *connect_one(char *share)
make_nmb_name(&called , server, 0x20);
again:
- ip = ipzero;
+ zero_ip(&ip);
/* have to open a new connection */
if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
@@ -378,9 +379,12 @@ static void test_locks(char *share[NSERVERS])
recorded = (struct record *)malloc(sizeof(*recorded) * numops);
for (n=0; n<numops; n++) {
+#if PRESETS
if (n < sizeof(preset) / sizeof(preset[0])) {
recorded[n] = preset[n];
- } else {
+ } else
+#endif
+ {
recorded[n].conn = random() % NCONNECTIONS;
recorded[n].f = random() % NFILES;
recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1));
diff --git a/source/utils/locktest2.c b/source/utils/locktest2.c
index 91083bc3ec4..ac16055c0f1 100644
--- a/source/utils/locktest2.c
+++ b/source/utils/locktest2.c
@@ -157,7 +157,6 @@ struct cli_state *connect_one(char *share)
char *server_n;
fstring server;
struct in_addr ip;
- extern struct in_addr ipzero;
fstring myname;
static int count;
@@ -169,7 +168,7 @@ struct cli_state *connect_one(char *share)
server_n = server;
- ip = ipzero;
+ zero_ip(&ip);
slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++);
@@ -177,7 +176,7 @@ struct cli_state *connect_one(char *share)
make_nmb_name(&called , server, 0x20);
again:
- ip = ipzero;
+ zero_ip(&ip);
/* have to open a new connection */
if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
diff --git a/source/utils/masktest.c b/source/utils/masktest.c
index ba719bae248..e477f09b535 100644
--- a/source/utils/masktest.c
+++ b/source/utils/masktest.c
@@ -33,6 +33,7 @@ static char *maskchars = "<>\"?*abc.";
static char *filechars = "abcdefghijklm.";
static int verbose;
static int die_on_error;
+static int NumLoops = 0;
/* a test fn for LANMAN mask support */
int ms_fnmatch_lanman_core(char *pattern, char *string)
@@ -165,7 +166,6 @@ struct cli_state *connect_one(char *share)
char *server_n;
char *server;
struct in_addr ip;
- extern struct in_addr ipzero;
server = share+2;
share = strchr(server,'\\');
@@ -175,13 +175,13 @@ struct cli_state *connect_one(char *share)
server_n = server;
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, "masktest", 0x0);
make_nmb_name(&called , server, 0x20);
again:
- ip = ipzero;
+ zero_ip(&ip);
/* have to open a new connection */
if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
@@ -383,6 +383,8 @@ static void test_mask(int argc, char *argv[],
if (strspn(file+l, ".") == strlen(file+l)) continue;
testpair(cli, mask, file);
+ if (NumLoops && (--NumLoops == 0))
+ break;
}
finished:
@@ -396,11 +398,16 @@ static void usage(void)
"Usage:\n\
masktest //server/share [options..]\n\
options:\n\
+ -d debuglevel\n\
+ -n numloops\n\
-W workgroup\n\
-U user%%pass\n\
-s seed\n\
+ -M max protocol\n\
-f filechars (default %s)\n\
-m maskchars (default %s)\n\
+ -v verbose mode\n\
+ -E die on error\n\
-a show all tests\n\
\n\
This program tests wildcard matching between two servers. It generates\n\
@@ -420,16 +427,20 @@ static void usage(void)
extern char *optarg;
extern int optind;
extern FILE *dbf;
+ extern BOOL AllowDebugChange;
int opt;
char *p;
int seed;
static pstring servicesf = CONFIGFILE;
+ extern int Protocol;
setlinebuf(stdout);
+ AllowDebugChange = False;
+ DEBUGLEVEL = 0;
dbf = stderr;
- if (argv[1][0] == '-' || argc < 2) {
+ if (argc < 2 || argv[1][0] == '-') {
usage();
exit(1);
}
@@ -445,10 +456,6 @@ static void usage(void)
TimeInit();
charset_initialise();
- codepage_initialise(lp_client_code_page());
-
- lp_load(servicesf,True,False,False);
- load_interfaces();
if (getenv("USER")) {
pstrcpy(username,getenv("USER"));
@@ -456,8 +463,14 @@ static void usage(void)
seed = time(NULL);
- while ((opt = getopt(argc, argv, "U:s:hm:f:aoW:M:vE")) != EOF) {
+ while ((opt = getopt(argc, argv, "n:d:U:s:hm:f:aoW:M:vE")) != EOF) {
switch (opt) {
+ case 'n':
+ NumLoops = atoi(optarg);
+ break;
+ case 'd':
+ DEBUGLEVEL = atoi(optarg);
+ break;
case 'E':
die_on_error = 1;
break;
@@ -503,12 +516,16 @@ static void usage(void)
argc -= optind;
argv += optind;
+ lp_load(servicesf,True,False,False);
+ load_interfaces();
+ codepage_initialise(lp_client_code_page());
cli = connect_one(share);
if (!cli) {
DEBUG(0,("Failed to connect to %s\n", share));
exit(1);
}
+ Protocol = cli->protocol;
/* need to init seed after connect as clientgen uses random numbers */
DEBUG(0,("seed=%d\n", seed));
diff --git a/source/utils/nmblookup.c b/source/utils/nmblookup.c
index 27bd419c781..a134b218f61 100644
--- a/source/utils/nmblookup.c
+++ b/source/utils/nmblookup.c
@@ -24,7 +24,6 @@
#include "includes.h"
-extern struct in_addr ipzero;
extern BOOL AllowDebugChange;
static BOOL use_bcast = True;
diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c
index f65f65fd330..68e26dff607 100644
--- a/source/utils/smbcacls.c
+++ b/source/utils/smbcacls.c
@@ -1,7 +1,6 @@
/*
- Unix SMB/Netbios implementation.
+ Unix SMB/CIFS implementation.
ACL get/set utility
- Version 3.0
Copyright (C) Andrew Tridgell 2000
Copyright (C) Tim Potter 2000
@@ -28,6 +27,7 @@ static fstring password;
static pstring username;
static pstring owner_username;
static fstring server;
+static fstring workgroup = "";
static int got_pass;
static int test_args;
TALLOC_CTX *ctx;
@@ -106,34 +106,44 @@ static BOOL cacls_open_policy_hnd(void)
/* convert a SID to a string, either numeric or username/group */
static void SidToString(fstring str, DOM_SID *sid)
{
+ char **domains = NULL;
char **names = NULL;
uint32 *types = NULL;
- int num_names;
sid_to_string(str, sid);
if (numeric) return;
+ if (strcmp(str, "S-1-1-0") == 0) {
+
+ fstrcpy(str, "everyone");
+ return;
+
+ }
+
/* Ask LSA to convert the sid to a name */
if (!cacls_open_policy_hnd() ||
- !NT_STATUS_IS_OK(cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, sid, &names, &types,
- &num_names)) ||
- !names || !names[0]) {
+ !NT_STATUS_IS_OK(cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx,
+ &pol, 1, sid, &domains,
+ &names, &types)) ||
+ !domains || !domains[0] || !names || !names[0]) {
return;
}
/* Converted OK */
- fstrcpy(str, names[0]);
+ slprintf(str, sizeof(fstring) - 1, "%s%s%s",
+ domains[0], lp_winbind_separator(),
+ names[0]);
+
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL StringToSid(DOM_SID *sid, char *str)
+static BOOL StringToSid(DOM_SID *sid, const char *str)
{
uint32 *types = NULL;
DOM_SID *sids = NULL;
- int num_sids;
BOOL result = True;
if (strncmp(str, "S-", 2) == 0) {
@@ -141,8 +151,9 @@ static BOOL StringToSid(DOM_SID *sid, char *str)
}
if (!cacls_open_policy_hnd() ||
- !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, &pol, 1, &str, &sids, &types,
- &num_sids))) {
+ !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx,
+ &pol, 1, &str, &sids,
+ &types))) {
result = False;
goto done;
}
@@ -265,12 +276,12 @@ static BOOL parse_ace(SEC_ACE *ace, char *str)
/* Only numeric form accepted for flags at present */
- if (!(next_token(NULL, tok, "/", sizeof(fstring)) &&
+ if (!(next_token(&p, tok, "/", sizeof(fstring)) &&
sscanf(tok, "%i", &aflags))) {
return False;
}
- if (!next_token(NULL, tok, "/", sizeof(fstring))) {
+ if (!next_token(&p, tok, "/", sizeof(fstring))) {
return False;
}
@@ -402,7 +413,7 @@ static SEC_DESC *sec_desc_parse(char *str)
static void sec_desc_print(FILE *f, SEC_DESC *sd)
{
fstring sidstr;
- int i;
+ uint32 i;
printf("REVISION:%d\n", sd->revision);
@@ -525,18 +536,30 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode,
static int ace_compare(SEC_ACE *ace1, SEC_ACE *ace2)
{
- if (sec_ace_equal(ace1, ace2)) return 0;
- if (ace1->type != ace2->type) return ace2->type - ace1->type;
- if (sid_compare(&ace1->trustee, &ace2->trustee)) return sid_compare(&ace1->trustee, &ace2->trustee);
- if (ace1->flags != ace2->flags) return ace1->flags - ace2->flags;
- if (ace1->info.mask != ace2->info.mask) return ace1->info.mask - ace2->info.mask;
- if (ace1->size != ace2->size) return ace1->size - ace2->size;
+ if (sec_ace_equal(ace1, ace2))
+ return 0;
+
+ if (ace1->type != ace2->type)
+ return ace2->type - ace1->type;
+
+ if (sid_compare(&ace1->trustee, &ace2->trustee))
+ return sid_compare(&ace1->trustee, &ace2->trustee);
+
+ if (ace1->flags != ace2->flags)
+ return ace1->flags - ace2->flags;
+
+ if (ace1->info.mask != ace2->info.mask)
+ return ace1->info.mask - ace2->info.mask;
+
+ if (ace1->size != ace2->size)
+ return ace1->size - ace2->size;
+
return memcmp(ace1, ace2, sizeof(SEC_ACE));
}
static void sort_acl(SEC_ACL *the_acl)
{
- int i;
+ uint32 i;
if (!the_acl) return;
qsort(the_acl->ace, the_acl->num_aces, sizeof(the_acl->ace[0]), QSORT_CAST ace_compare);
@@ -562,7 +585,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
{
int fnum;
SEC_DESC *sd, *old;
- int i, j;
+ uint32 i, j;
size_t sd_size;
int result = EXIT_OK;
@@ -599,7 +622,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->ace[i],
&old->dacl->ace[j])) {
- int k;
+ uint32 k;
for (k=j; k<old->dacl->num_aces-1;k++) {
old->dacl->ace[k] = old->dacl->ace[k+1];
}
@@ -689,9 +712,7 @@ struct cli_state *connect_one(char *share)
{
struct cli_state *c;
struct nmb_name called, calling;
- char *server_n;
struct in_addr ip;
- extern struct in_addr ipzero;
extern pstring global_myname;
fstrcpy(server,share+2);
@@ -700,20 +721,17 @@ struct cli_state *connect_one(char *share)
*share = 0;
share++;
- server_n = server;
-
- ip = ipzero;
+ zero_ip(&ip);
make_nmb_name(&calling, global_myname, 0x0);
make_nmb_name(&called , server, 0x20);
again:
- ip = ipzero;
+ zero_ip(&ip);
/* have to open a new connection */
- if (!(c=cli_initialise(NULL)) || (cli_set_port(c, 139) == 0) ||
- !cli_connect(c, server_n, &ip)) {
- DEBUG(0,("Connection to %s failed\n", server_n));
+ if (!(c=cli_initialise(NULL)) || !cli_connect(c, server, &ip)) {
+ DEBUG(0,("Connection to %s failed\n", server));
cli_shutdown(c);
return NULL;
}
@@ -746,7 +764,7 @@ struct cli_state *connect_one(char *share)
if (!cli_session_setup(c, username,
password, strlen(password),
password, strlen(password),
- lp_workgroup())) {
+ (workgroup[0] ? workgroup : lp_workgroup()))) {
DEBUG(0,("session setup failed: %s\n", cli_errstr(c)));
cli_shutdown(c);
return NULL;
@@ -780,6 +798,9 @@ static void usage(void)
\t-G username change group ownership of a file\n\
\t-n don't resolve sids or masks to names\n\
\t-h print help\n\
+\t-d debuglevel set debug output level\n\
+\t-U username user to autheticate as\n\
+\t-W workgroup or domain workgroup or domain user is in\n\
\n\
The username can be of the form username%%password or\n\
workgroup\\username%%password.\n\n\
@@ -847,7 +868,7 @@ You can string acls together with spaces, commas or newlines\n\
}
}
- while ((opt = getopt(argc, argv, "U:nhS:D:A:M:C:G:t")) != EOF) {
+ while ((opt = getopt(argc, argv, "U:nhdS:D:A:M:C:G:t")) != EOF) {
switch (opt) {
case 'U':
pstrcpy(username,optarg);
@@ -859,6 +880,10 @@ You can string acls together with spaces, commas or newlines\n\
}
break;
+ case 'W':
+ pstrcpy(workgroup, optarg);
+ break;
+
case 'S':
the_acl = optarg;
mode = SMB_ACL_SET;
@@ -902,6 +927,10 @@ You can string acls together with spaces, commas or newlines\n\
talloc_destroy(ctx);
exit(EXIT_PARSE_ERROR);
+ case 'd':
+ DEBUGLEVEL = atoi(optarg);
+ break;
+
default:
printf("Unknown option %c (%d)\n", (char)opt, opt);
talloc_destroy(ctx);
diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c
index 3b4781bb742..102fdbb19e7 100644
--- a/source/utils/smbcontrol.c
+++ b/source/utils/smbcontrol.c
@@ -139,7 +139,7 @@ static BOOL send_message(char *dest, int msg_type, void *buf, int len, BOOL dupl
/* "smbd" is the only broadcast operation */
if (strequal(dest,"smbd")) {
- retval = message_send_all(the_tdb,msg_type, buf, len, duplicates);
+ retval = message_send_all(the_tdb,msg_type, buf, len, duplicates, NULL);
} else if (strequal(dest,"nmbd")) {
pid = pidfile_pid(dest);
if (pid == 0) {
@@ -281,8 +281,15 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params)
fprintf(stderr, "printer-notify needs a printer name\n");
return (False);
}
- retval = send_message(dest, MSG_PRINTER_NOTIFY, params[0],
- strlen(params[0]) + 1, False);
+ {
+ char msg[8 + sizeof(fstring)+4];
+ SIVAL(msg,0,PRINTER_CHANGE_ALL);
+ SIVAL(msg,4,0);
+ fstrcpy(&msg[8], params[0]);
+ SIVAL(msg,8+strlen(params[0])+1, PRINTER_MESSAGE_DRIVER);
+
+ retval = send_message(dest, MSG_PRINTER_NOTIFY, msg, 8 + strlen(params[0]) + 1 + 4, False);
+ }
break;
case MSG_SMB_FORCE_TDIS:
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index 24185114f13..5bd8b421b1d 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -33,6 +33,21 @@ extern int optind;
/* forced running in root-mode */
static BOOL local_mode;
+static BOOL joining_domain = False, got_pass = False, got_username = False;
+static int local_flags = 0;
+static BOOL stdin_passwd_get = False;
+static fstring user_name, user_password;
+static char *new_domain = NULL;
+static char *new_passwd = NULL;
+static char *old_passwd = NULL;
+static char *remote_machine = NULL;
+static pstring servicesf = CONFIGFILE;
+
+#ifdef WITH_LDAP_SAM
+static fstring ldap_secret;
+#endif
+
+
/*********************************************************
A strdup with exit
@@ -54,34 +69,172 @@ static char *strdup_x(const char *s)
**********************************************************/
static void usage(void)
{
- if (getuid() == 0) {
- printf("smbpasswd [options] [username] [password]\n");
- } else {
- printf("smbpasswd [options] [password]\n");
- }
+ printf("When run by root:\n");
+ printf(" smbpasswd [options] [username] [password]\n");
+ printf("otherwise:\n");
+ printf(" smbpasswd [options] [password]\n\n");
+
printf("options:\n");
+ printf(" -L local mode (must be first option)\n");
+ printf(" -h print this usage message\n");
printf(" -s use stdin for password prompt\n");
+ printf(" -c smb.conf file Use the given path to the smb.conf file\n");
printf(" -D LEVEL debug level\n");
- printf(" -U USER remote username\n");
printf(" -r MACHINE remote machine\n");
+ printf(" -U USER remote username\n");
- if (getuid() == 0 || local_mode) {
- printf(" -L local mode (must be first option)\n");
- printf(" -R ORDER name resolve order\n");
- printf(" -j DOMAIN join domain name\n");
- printf(" -a add user\n");
- printf(" -x delete user\n");
- printf(" -d disable user\n");
- printf(" -e enable user\n");
- printf(" -n set no password\n");
- printf(" -m machine trust account\n");
+ printf("extra options when run by root or in local mode:\n");
+ printf(" -a add user\n");
+ printf(" -d disable user\n");
+ printf(" -e enable user\n");
+ printf(" -m machine trust account\n");
+ printf(" -n set no password\n");
#ifdef WITH_LDAP_SAM
- printf(" -w ldap admin password\n");
+ printf(" -w ldap admin password\n");
#endif
- }
+ printf(" -x delete user\n");
+ printf(" -j DOMAIN join domain name\n");
+ printf(" -R ORDER name resolve order\n");
+
exit(1);
}
+static void set_line_buffering(FILE *f)
+{
+ setvbuf(f, NULL, _IOLBF, 0);
+}
+
+/*******************************************************************
+ Process command line options
+ ******************************************************************/
+static void process_options(int argc, char **argv, BOOL amroot)
+{
+ int ch;
+
+ user_name[0] = '\0';
+
+ while ((ch = getopt(argc, argv, "c:axdehmnj:r:sw:R:D:U:L")) != EOF) {
+ switch(ch) {
+ case 'L':
+ local_mode = amroot = True;
+ break;
+ case 'c':
+ pstrcpy(servicesf,optarg);
+ break;
+ case 'a':
+ if (!amroot) goto bad_args;
+ local_flags |= LOCAL_ADD_USER;
+ break;
+ case 'x':
+ if (!amroot) goto bad_args;
+ local_flags |= LOCAL_DELETE_USER;
+ new_passwd = strdup_x("XXXXXX");
+ break;
+ case 'd':
+ if (!amroot) goto bad_args;
+ local_flags |= LOCAL_DISABLE_USER;
+ new_passwd = strdup_x("XXXXXX");
+ break;
+ case 'e':
+ if (!amroot) goto bad_args;
+ local_flags |= LOCAL_ENABLE_USER;
+ break;
+ case 'm':
+ if (!amroot) goto bad_args;
+ local_flags |= LOCAL_TRUST_ACCOUNT;
+ break;
+ case 'n':
+ if (!amroot) goto bad_args;
+ local_flags |= LOCAL_SET_NO_PASSWORD;
+ new_passwd = strdup_x("NO PASSWORD");
+ break;
+ case 'j':
+ if (!amroot) goto bad_args;
+ new_domain = optarg;
+ strupper(new_domain);
+ joining_domain = True;
+ break;
+ case 'r':
+ remote_machine = optarg;
+ break;
+ case 's':
+ set_line_buffering(stdin);
+ set_line_buffering(stdout);
+ set_line_buffering(stderr);
+ stdin_passwd_get = True;
+ break;
+ case 'w':
+ if (!amroot) goto bad_args;
+#ifdef WITH_LDAP_SAM
+ local_flags |= LOCAL_SET_LDAP_ADMIN_PW;
+ fstrcpy(ldap_secret, optarg);
+ break;
+#else
+ printf("-w not available unless configured --with-ldap\n");
+ goto bad_args;
+#endif
+ case 'R':
+ if (!amroot) goto bad_args;
+ lp_set_name_resolve_order(optarg);
+ break;
+ case 'D':
+ DEBUGLEVEL = atoi(optarg);
+ break;
+ case 'U': {
+ char *lp;
+
+ got_username = True;
+ fstrcpy(user_name, optarg);
+
+ if ((lp = strchr(user_name, '%'))) {
+ *lp = 0;
+ fstrcpy(user_password, lp + 1);
+ got_pass = True;
+ memset(strchr(optarg, '%') + 1, 'X',
+ strlen(user_password));
+ }
+
+ break;
+ }
+ case 'h':
+ default:
+bad_args:
+ usage();
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (joining_domain && (argc != 0))
+ usage();
+
+ switch(argc) {
+ case 0:
+ if (!got_username)
+ fstrcpy(user_name, "");
+ break;
+ case 1:
+ if (!amroot == 1) {
+ new_passwd = argv[0];
+ break;
+ }
+ if (got_username)
+ usage();
+ fstrcpy(user_name, argv[0]);
+ break;
+ case 2:
+ if (!amroot || got_username || got_pass)
+ usage();
+ fstrcpy(user_name, argv[0]);
+ new_passwd = strdup_x(argv[1]);
+ break;
+ default:
+ usage();
+ }
+
+}
+
/* Initialise client credentials for authenticated pipe access */
void init_rpcclient_creds(struct ntuser_creds *creds, char* username,
@@ -117,15 +270,16 @@ Join a domain using the administrator username and password
goto done; \
}
-static int join_domain_byuser(char *domain, char *remote_machine,
+static int join_domain_byuser(char *domain, char *remote,
char *username, char *password)
{
/* libsmb variables */
+ pstring pdc_name;
struct nmb_name calling, called;
struct ntuser_creds creds;
struct cli_state cli;
- fstring dest_host, acct_name;
+ fstring acct_name;
struct in_addr dest_ip;
TALLOC_CTX *mem_ctx;
@@ -149,6 +303,8 @@ static int join_domain_byuser(char *domain, char *remote_machine,
NTSTATUS result;
int retval = 1;
+ pstrcpy(pdc_name, remote ? remote : "");
+
/* Connect to remote machine */
ZERO_STRUCT(cli);
@@ -167,17 +323,39 @@ static int join_domain_byuser(char *domain, char *remote_machine,
init_rpcclient_creds(&creds, username, domain, password);
cli_init_creds(&cli, &creds);
- if (!resolve_srv_name(remote_machine, dest_host, &dest_ip)) {
- DEBUG(0, ("Could not resolve name %s\n", remote_machine));
- goto done;
+ /*
+ * If we are given a remote machine assume this is the PDC.
+ */
+
+ if(remote == NULL || !strcmp(remote, "*")) {
+ struct in_addr *ip_list;
+ int addr_count;
+ if (!get_dc_list(True /* PDC only*/, domain, &ip_list, &addr_count)) {
+ fprintf(stderr, "Unable to find the domain controller for domain %s.\n", domain);
+ return 1;
+ }
+ if ((addr_count < 1) || (is_zero_ip(ip_list[0]))) {
+ fprintf(stderr, "Incorrect entries returned when finding the domain controller for domain %s.\n", domain);
+ return 1;
+ }
+
+ if (!lookup_dc_name(global_myname, domain, &ip_list[0], pdc_name)) {
+ fprintf(stderr, "Unable to lookup the name for the domain controller for domain %s.\n", domain);
+ return 1;
+ }
+ dest_ip = ip_list[0];
}
- make_nmb_name(&called, dns_to_netbios_name(dest_host), 0x20);
+ make_nmb_name(&called, pdc_name, 0x20);
make_nmb_name(&calling, dns_to_netbios_name(global_myname), 0);
- if (!cli_establish_connection(&cli, dest_host, &dest_ip, &calling,
+ if (!cli_establish_connection(&cli, pdc_name, &dest_ip, &calling,
&called, "IPC$", "IPC", False, True)) {
- DEBUG(0, ("Error connecting to %s\n", dest_host));
+ if (!NT_STATUS_IS_OK(cli_nt_error(&cli))) {
+ DEBUG(0, ("Error connecting to %s - %s\n", pdc_name,cli_errstr(&cli)));
+ } else {
+ DEBUG(0, ("Error connecting to %s\n", pdc_name));
+ }
goto done;
}
@@ -301,7 +479,7 @@ static int join_domain_byuser(char *domain, char *remote_machine,
encode_pw_buffer((char *)pwbuf, machine_pwd, plen, False);
- nt_owf_genW(&upw, ntpw);
+ mdfour( ntpw, (unsigned char *)upw.buffer, plen);
}
/* Set password on machine account */
@@ -381,13 +559,13 @@ Join a domain. Old server manager method.
static int join_domain(char *domain, char *remote)
{
- pstring remote_machine;
+ pstring pdc_name;
fstring trust_passwd;
unsigned char orig_trust_passwd_hash[16];
DOM_SID domain_sid;
BOOL ret;
- pstrcpy(remote_machine, remote ? remote : "");
+ pstrcpy(pdc_name, remote ? remote : "");
fstrcpy(trust_passwd, global_myname);
strlower(trust_passwd);
E_md4hash( (uchar *)trust_passwd, orig_trust_passwd_hash);
@@ -415,23 +593,31 @@ machine %s in domain %s.\n", global_myname, domain);
* If we are given a remote machine assume this is the PDC.
*/
- if(remote == NULL) {
- pstrcpy(remote_machine, lp_passwordserver());
- }
+ if(remote == NULL || !strcmp(remote, "*")) {
+ struct in_addr *ip_list;
+ int addr_count;
+ if (!get_dc_list(True /* PDC only*/, domain, &ip_list, &addr_count)) {
+ fprintf(stderr, "Unable to find the domain controller for domain %s.\n", domain);
+ return 1;
+ }
+ if ((addr_count < 1) || (is_zero_ip(ip_list[0]))) {
+ fprintf(stderr, "Incorrect entries returned when finding the domain controller for domain %s.\n", domain);
+ return 1;
+ }
- if(!*remote_machine) {
- fprintf(stderr, "No password server list given in smb.conf - \
-unable to join domain.\n");
- return 1;
+ if (!lookup_dc_name(global_myname, domain, &ip_list[0], pdc_name)) {
+ fprintf(stderr, "Unable to lookup the name for the domain controller for domain %s.\n", domain);
+ return 1;
+ }
}
- if (!fetch_domain_sid( domain, remote_machine, &domain_sid) ||
+ if (!fetch_domain_sid( domain, pdc_name, &domain_sid) ||
!secrets_store_domain_sid(domain, &domain_sid)) {
fprintf(stderr,"Failed to get domain SID. Unable to join domain %s.\n",domain);
return 1;
}
- ret = change_trust_account_password( domain, remote_machine);
+ ret = change_trust_account_password( domain, pdc_name);
if(!ret) {
trust_password_delete(domain);
@@ -444,11 +630,6 @@ unable to join domain.\n");
return 0;
}
-static void set_line_buffering(FILE *f)
-{
- setvbuf(f, NULL, _IOLBF, 0);
-}
-
/*************************************************************
Utility function to prompt for passwords from stdin. Each
password entered must end with a newline.
@@ -537,7 +718,7 @@ static BOOL password_change(const char *remote_machine, char *user_name,
return False;
}
ret = remote_password_change(remote_machine, user_name,
- old_passwd, new_passwd, err_str, sizeof(err_str));
+ old_passwd, new_passwd, err_str, sizeof(err_str));
if(*err_str)
fprintf(stderr, err_str);
return ret;
@@ -570,107 +751,15 @@ static BOOL store_ldap_admin_pw (char* pw)
}
#endif
+
/*************************************************************
Handle password changing for root.
*************************************************************/
-static int process_root(int argc, char *argv[])
+static int process_root(void)
{
struct passwd *pwd;
- int result = 0, ch;
- BOOL joining_domain = False, got_pass = False, got_username = False;
- int local_flags = 0;
- BOOL stdin_passwd_get = False;
- fstring user_name, user_password;
-#ifdef WITH_LDAP_SAM
- fstring ldap_secret;
-#endif
- char *new_domain = NULL;
- char *new_passwd = NULL;
- char *old_passwd = NULL;
- char *remote_machine = NULL;
-
- user_name[0] = '\0';
-
- while ((ch = getopt(argc, argv, "axdehmnj:r:sw:R:D:U:L")) != EOF) {
- switch(ch) {
- case 'L':
- local_mode = True;
- break;
- case 'a':
- local_flags |= LOCAL_ADD_USER;
- break;
- case 'x':
- local_flags |= LOCAL_DELETE_USER;
- new_passwd = strdup_x("XXXXXX");
- break;
- case 'd':
- local_flags |= LOCAL_DISABLE_USER;
- new_passwd = strdup_x("XXXXXX");
- break;
- case 'e':
- local_flags |= LOCAL_ENABLE_USER;
- break;
- case 'm':
- local_flags |= LOCAL_TRUST_ACCOUNT;
- break;
- case 'n':
- local_flags |= LOCAL_SET_NO_PASSWORD;
- new_passwd = strdup_x("NO PASSWORD");
- break;
- case 'j':
- new_domain = optarg;
- strupper(new_domain);
- joining_domain = True;
- break;
- case 'r':
- remote_machine = optarg;
- break;
- case 's':
- set_line_buffering(stdin);
- set_line_buffering(stdout);
- set_line_buffering(stderr);
- stdin_passwd_get = True;
- break;
- case 'w':
-#ifdef WITH_LDAP_SAM
- local_flags |= LOCAL_SET_LDAP_ADMIN_PW;
- fstrcpy(ldap_secret, optarg);
- break;
-#else
- printf("-w not available unless configured --with-ldap\n");
- goto done;
-#endif
- case 'R':
- lp_set_name_resolve_order(optarg);
- break;
- case 'D':
- DEBUGLEVEL = atoi(optarg);
- break;
- case 'U': {
- char *lp;
-
- got_username = True;
- fstrcpy(user_name, optarg);
-
- if ((lp = strchr(user_name, '%'))) {
- *lp = 0;
- fstrcpy(user_password, lp + 1);
- got_pass = True;
- memset(strchr(optarg, '%') + 1, 'X',
- strlen(user_password));
- }
-
- break;
- }
- case 'h':
- default:
- usage();
- }
- }
-
- argc -= optind;
- argv += optind;
+ int result = 0;
#ifdef WITH_LDAP_SAM
if (local_flags & LOCAL_SET_LDAP_ADMIN_PW)
@@ -704,9 +793,6 @@ static int process_root(int argc, char *argv[])
if (joining_domain) {
- if (argc != 0)
- usage();
-
/* Are we joining by specifing an admin username and
password? */
@@ -735,26 +821,6 @@ static int process_root(int argc, char *argv[])
* Deal with root - can add a user, but only locally.
*/
- switch(argc) {
- case 0:
- if (!got_username)
- fstrcpy(user_name, "");
- break;
- case 1:
- if (got_username)
- usage();
- fstrcpy(user_name, argv[0]);
- break;
- case 2:
- if (got_username || got_pass)
- usage();
- fstrcpy(user_name, argv[0]);
- new_passwd = strdup_x(argv[1]);
- break;
- default:
- usage();
- }
-
if (!user_name[0] && (pwd = sys_getpwuid(0))) {
fstrcpy(user_name, pwd->pw_name);
}
@@ -840,7 +906,9 @@ static int process_root(int argc, char *argv[])
goto done;
}
- if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD))) {
+ if(remote_machine) {
+ printf("Password changed for user %s on %s.\n", user_name, remote_machine );
+ } else if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD))) {
SAM_ACCOUNT *sampass = NULL;
uint16 acct_ctrl;
@@ -871,55 +939,18 @@ static int process_root(int argc, char *argv[])
/*************************************************************
-handle password changing for non-root
+ Handle password changing for non-root.
*************************************************************/
-static int process_nonroot(int argc, char *argv[])
+
+static int process_nonroot(void)
{
struct passwd *pwd = NULL;
- int result = 0, ch;
- BOOL stdin_passwd_get = False;
- char *old_passwd = NULL;
- char *remote_machine = NULL;
- char *user_name = NULL;
- char *new_passwd = NULL;
-
- while ((ch = getopt(argc, argv, "hD:r:sU:")) != EOF) {
- switch(ch) {
- case 'D':
- DEBUGLEVEL = atoi(optarg);
- break;
- case 'r':
- remote_machine = optarg;
- break;
- case 's':
- set_line_buffering(stdin);
- set_line_buffering(stdout);
- set_line_buffering(stderr);
- stdin_passwd_get = True;
- break;
- case 'U':
- user_name = optarg;
- break;
- default:
- usage();
- }
- }
-
- argc -= optind;
- argv += optind;
+ int result = 0;
- if(argc > 1) {
- usage();
- }
-
- if (argc == 1) {
- new_passwd = argv[0];
- }
-
- if (!user_name) {
+ if (!user_name[0]) {
pwd = sys_getpwuid(getuid());
if (pwd) {
- user_name = strdup_x(pwd->pw_name);
+ fstrcpy(user_name,pwd->pw_name);
} else {
fprintf(stderr,"you don't exist - go away\n");
exit(1);
@@ -973,7 +1004,7 @@ static int process_nonroot(int argc, char *argv[])
**********************************************************/
int main(int argc, char **argv)
{
- static pstring servicesf = CONFIGFILE;
+ BOOL amroot = getuid() == 0;
AllowDebugChange = False;
@@ -981,12 +1012,13 @@ int main(int argc, char **argv)
set_auth_parameters(argc, argv);
#endif /* HAVE_SET_AUTH_PARAMETERS */
+ charset_initialise();
+
+ process_options(argc, argv, amroot);
TimeInit();
setup_logging("smbpasswd", True);
- charset_initialise();
-
if(!initialize_password_db(False)) {
fprintf(stderr, "Can't setup password database vectors.\n");
exit(1);
@@ -1019,17 +1051,10 @@ int main(int argc, char **argv)
exit(1);
}
- /* pre-check for local mode option as first option. We can't
- do this via normal getopt as getopt can't be called
- twice. */
- if (argc > 1 && strcmp(argv[1], "-L") == 0) {
- local_mode = True;
- }
-
- if (local_mode || getuid() == 0) {
+ if (local_mode || amroot) {
secrets_init();
- return process_root(argc, argv);
+ return process_root();
}
- return process_nonroot(argc, argv);
+ return process_nonroot();
}
diff --git a/source/utils/status.c b/source/utils/status.c
index 01d80ad53dd..044cd7a6a16 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -101,8 +101,8 @@ static void print_share_mode(share_mode_entry *e, char *fname)
static int count;
if (count==0) {
printf("Locked files:\n");
- printf("Pid DenyMode R/W Oplock Name\n");
- printf("--------------------------------------------------\n");
+ printf("Pid DenyMode Access R/W Oplock Name\n");
+ printf("--------------------------------------------------------------\n");
}
count++;
@@ -116,6 +116,7 @@ static void print_share_mode(share_mode_entry *e, char *fname)
case DENY_WRITE:printf("DENY_WRITE "); break;
case DENY_FCB: printf("DENY_FCB "); break;
}
+ printf("0x%-8x ",(unsigned int)e->desired_access);
switch (e->share_mode&0xF) {
case 0: printf("RDONLY "); break;
case 1: printf("WRONLY "); break;
@@ -135,7 +136,7 @@ static void print_share_mode(share_mode_entry *e, char *fname)
else
printf("NONE ");
- printf(" %s %s",dos_to_unix(fname,False),
+ printf(" %s %s",dos_to_unix_static(fname),
asctime(LocalTime((time_t *)&e->time.tv_sec)));
}
}
diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index 9502ec9669d..664f13ab269 100644
--- a/source/utils/testparm.c
+++ b/source/utils/testparm.c
@@ -36,6 +36,7 @@
#include "smb.h"
extern BOOL AllowDebugChange;
+extern int parsed_debuglevel_class[DBGC_LAST];
/* these live in util.c */
extern FILE *dbf;
@@ -71,6 +72,12 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
ret = 1;
}
+ if (!directory_exist(lp_piddir(), &st)) {
+ printf("ERROR: pid directory %s does not exist\n",
+ lp_piddir());
+ ret = 1;
+ }
+
/*
* Password server sanity checks.
*/
@@ -151,6 +158,15 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
ret = 1;
}
+ if (strlen(lp_winbind_separator()) != 1) {
+ printf("ERROR: the 'winbind separator' parameter must be a single character.\n");
+ ret = 1;
+ }
+
+ if (*lp_winbind_separator() == '+') {
+ printf("'winbind separator = +' might cause problems with group membership.\n");
+ }
+
return ret;
}
@@ -281,7 +297,8 @@ Level II oplocks can only be set if oplocks are also set.\n",
fflush(stdout);
getc(stdin);
}
- lp_dump(stdout,True, lp_numservices(), _dos_to_unix);
+ memcpy(DEBUGLEVEL_CLASS,parsed_debuglevel_class,sizeof(parsed_debuglevel_class));
+ lp_dump(stdout,True, lp_numservices(), _dos_to_unix_static);
}
if (argc >= 3) {
diff --git a/source/utils/torture.c b/source/utils/torture.c
index 185cd93d164..ac3416188c7 100644
--- a/source/utils/torture.c
+++ b/source/utils/torture.c
@@ -135,14 +135,13 @@ static BOOL open_nbt_connection(struct cli_state *c)
{
struct nmb_name called, calling;
struct in_addr ip;
- extern struct in_addr ipzero;
ZERO_STRUCTP(c);
make_nmb_name(&calling, myname, 0x0);
make_nmb_name(&called , host, 0x20);
- ip = ipzero;
+ zero_ip(&ip);
if (!cli_initialise(c) || !cli_connect(c, host, &ip)) {
printf("Failed to connect with %s\n", host);
@@ -4541,7 +4540,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result)
child_status[i] = getpid();
- while (child_status[i]) msleep(2);
+ while (child_status[i] && end_timer() < 5) msleep(2);
child_status_out[i] = fn(i);
_exit(0);
diff --git a/source/web/statuspage.c b/source/web/statuspage.c
index 920d0f3367c..a940a08ebd4 100644
--- a/source/web/statuspage.c
+++ b/source/web/statuspage.c
@@ -139,7 +139,7 @@ static void print_share_mode(share_mode_entry *e, char *fname)
printf("</td>");
printf("<td>%s</td><td>%s</td></tr>\n",
- dos_to_unix(fname,False),tstring(e->time.tv_sec));
+ dos_to_unix_static(fname),tstring(e->time.tv_sec));
}
diff --git a/source/web/swat.c b/source/web/swat.c
index d09034671ee..9184ed21e7f 100644
--- a/source/web/swat.c
+++ b/source/web/swat.c
@@ -49,6 +49,19 @@ static int iNumNonAutoPrintServices = 0;
#define ENABLE_USER_FLAG "enable_user_flag"
#define RHOST "remote_host"
+typedef struct html_conversion {
+ char src;
+ char *dest;
+} html_conversion;
+
+static const html_conversion entities[] = {
+ { '"', "&quot;" },
+ { '&', "&amp;" },
+ { '<', "&lt;" },
+ { '>', "&gt;" },
+ { '\0', NULL },
+};
+
/* we need these because we link to locking*.o */
void become_root(void) {}
void unbecome_root(void) {}
@@ -77,6 +90,51 @@ static char *fix_backslash(char *str)
return newstring;
}
+static char *htmlentities(char *str)
+{
+ int i,j, destlen = 0;
+ int length = strlen(str);
+ /* Feel free to use a pstring if appropriate -- I haven't
+ checked if it's guaranteed to be long enough, and suspect it
+ isn't. -SRL */
+ char *dststr = NULL;
+ char *p;
+
+ for (i = 0; i < length; i++) {
+ for (j = 0; entities[j].src; j++) {
+ if (str[i] == entities[j].src) {
+ destlen += strlen(entities[j].dest);
+ break;
+ }
+ }
+ if (!entities[j].src) {
+ destlen++;
+ }
+ }
+ if (length == destlen) {
+ return(strdup(str));
+ }
+ p = dststr = malloc(destlen + 1);
+ if (!dststr) {
+ return(NULL);
+ }
+ dststr[destlen] = '\0';
+ for (i = 0; i < length; i++) {
+ for (j = 0; entities[j].src; j++) {
+ if (str[i] == entities[j].src) {
+ strncpy(p, entities[j].dest,
+ strlen(entities[j].dest));
+ p += strlen(entities[j].dest);
+ break;
+ }
+ }
+ if (!entities[j].src) {
+ *p++ = str[i];
+ }
+ }
+ return(dststr);
+}
+
static char *stripspace(char *str)
{
static char newstring[1024];
@@ -182,8 +240,12 @@ static void show_parameter(int snum, struct parm_struct *parm)
case P_STRING:
case P_USTRING:
- printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
- make_parm_name(parm->label), *(char **)ptr);
+ str = htmlentities(*(char **)ptr);
+ printf("<input type=\"text\" size=\"40\" name=\"parm_%s\" value=\"%s\">",
+ make_parm_name(parm->label), str);
+ if (str != NULL) {
+ free(str);
+ }
printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
break;
@@ -215,7 +277,18 @@ static void show_parameter(int snum, struct parm_struct *parm)
break;
case P_INTEGER:
- printf("<input type=text size=8 name=\"parm_%s\" value=%d>", make_parm_name(parm->label), *(int *)ptr);
+ if (strequal(parm->label,"log level")) {
+ printf("<input type=text size=40 name=\"parm_%s\" value=%d",
+ make_parm_name(parm->label),*(int *)ptr);
+ for (i = 1; i < DBGC_LAST; i ++) {
+ if (((int *)ptr)[i])
+ printf(",%s:%d",debug_classname_from_index(i),((int *)ptr)[i]);
+ }
+ printf(">");
+ } else {
+ printf("<input type=text size=8 name=\"parm_%s\" value=%d>",
+ make_parm_name(parm->label), *(int *)ptr);
+ }
printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%d\'\">",
make_parm_name(parm->label),(int)(parm->def.ivalue));
break;
@@ -296,6 +369,8 @@ static void show_parameters(int snum, int allparameters, int advanced, int print
case P_INTEGER:
case P_OCTAL:
+ if (strequal(parm->label,"log level"))
+ break;
if (*(int *)ptr == (int)(parm->def.ivalue)) continue;
break;
@@ -329,7 +404,8 @@ static BOOL load_config(BOOL save_def)
/****************************************************************************
write a config file
****************************************************************************/
-static void write_config(FILE *f, BOOL show_defaults, char *(*dos_to_ext)(char *, BOOL))
+
+static void write_config(FILE *f, BOOL show_defaults, char *(*dos_to_ext)(const char *))
{
fprintf(f, "# Samba config file created using SWAT\n");
fprintf(f, "# from %s (%s)\n", cgi_remote_host(), cgi_remote_addr());
@@ -358,9 +434,9 @@ static int save_reload(int snum)
fchmod(fileno(f), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
}
- write_config(f, False, _dos_to_unix);
+ write_config(f, False, _dos_to_unix_static);
if (snum)
- lp_dump_one(f, False, snum, _dos_to_unix);
+ lp_dump_one(f, False, snum, _dos_to_unix_static);
fclose(f);
lp_killunused(NULL);
@@ -385,7 +461,7 @@ static void commit_parameter(int snum, struct parm_struct *parm, char *v)
/* lp_do_parameter() will do unix_to_dos(v). */
if(parm->flags & FLAG_DOS_STRING)
- dos_to_unix(v, True);
+ dos_to_unix(v);
if (snum < 0 && parm->class == P_LOCAL) {
/* this handles the case where we are changing a local
@@ -486,7 +562,7 @@ static void viewconfig_page(void)
}
printf("<p><pre>");
- write_config(stdout, full_view, _dos_to_dos);
+ write_config(stdout, full_view, _dos_to_dos_static);
printf("</pre>");
printf("</form>\n");
}
@@ -569,7 +645,7 @@ static void shares_page(void)
/* add_a_service() which is called by lp_copy_service()
will do unix_to_dos() conversion, so we need dos_to_unix() before the lp_copy_service(). */
pstring unix_share;
- pstrcpy(unix_share, dos_to_unix(share, False));
+ pstrcpy(unix_share, dos_to_unix_static(share));
load_config(False);
lp_copy_service(GLOBALS_SNUM, unix_share);
iNumNonAutoPrintServices = lp_numservices();
@@ -908,7 +984,7 @@ static void printers_page(void)
/* add_a_service() which is called by lp_copy_service()
will do unix_to_dos() conversion, so we need dos_to_unix() before the lp_copy_service(). */
pstring unix_share;
- pstrcpy(unix_share, dos_to_unix(share, False));
+ pstrcpy(unix_share, dos_to_unix_static(share));
load_config(False);
lp_copy_service(GLOBALS_SNUM, unix_share);
iNumNonAutoPrintServices = lp_numservices();
diff --git a/swat/README b/swat/README
index 588ecef769a..657a5937d71 100644
--- a/swat/README
+++ b/swat/README
@@ -4,9 +4,9 @@ Administration Tool on your machine.
Installation
------------
-After you compile SWAT you need to run "make install" to install the
-swat binary and the various help files and images. A default install
-would put these in:
+After compiling Samba (via a "make"), running "make install" will
+install the swat binary and the various help files and images for
+you. A default install would put these in:
/usr/local/samba/bin/swat
/usr/local/samba/swat/images/*
@@ -67,11 +67,16 @@ SWAT will rewrite your smb.conf file. It will rearrange the entries
and delete all comments, include= and copy= options. If you have a
carefully crafted smb.conf then back it up or don't use SWAT!
+There is also a short HOWTO for configuring secure, remote access
+to SWAT (swat does not natively support HTTPS) at your favorite
+samba.org mirror (see http://samba.org for a list) at
+/samba/docs/swat_ssl.html
+
Development
-----------
-Please join the samba-technical mailing list if you want to discuss
-the development of SWAT. Note that this list is for technical developer
-discussions and is not a general help list.
+Please join the samba-technical@samba.org (http://lists.samba.org/listinfo/samba-technical)
+mailing list if you want to discuss the development of SWAT. Note that this list
+is for technical developer discussions and is not a general help list.
diff --git a/testsuite/build_farm/basicsmb.fns b/testsuite/build_farm/basicsmb.fns
index 592cb62de48..d9ac08639b5 100644
--- a/testsuite/build_farm/basicsmb.fns
+++ b/testsuite/build_farm/basicsmb.fns
@@ -1,7 +1,7 @@
test_smb_conf_setup() {
cat basicsmb.smb.conf.template | \
sed "s|PREFIX|$prefix|g" | \
- sed "s|BUILD_FARM|$pwd|g" | \
+ sed "s|BUILD_FARM|$test_root|g" | \
sed "s|WHOAMI|$whoami|g" | \
sed "s|LOGLEVEL|$loglevel|g" \
> $prefix/lib/smb.conf
diff --git a/testsuite/printing/psec.c b/testsuite/printing/psec.c
index 88a111404c9..f86b5aca8f6 100644
--- a/testsuite/printing/psec.c
+++ b/testsuite/printing/psec.c
@@ -1,6 +1,5 @@
/*
Unix SMB/Netbios implementation.
- Version 2.0
Printer security permission manipulation.
@@ -67,6 +66,8 @@
TDB_CONTEXT *tdb;
+#if 0 /* Unused */
+
/* ACE type conversions */
char *ace_type_to_str(uint ace_type)
@@ -135,7 +136,7 @@ char *ace_to_str(SEC_ACE *ace)
static pstring temp;
fstring sidstr;
- sid_to_string(sidstr, &ace->sid);
+ sid_to_string(sidstr, &ace->trustee);
slprintf(temp, sizeof(temp) - 1, "%s %d %s %s",
ace_type_to_str(ace->type), ace->flags,
@@ -155,6 +156,8 @@ void str_to_ace(SEC_ACE *ace, char *ace_str)
init_sec_ace(ace, &sid, type, sa, flags);
}
+#endif /* unused */
+
/* Get a printer security descriptor */
int psec_getsec(char *printer)
@@ -169,11 +172,11 @@ int psec_getsec(char *printer)
/* Open tdb for reading */
- slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntdrivers.tdb", LOCKDIR);
+ slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntprinters.tdb", LOCKDIR);
tdb = tdb_open(tdb_path, 0, 0, O_RDONLY, 0600);
if (!tdb) {
- printf("psec: failed to open nt drivers database: %s\n",
+ printf("psec: failed to open nt printers database: %s\n",
sys_errlist[errno]);
return 1;
}
@@ -233,7 +236,7 @@ int psec_getsec(char *printer)
for (i = 0; i < secdesc_ctr->sec->dacl->num_aces; i++) {
SEC_ACE *ace = &secdesc_ctr->sec->dacl->ace[i];
- sid_to_string(sidstr, &ace->sid);
+ sid_to_string(sidstr, &ace->trustee);
printf("%d %d 0x%08x %s\n", ace->type, ace->flags,
ace->info.mask, sidstr);
@@ -242,7 +245,6 @@ int psec_getsec(char *printer)
done:
if (tdb) tdb_close(tdb);
if (mem_ctx) talloc_destroy(mem_ctx);
- if (secdesc_ctr) free_sec_desc_buf(&secdesc_ctr);
prs_mem_free(&ps);
return result;
@@ -264,15 +266,23 @@ int psec_setsec(char *printer)
TALLOC_CTX *mem_ctx = NULL;
BOOL has_user_sid = False, has_group_sid = False;
+ /* Init memory */
+
ZERO_STRUCT(ps);
+ if (!(mem_ctx = talloc_init())) {
+ printf("memory allocation error\n");
+ result = 1;
+ goto done;
+ }
+
/* Open tdb for reading */
- slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntdrivers.tdb", LOCKDIR);
+ slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntprinters.tdb", LOCKDIR);
tdb = tdb_open(tdb_path, 0, 0, O_RDWR, 0600);
if (!tdb) {
- printf("psec: failed to open nt drivers database: %s\n",
+ printf("psec: failed to open nt printers database: %s\n",
sys_errlist[errno]);
result = 1;
goto done;
@@ -318,36 +328,24 @@ int psec_setsec(char *printer)
num_aces++;
}
- dacl = make_sec_acl(ACL_REVISION, num_aces, ace_list);
+ dacl = make_sec_acl(mem_ctx, ACL_REVISION, num_aces, ace_list);
free(ace_list);
/* Create security descriptor */
- sd = make_sec_desc(SEC_DESC_REVISION,
+ sd = make_sec_desc(mem_ctx, SEC_DESC_REVISION,
has_user_sid ? &user_sid : NULL,
has_group_sid ? &group_sid : NULL,
NULL, /* System ACL */
dacl, /* Discretionary ACL */
&size);
- free_sec_acl(&dacl);
-
- sdb = make_sec_desc_buf(size, sd);
-
- free_sec_desc(&sd);
+ sdb = make_sec_desc_buf(mem_ctx, size, sd);
/* Write security descriptor to tdb */
- mem_ctx = talloc_init();
-
- if (!mem_ctx) {
- printf("memory allocation error\n");
- result = 1;
- goto done;
- }
-
prs_init(&ps, (uint32)sec_desc_size(sdb->sec) +
- sizeof(SEC_DESC_BUF), 4, mem_ctx, MARSHALL);
+ sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL);
if (!sec_io_desc_buf("nt_printing_setsec", &sdb, &ps, 1)) {
printf("sec_io_desc_buf failed\n");
@@ -363,7 +361,6 @@ int psec_setsec(char *printer)
done:
if (tdb) tdb_close(tdb);
- if (sdb) free_sec_desc_buf(&sdb);
if (mem_ctx) talloc_destroy(mem_ctx);
prs_mem_free(&ps);