diff options
author | Ivo De Decker <ivo.dedecker@ugent.be> | 2014-04-18 21:55:04 +0200 |
---|---|---|
committer | Ivo De Decker <ivo.dedecker@ugent.be> | 2014-04-18 21:55:04 +0200 |
commit | 0c9a6b803d53276beee45d7b15e2010a402b10a4 (patch) | |
tree | a6ab9ae6125d9a579b7566c18c0b6a97bcc1e836 | |
parent | d0b88d244d4f4d14cd9cd60c8af82af33212cb6c (diff) | |
parent | 9da023a3bcca8e984a461dc7a89bd3a470196c12 (diff) | |
download | samba-0c9a6b803d53276beee45d7b15e2010a402b10a4.tar.gz |
Imported Upstream version 4.1.7+dfsgupstream/4.1.7+dfsg
173 files changed, 2081 insertions, 583 deletions
@@ -25,7 +25,7 @@ ######################################################## SAMBA_VERSION_MAJOR=4 SAMBA_VERSION_MINOR=1 -SAMBA_VERSION_RELEASE=6 +SAMBA_VERSION_RELEASE=7 ######################################################## # If a official release has a serious bug # diff --git a/WHATSNEW.txt b/WHATSNEW.txt index defe3cb619..131cab6350 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,4 +1,117 @@ ============================= + Release Notes for Samba 4.1.7 + April 17, 2014 + ============================= + + +This is the latest stable release of Samba 4.1. + + +Changes since 4.1.6: +-------------------- + +o Jeremy Allison <jra@samba.org> + * BUG 9878: Make "force user" work as expected. + * BUG 9942: Fix problem with server taking too long to respond to a + MSG_PRINTER_DRVUPGRADE message. + * BUG 9993: s3-printing: Fix obvious memory leak in + printer_list_get_printer(). + * BUG 10344: SessionLogoff on a signed connection with an outstanding notify + request crashes smbd. + * BUG 10431: Fix STATUS_NO_MEMORY response from Query File Posix Lock request. + * BUG 10508: smbd: Correctly add remote users into local groups. + * BUG 10534: Cleanup messages.tdb record after unclean smbd shutdown. + + +o Christian Ambach <ambi@samba.org> + * BUG 9911: Fix build on AIX with IBM XL C/C++ (gettext detection issues). + * BUG 10308: Fix String Conversion Errors with Samba 4.1.0 Build on AIX 7.1. + + +o Gregor Beck <gbeck@sernet.de> + * BUG 10230: Make (lib)smbclient work with NetApp. + * BUG 10458: Fix 'wbinfo -i' with one-way trust. + * s3:rpc_server: Minor refactoring of process_request_pdu(). + + +o Kai Blin <kai@samba.org> + * BUG 10471: Don't respond with NXDOMAIN to records that exist with another + type. + + +o Alexander Bokovoy <ab@samba.org> + * BUG 10504: lsa.idl: Define lsa.ForestTrustCollisionInfo and + ForestTrustCollisionRecord as public structs. + + +o Günther Deschner <gd@samba.org> + * BUG 10439: Increase max netbios name components. + + +o David Disseldorp <ddiss@samba.org> + * BUG 10188: doc: Add "spoolss: architecture" parameter usage. + * BUG 10484: Initial FSRVP rpcclient requests fail with + NT_STATUS_PIPE_NOT_AVAILABLE. + * BUG 10521: rpcclient FSRVP request UNCs should include a trailing + backslash. + + +o Daniel Liberman <danielvl@gmail.com> + * BUG 10387: 'net ads search' on high latency networks can return a partial + list with no error indication. + + +o Stefan Metzmacher <metze@samba.org> + * BUG 10200: Make 'smbclient' support DFS shares with SMB2/3. + * BUG 10344: SessionLogoff on a signed connection with an outstanding notify + request crashes smbd. + * BUG 10422: max xmit > 64kb leads to segmentation fault. + * BUG 10444: smbd_server_connection_terminate("CTDB_SRVID_RELEASE_IP") + panics from within ctdbd_migrate() with invalid lock_order. + * BUG 10464: samba4 services not binding on IPv6 addresses causing + connection delays. + + +o Garming Sam <garming@catalyst.net.nz> + * BUG 10378: dfs: Always call create_conn_struct with root privileges. + + +o Andreas Schneider <asn@cryptomilk.org> + * BUG 10467: s3-vfs: Fix stream_depot vfs module on btrfs. + * BUG 10472: pidl: waf should have an option for the dir to install perl + files and do not glob. + * BUG 10474: s3-spoolssd: Don't register spoolssd if epmd is not running. + * BUG 10481: s3-rpc_server: Fix handling of fragmented rpc requests. + + +o Gustavo Zacarias <gustavo@zacarias.com.ar> + * BUG 10506: Make 'smbreadline' build with readline 6.3. + + +####################################### +Reporting bugs & Development Discussion +####################################### + +Please discuss this release on the samba-technical mailing list or by +joining the #samba-technical IRC channel on irc.freenode.net. + +If you do report problems then please try to send high quality +feedback. If you don't provide vital information to help us track down +the problem then you will probably be ignored. All bug reports should +be filed under the Samba 4.1 product in the project's Bugzilla +database (https://bugzilla.samba.org/). + + +====================================================================== +== Our Code, Our Bugs, Our Responsibility. +== The Samba Team +====================================================================== + + +Release notes for older releases follow: +---------------------------------------- + + ============================= Release Notes for Samba 4.1.6 March 11, 2014 ============================= @@ -61,8 +174,8 @@ database (https://bugzilla.samba.org/). ====================================================================== -Release notes for older releases follow: ----------------------------------------- +---------------------------------------------------------------------- + ============================= Release Notes for Samba 4.1.5 diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py index a6787a86ec..8f13e28927 100644 --- a/buildtools/wafadmin/Tools/perl.py +++ b/buildtools/wafadmin/Tools/perl.py @@ -98,12 +98,27 @@ def check_perl_ext_devel(conf): conf.env.EXTUTILS_TYPEMAP = read_out('print "$Config{privlib}/ExtUtils/typemap"') conf.env.perlext_PATTERN = '%s.' + read_out('print $Config{dlext}')[0] - if getattr(Options.options, 'perlarchdir', None): - conf.env.ARCHDIR_PERL = Options.options.perlarchdir + if getattr(Options.options, 'perl_vendorarch_dir', None): + conf.env.PERL_VENDORARCH_DIR = Options.options.perl_vendorarch_dir else: - conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0] + conf.env.PERL_VENDORARCH_DIR = read_out('print $Config{vendorarch}')[0] + + if getattr(Options.options, 'perl_vendorlib_dir', None): + conf.env.PERL_VENDORLIB_DIR = Options.options.perl_vendorlib_dir + else: + conf.env.PERL_VENDORLIB_DIR = read_out('print $Config{vendorlib}')[0] def set_options(opt): opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None) - opt.add_option("--with-perl-archdir", type="string", dest="perlarchdir", help = 'Specify directory where to install arch specific files', default=None) + opt.add_option("--with-perl-vendorarch", + type="string", + dest="perl_vendorarch_dir", + help = ('Specify directory where to install arch specific files'), + default=None) + + opt.add_option("--with-perl-vendorlib", + type="string", + dest="perl_vendorlib_dir", + help = ('Specify directory where to install vendor specific files'), + default=None) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index fe2e51507e..7984227886 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -80,8 +80,7 @@ def set_options(opt): match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h']) opt.add_option('--with-gettext', help='additional directory to search for gettext', - action='store', dest='gettext_location', default='/usr/local', - match = ['Checking for library intl', 'Checking for header libintl.h']) + action='store', dest='gettext_location', default='None') opt.add_option('--without-gettext', help=("Disable use of gettext"), action="store_true", dest='disable_gettext', default=False) diff --git a/docs-xml/smbdotconf/printing/spoolssarchitecture.xml b/docs-xml/smbdotconf/printing/spoolssarchitecture.xml new file mode 100644 index 0000000000..5ce9f13d65 --- /dev/null +++ b/docs-xml/smbdotconf/printing/spoolssarchitecture.xml @@ -0,0 +1,15 @@ +<samba:parameter name="spoolss: architecture" + context="G" + type="string" + advanced="1" + developer="1" + xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> +<description> + <para>Windows spoolss print clients only allow association of server-side drivers + with printers when the driver architecture matches the advertised print server + architecture. Samba's spoolss print server architecture can be changed using + this parameter.</para> +</description> +<value type="default">Windows NT x86</value> +<value type="example">Windows x64</value> +</samba:parameter> diff --git a/docs/manpages/dbwrap_tool.1 b/docs/manpages/dbwrap_tool.1 index 7a9c72d33f..7029cd1877 100644 --- a/docs/manpages/dbwrap_tool.1 +++ b/docs/manpages/dbwrap_tool.1 @@ -2,12 +2,12 @@ .\" Title: dbwrap_tool .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "DBWRAP_TOOL" "1" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "DBWRAP_TOOL" "1" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/eventlogadm.8 b/docs/manpages/eventlogadm.8 index 29ea80449d..a9de2229cb 100644 --- a/docs/manpages/eventlogadm.8 +++ b/docs/manpages/eventlogadm.8 @@ -2,12 +2,12 @@ .\" Title: eventlogadm .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "EVENTLOGADM" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "EVENTLOGADM" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/findsmb.1 b/docs/manpages/findsmb.1 index 22e5f15082..9fbc91f3bb 100644 --- a/docs/manpages/findsmb.1 +++ b/docs/manpages/findsmb.1 @@ -2,12 +2,12 @@ .\" Title: findsmb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "FINDSMB" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "FINDSMB" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_ad.8 b/docs/manpages/idmap_ad.8 index 72d442b12f..a597cdb047 100644 --- a/docs/manpages/idmap_ad.8 +++ b/docs/manpages/idmap_ad.8 @@ -2,12 +2,12 @@ .\" Title: idmap_ad .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_AD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_AD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_autorid.8 b/docs/manpages/idmap_autorid.8 index 623c3a0c18..d7124e8c56 100644 --- a/docs/manpages/idmap_autorid.8 +++ b/docs/manpages/idmap_autorid.8 @@ -2,12 +2,12 @@ .\" Title: idmap_autorid .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_AUTORID" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_AUTORID" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_hash.8 b/docs/manpages/idmap_hash.8 index 1ef70985e9..fff76cda9d 100644 --- a/docs/manpages/idmap_hash.8 +++ b/docs/manpages/idmap_hash.8 @@ -2,12 +2,12 @@ .\" Title: idmap_hash .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_HASH" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_HASH" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_ldap.8 b/docs/manpages/idmap_ldap.8 index a20d6b2f80..f004bb6ffc 100644 --- a/docs/manpages/idmap_ldap.8 +++ b/docs/manpages/idmap_ldap.8 @@ -2,12 +2,12 @@ .\" Title: idmap_ldap .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_LDAP" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_LDAP" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_nss.8 b/docs/manpages/idmap_nss.8 index a87f9db2eb..c1e622430b 100644 --- a/docs/manpages/idmap_nss.8 +++ b/docs/manpages/idmap_nss.8 @@ -2,12 +2,12 @@ .\" Title: idmap_nss .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_NSS" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_NSS" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_rfc2307.8 b/docs/manpages/idmap_rfc2307.8 index db9cdb9c21..5f9e2e7dc3 100644 --- a/docs/manpages/idmap_rfc2307.8 +++ b/docs/manpages/idmap_rfc2307.8 @@ -2,12 +2,12 @@ .\" Title: idmap_rfc2307 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_RFC2307" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_RFC2307" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_rid.8 b/docs/manpages/idmap_rid.8 index 999b7e1913..140a47f08b 100644 --- a/docs/manpages/idmap_rid.8 +++ b/docs/manpages/idmap_rid.8 @@ -2,12 +2,12 @@ .\" Title: idmap_rid .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_RID" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_RID" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_tdb.8 b/docs/manpages/idmap_tdb.8 index 56babe32b2..35a32a0833 100644 --- a/docs/manpages/idmap_tdb.8 +++ b/docs/manpages/idmap_tdb.8 @@ -2,12 +2,12 @@ .\" Title: idmap_tdb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_TDB" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_TDB" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/idmap_tdb2.8 b/docs/manpages/idmap_tdb2.8 index 5b528c22b8..8a6e8956b8 100644 --- a/docs/manpages/idmap_tdb2.8 +++ b/docs/manpages/idmap_tdb2.8 @@ -2,12 +2,12 @@ .\" Title: idmap_tdb2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "IDMAP_TDB2" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "IDMAP_TDB2" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/libsmbclient.7 b/docs/manpages/libsmbclient.7 index d95ac73c7f..8bbea3b103 100644 --- a/docs/manpages/libsmbclient.7 +++ b/docs/manpages/libsmbclient.7 @@ -2,12 +2,12 @@ .\" Title: libsmbclient .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: 7 .\" Source: Samba 4.0 .\" Language: English .\" -.TH "LIBSMBCLIENT" "7" "03/11/2014" "Samba 4\&.0" "7" +.TH "LIBSMBCLIENT" "7" "04/17/2014" "Samba 4\&.0" "7" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/lmhosts.5 b/docs/manpages/lmhosts.5 index e0bfe1accb..42452176c2 100644 --- a/docs/manpages/lmhosts.5 +++ b/docs/manpages/lmhosts.5 @@ -2,12 +2,12 @@ .\" Title: lmhosts .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: File Formats and Conventions .\" Source: Samba 4.0 .\" Language: English .\" -.TH "LMHOSTS" "5" "03/11/2014" "Samba 4\&.0" "File Formats and Conventions" +.TH "LMHOSTS" "5" "04/17/2014" "Samba 4\&.0" "File Formats and Conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/log2pcap.1 b/docs/manpages/log2pcap.1 index c3c142d23b..418c4bdd02 100644 --- a/docs/manpages/log2pcap.1 +++ b/docs/manpages/log2pcap.1 @@ -2,12 +2,12 @@ .\" Title: log2pcap .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "LOG2PCAP" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "LOG2PCAP" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/net.8 b/docs/manpages/net.8 index ea988ef07e..7aa140541a 100644 --- a/docs/manpages/net.8 +++ b/docs/manpages/net.8 @@ -2,12 +2,12 @@ .\" Title: net .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "NET" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "NET" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/nmbd.8 b/docs/manpages/nmbd.8 index 09ab029f63..75819d79ea 100644 --- a/docs/manpages/nmbd.8 +++ b/docs/manpages/nmbd.8 @@ -2,12 +2,12 @@ .\" Title: nmbd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "NMBD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "NMBD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/nmblookup.1 b/docs/manpages/nmblookup.1 index 7174f698c1..f3c95b5acc 100644 --- a/docs/manpages/nmblookup.1 +++ b/docs/manpages/nmblookup.1 @@ -2,12 +2,12 @@ .\" Title: nmblookup .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "NMBLOOKUP" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "NMBLOOKUP" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/ntlm_auth.1 b/docs/manpages/ntlm_auth.1 index 88b0257373..da1cbae33f 100644 --- a/docs/manpages/ntlm_auth.1 +++ b/docs/manpages/ntlm_auth.1 @@ -2,12 +2,12 @@ .\" Title: ntlm_auth .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "NTLM_AUTH" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "NTLM_AUTH" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/pam_winbind.8 b/docs/manpages/pam_winbind.8 index bcaa7e5712..33abf51f04 100644 --- a/docs/manpages/pam_winbind.8 +++ b/docs/manpages/pam_winbind.8 @@ -2,12 +2,12 @@ .\" Title: pam_winbind .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: 8 .\" Source: Samba 4.0 .\" Language: English .\" -.TH "PAM_WINBIND" "8" "03/11/2014" "Samba 4\&.0" "8" +.TH "PAM_WINBIND" "8" "04/17/2014" "Samba 4\&.0" "8" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/pam_winbind.conf.5 b/docs/manpages/pam_winbind.conf.5 index b43d11387d..f675eb02e2 100644 --- a/docs/manpages/pam_winbind.conf.5 +++ b/docs/manpages/pam_winbind.conf.5 @@ -2,12 +2,12 @@ .\" Title: pam_winbind.conf .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: 5 .\" Source: Samba 4.0 .\" Language: English .\" -.TH "PAM_WINBIND\&.CONF" "5" "03/11/2014" "Samba 4\&.0" "5" +.TH "PAM_WINBIND\&.CONF" "5" "04/17/2014" "Samba 4\&.0" "5" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/pdbedit.8 b/docs/manpages/pdbedit.8 index b227ac30e4..07091ec1c6 100644 --- a/docs/manpages/pdbedit.8 +++ b/docs/manpages/pdbedit.8 @@ -2,12 +2,12 @@ .\" Title: pdbedit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "PDBEDIT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "PDBEDIT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/profiles.1 b/docs/manpages/profiles.1 index 54ced5792a..85f242a1c2 100644 --- a/docs/manpages/profiles.1 +++ b/docs/manpages/profiles.1 @@ -2,12 +2,12 @@ .\" Title: profiles .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "PROFILES" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "PROFILES" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/rpcclient.1 b/docs/manpages/rpcclient.1 index b9ff05272a..b1ff893195 100644 --- a/docs/manpages/rpcclient.1 +++ b/docs/manpages/rpcclient.1 @@ -2,12 +2,12 @@ .\" Title: rpcclient .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "RPCCLIENT" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "RPCCLIENT" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/samba-regedit.8 b/docs/manpages/samba-regedit.8 index e9fa5b86e2..997862e40c 100644 --- a/docs/manpages/samba-regedit.8 +++ b/docs/manpages/samba-regedit.8 @@ -2,12 +2,12 @@ .\" Title: samba-regedit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.1 .\" Language: English .\" -.TH "SAMBA\-REGEDIT" "8" "03/11/2014" "Samba 4\&.1" "System Administration tools" +.TH "SAMBA\-REGEDIT" "8" "04/17/2014" "Samba 4\&.1" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/samba-tool.8 b/docs/manpages/samba-tool.8 index 6f72fc8e28..a50e2d9b2f 100644 --- a/docs/manpages/samba-tool.8 +++ b/docs/manpages/samba-tool.8 @@ -2,12 +2,12 @@ .\" Title: samba-tool .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SAMBA\-TOOL" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SAMBA\-TOOL" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/samba.7 b/docs/manpages/samba.7 index 2d5302a0b6..cc91584578 100644 --- a/docs/manpages/samba.7 +++ b/docs/manpages/samba.7 @@ -2,12 +2,12 @@ .\" Title: samba .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: Miscellanea .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SAMBA" "7" "03/11/2014" "Samba 4\&.0" "Miscellanea" +.TH "SAMBA" "7" "04/17/2014" "Samba 4\&.0" "Miscellanea" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/samba.8 b/docs/manpages/samba.8 index 8e88638125..52ae689f0b 100644 --- a/docs/manpages/samba.8 +++ b/docs/manpages/samba.8 @@ -2,12 +2,12 @@ .\" Title: samba .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SAMBA" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SAMBA" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/sharesec.1 b/docs/manpages/sharesec.1 index d1477ed07a..1565376f03 100644 --- a/docs/manpages/sharesec.1 +++ b/docs/manpages/sharesec.1 @@ -2,12 +2,12 @@ .\" Title: sharesec .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SHARESEC" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SHARESEC" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5 index 4723389faf..09f560ad18 100644 --- a/docs/manpages/smb.conf.5 +++ b/docs/manpages/smb.conf.5 @@ -2,12 +2,12 @@ .\" Title: smb.conf .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: File Formats and Conventions .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMB\&.CONF" "5" "03/11/2014" "Samba 4\&.0" "File Formats and Conventions" +.TH "SMB\&.CONF" "5" "04/17/2014" "Samba 4\&.0" "File Formats and Conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -9932,6 +9932,19 @@ Example: \fI\fIspn update command\fR\fR\fI = \fR\fI/usr/local/sbin/spnupdate\fR\fI \fR .RE +spoolss: architecture (G) +.\" spoolss: architecture +.PP +.RS 4 +Windows spoolss print clients only allow association of server\-side drivers with printers when the driver architecture matches the advertised print server architecture\&. Samba\*(Aqs spoolss print server architecture can be changed using this parameter\&. +.sp +Default: +\fI\fIspoolss: architecture\fR\fR\fI = \fR\fIWindows NT x86\fR\fI \fR +.sp +Example: +\fI\fIspoolss: architecture\fR\fR\fI = \fR\fIWindows x64\fR\fI \fR +.RE + stat cache (G) .\" stat cache .PP diff --git a/docs/manpages/smbcacls.1 b/docs/manpages/smbcacls.1 index 8da6c3e383..875ef2c126 100644 --- a/docs/manpages/smbcacls.1 +++ b/docs/manpages/smbcacls.1 @@ -2,12 +2,12 @@ .\" Title: smbcacls .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBCACLS" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBCACLS" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1 index aadb354861..f4b8bc7b9a 100644 --- a/docs/manpages/smbclient.1 +++ b/docs/manpages/smbclient.1 @@ -2,12 +2,12 @@ .\" Title: smbclient .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBCLIENT" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBCLIENT" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbcontrol.1 b/docs/manpages/smbcontrol.1 index 5d64253627..50e6890e7c 100644 --- a/docs/manpages/smbcontrol.1 +++ b/docs/manpages/smbcontrol.1 @@ -2,12 +2,12 @@ .\" Title: smbcontrol .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBCONTROL" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBCONTROL" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbcquotas.1 b/docs/manpages/smbcquotas.1 index 0e2c34ae2e..4f3b111ce2 100644 --- a/docs/manpages/smbcquotas.1 +++ b/docs/manpages/smbcquotas.1 @@ -2,12 +2,12 @@ .\" Title: smbcquotas .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBCQUOTAS" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBCQUOTAS" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbd.8 b/docs/manpages/smbd.8 index 5e9e232c5f..4be83c052b 100644 --- a/docs/manpages/smbd.8 +++ b/docs/manpages/smbd.8 @@ -2,12 +2,12 @@ .\" Title: smbd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SMBD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbget.1 b/docs/manpages/smbget.1 index 633a0504c3..82ef10950c 100644 --- a/docs/manpages/smbget.1 +++ b/docs/manpages/smbget.1 @@ -2,12 +2,12 @@ .\" Title: smbget .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBGET" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBGET" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbgetrc.5 b/docs/manpages/smbgetrc.5 index fd4a002d0b..04147ce915 100644 --- a/docs/manpages/smbgetrc.5 +++ b/docs/manpages/smbgetrc.5 @@ -2,12 +2,12 @@ .\" Title: smbgetrc .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: File Formats and Conventions .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBGETRC" "5" "03/11/2014" "Samba 4\&.0" "File Formats and Conventions" +.TH "SMBGETRC" "5" "04/17/2014" "Samba 4\&.0" "File Formats and Conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbpasswd.5 b/docs/manpages/smbpasswd.5 index b6d04cf049..ba5e88ab4d 100644 --- a/docs/manpages/smbpasswd.5 +++ b/docs/manpages/smbpasswd.5 @@ -2,12 +2,12 @@ .\" Title: smbpasswd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: File Formats and Conventions .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBPASSWD" "5" "03/11/2014" "Samba 4\&.0" "File Formats and Conventions" +.TH "SMBPASSWD" "5" "04/17/2014" "Samba 4\&.0" "File Formats and Conventions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbpasswd.8 b/docs/manpages/smbpasswd.8 index d0e19203ef..b693dd6c9c 100644 --- a/docs/manpages/smbpasswd.8 +++ b/docs/manpages/smbpasswd.8 @@ -2,12 +2,12 @@ .\" Title: smbpasswd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBPASSWD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SMBPASSWD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbspool.8 b/docs/manpages/smbspool.8 index 8c89ae2548..26d9972af8 100644 --- a/docs/manpages/smbspool.8 +++ b/docs/manpages/smbspool.8 @@ -2,12 +2,12 @@ .\" Title: smbspool .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBSPOOL" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SMBSPOOL" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbstatus.1 b/docs/manpages/smbstatus.1 index 46c17ae476..8a4f0875c7 100644 --- a/docs/manpages/smbstatus.1 +++ b/docs/manpages/smbstatus.1 @@ -2,12 +2,12 @@ .\" Title: smbstatus .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBSTATUS" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBSTATUS" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbta-util.8 b/docs/manpages/smbta-util.8 index c6aea67142..7403ea11bd 100644 --- a/docs/manpages/smbta-util.8 +++ b/docs/manpages/smbta-util.8 @@ -2,12 +2,12 @@ .\" Title: smbta-util .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBTA\-UTIL" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SMBTA\-UTIL" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbtar.1 b/docs/manpages/smbtar.1 index ae45c1cdc5..8049d94c93 100644 --- a/docs/manpages/smbtar.1 +++ b/docs/manpages/smbtar.1 @@ -2,12 +2,12 @@ .\" Title: smbtar .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBTAR" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBTAR" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/smbtree.1 b/docs/manpages/smbtree.1 index b5677d6af9..2666d31be1 100644 --- a/docs/manpages/smbtree.1 +++ b/docs/manpages/smbtree.1 @@ -2,12 +2,12 @@ .\" Title: smbtree .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMBTREE" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "SMBTREE" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/testparm.1 b/docs/manpages/testparm.1 index 450ad10208..76a471d7a6 100644 --- a/docs/manpages/testparm.1 +++ b/docs/manpages/testparm.1 @@ -2,12 +2,12 @@ .\" Title: testparm .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "TESTPARM" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "TESTPARM" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_acl_tdb.8 b/docs/manpages/vfs_acl_tdb.8 index 2324bd91c8..9267ffec31 100644 --- a/docs/manpages/vfs_acl_tdb.8 +++ b/docs/manpages/vfs_acl_tdb.8 @@ -2,12 +2,12 @@ .\" Title: vfs_acl_tdb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_ACL_TDB" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_ACL_TDB" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_acl_xattr.8 b/docs/manpages/vfs_acl_xattr.8 index 5077d1eec8..2a4e426669 100644 --- a/docs/manpages/vfs_acl_xattr.8 +++ b/docs/manpages/vfs_acl_xattr.8 @@ -2,12 +2,12 @@ .\" Title: vfs_acl_xattr .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_ACL_XATTR" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_ACL_XATTR" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_aio_fork.8 b/docs/manpages/vfs_aio_fork.8 index f2d0821bd8..f55ba36073 100644 --- a/docs/manpages/vfs_aio_fork.8 +++ b/docs/manpages/vfs_aio_fork.8 @@ -2,12 +2,12 @@ .\" Title: vfs_aio_fork .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_AIO_FORK" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_AIO_FORK" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_aio_linux.8 b/docs/manpages/vfs_aio_linux.8 index a6fcafa18f..8e09e57275 100644 --- a/docs/manpages/vfs_aio_linux.8 +++ b/docs/manpages/vfs_aio_linux.8 @@ -2,12 +2,12 @@ .\" Title: vfs_aio_linux .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_AIO_LINUX" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_AIO_LINUX" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_aio_pthread.8 b/docs/manpages/vfs_aio_pthread.8 index 98598b557d..890329a72b 100644 --- a/docs/manpages/vfs_aio_pthread.8 +++ b/docs/manpages/vfs_aio_pthread.8 @@ -2,12 +2,12 @@ .\" Title: vfs_aio_pthread .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_AIO_PTHREAD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_AIO_PTHREAD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_audit.8 b/docs/manpages/vfs_audit.8 index 11ba934d09..19a57464ff 100644 --- a/docs/manpages/vfs_audit.8 +++ b/docs/manpages/vfs_audit.8 @@ -2,12 +2,12 @@ .\" Title: vfs_audit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_AUDIT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_AUDIT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_btrfs.8 b/docs/manpages/vfs_btrfs.8 index e8dcb92743..a8431c7b6d 100644 --- a/docs/manpages/vfs_btrfs.8 +++ b/docs/manpages/vfs_btrfs.8 @@ -2,12 +2,12 @@ .\" Title: vfs_btrfs .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_BTRFS" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_BTRFS" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_cacheprime.8 b/docs/manpages/vfs_cacheprime.8 index cfa221414c..44b12c2051 100644 --- a/docs/manpages/vfs_cacheprime.8 +++ b/docs/manpages/vfs_cacheprime.8 @@ -2,12 +2,12 @@ .\" Title: vfs_cacheprime .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_CACHEPRIME" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_CACHEPRIME" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_cap.8 b/docs/manpages/vfs_cap.8 index fed51f6613..9e572b53a0 100644 --- a/docs/manpages/vfs_cap.8 +++ b/docs/manpages/vfs_cap.8 @@ -2,12 +2,12 @@ .\" Title: vfs_cap .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_CAP" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_CAP" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_catia.8 b/docs/manpages/vfs_catia.8 index f827a57b19..35c2c09421 100644 --- a/docs/manpages/vfs_catia.8 +++ b/docs/manpages/vfs_catia.8 @@ -2,12 +2,12 @@ .\" Title: vfs_catia .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_CATIA" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_CATIA" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_commit.8 b/docs/manpages/vfs_commit.8 index 6c603a6315..2420b2e8ae 100644 --- a/docs/manpages/vfs_commit.8 +++ b/docs/manpages/vfs_commit.8 @@ -2,12 +2,12 @@ .\" Title: vfs_commit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_COMMIT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_COMMIT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_crossrename.8 b/docs/manpages/vfs_crossrename.8 index 88e738f230..71b870c5a9 100644 --- a/docs/manpages/vfs_crossrename.8 +++ b/docs/manpages/vfs_crossrename.8 @@ -2,12 +2,12 @@ .\" Title: vfs_crossrename .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_CROSSRENAME" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_CROSSRENAME" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_default_quota.8 b/docs/manpages/vfs_default_quota.8 index 1f52784cd5..8a44385113 100644 --- a/docs/manpages/vfs_default_quota.8 +++ b/docs/manpages/vfs_default_quota.8 @@ -2,12 +2,12 @@ .\" Title: vfs_default_quota .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_DEFAULT_QUOTA" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_DEFAULT_QUOTA" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_dirsort.8 b/docs/manpages/vfs_dirsort.8 index 78dc369746..8883adb111 100644 --- a/docs/manpages/vfs_dirsort.8 +++ b/docs/manpages/vfs_dirsort.8 @@ -2,12 +2,12 @@ .\" Title: vfs_dirsort .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_DIRSORT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_DIRSORT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_extd_audit.8 b/docs/manpages/vfs_extd_audit.8 index 85a48a302f..7157f904a5 100644 --- a/docs/manpages/vfs_extd_audit.8 +++ b/docs/manpages/vfs_extd_audit.8 @@ -2,12 +2,12 @@ .\" Title: vfs_extd_audit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_EXTD_AUDIT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_EXTD_AUDIT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_fake_perms.8 b/docs/manpages/vfs_fake_perms.8 index 775e14203b..bea8f2c098 100644 --- a/docs/manpages/vfs_fake_perms.8 +++ b/docs/manpages/vfs_fake_perms.8 @@ -2,12 +2,12 @@ .\" Title: vfs_fake_perms .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_FAKE_PERMS" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_FAKE_PERMS" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_fileid.8 b/docs/manpages/vfs_fileid.8 index 486809fe70..943710014b 100644 --- a/docs/manpages/vfs_fileid.8 +++ b/docs/manpages/vfs_fileid.8 @@ -2,12 +2,12 @@ .\" Title: vfs_fileid .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_FILEID" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_FILEID" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_full_audit.8 b/docs/manpages/vfs_full_audit.8 index 71b35a2604..0106a5414d 100644 --- a/docs/manpages/vfs_full_audit.8 +++ b/docs/manpages/vfs_full_audit.8 @@ -2,12 +2,12 @@ .\" Title: vfs_full_audit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_FULL_AUDIT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_FULL_AUDIT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_gpfs.8 b/docs/manpages/vfs_gpfs.8 index 2c48e16d51..d863578901 100644 --- a/docs/manpages/vfs_gpfs.8 +++ b/docs/manpages/vfs_gpfs.8 @@ -2,12 +2,12 @@ .\" Title: vfs_gpfs .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_GPFS" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_GPFS" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_linux_xfs_sgid.8 b/docs/manpages/vfs_linux_xfs_sgid.8 index 29bc8e0109..678b569f34 100644 --- a/docs/manpages/vfs_linux_xfs_sgid.8 +++ b/docs/manpages/vfs_linux_xfs_sgid.8 @@ -2,12 +2,12 @@ .\" Title: vfs_syncops .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.1 .\" Language: English .\" -.TH "VFS_SYNCOPS" "8" "03/11/2014" "Samba 4\&.1" "System Administration tools" +.TH "VFS_SYNCOPS" "8" "04/17/2014" "Samba 4\&.1" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_media_harmony.8 b/docs/manpages/vfs_media_harmony.8 index 1f1638a589..f980a46cef 100644 --- a/docs/manpages/vfs_media_harmony.8 +++ b/docs/manpages/vfs_media_harmony.8 @@ -2,12 +2,12 @@ .\" Title: vfs_media_harmony .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_MEDIA_HARMONY" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_MEDIA_HARMONY" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_netatalk.8 b/docs/manpages/vfs_netatalk.8 index 8cc61475aa..8651a2d425 100644 --- a/docs/manpages/vfs_netatalk.8 +++ b/docs/manpages/vfs_netatalk.8 @@ -2,12 +2,12 @@ .\" Title: vfs_netatalk .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_NETATALK" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_NETATALK" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_notify_fam.8 b/docs/manpages/vfs_notify_fam.8 index adadf37bfa..81ccf28848 100644 --- a/docs/manpages/vfs_notify_fam.8 +++ b/docs/manpages/vfs_notify_fam.8 @@ -2,12 +2,12 @@ .\" Title: vfs_notify_fam .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_NOTIFY_FAM" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_NOTIFY_FAM" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_prealloc.8 b/docs/manpages/vfs_prealloc.8 index 0a65bd7dce..d0af30dbe5 100644 --- a/docs/manpages/vfs_prealloc.8 +++ b/docs/manpages/vfs_prealloc.8 @@ -2,12 +2,12 @@ .\" Title: vfs_prealloc .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_PREALLOC" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_PREALLOC" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_preopen.8 b/docs/manpages/vfs_preopen.8 index 77a3510a9a..15d748dd8e 100644 --- a/docs/manpages/vfs_preopen.8 +++ b/docs/manpages/vfs_preopen.8 @@ -2,12 +2,12 @@ .\" Title: vfs_preopen .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_PREOPEN" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_PREOPEN" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_readahead.8 b/docs/manpages/vfs_readahead.8 index 12a71e85f6..d3c331c47a 100644 --- a/docs/manpages/vfs_readahead.8 +++ b/docs/manpages/vfs_readahead.8 @@ -2,12 +2,12 @@ .\" Title: vfs_readahead .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_READAHEAD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_READAHEAD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_readonly.8 b/docs/manpages/vfs_readonly.8 index b6b30b9272..325d2f7e07 100644 --- a/docs/manpages/vfs_readonly.8 +++ b/docs/manpages/vfs_readonly.8 @@ -2,12 +2,12 @@ .\" Title: vfs_readonly .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_READONLY" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_READONLY" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_recycle.8 b/docs/manpages/vfs_recycle.8 index f1d3c36662..d728e32531 100644 --- a/docs/manpages/vfs_recycle.8 +++ b/docs/manpages/vfs_recycle.8 @@ -2,12 +2,12 @@ .\" Title: vfs_recycle .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_RECYCLE" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_RECYCLE" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_scannedonly.8 b/docs/manpages/vfs_scannedonly.8 index 040995bf97..8a7ba9105f 100644 --- a/docs/manpages/vfs_scannedonly.8 +++ b/docs/manpages/vfs_scannedonly.8 @@ -2,12 +2,12 @@ .\" Title: vfs_scannedonly .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_SCANNEDONLY" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_SCANNEDONLY" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_shadow_copy.8 b/docs/manpages/vfs_shadow_copy.8 index a7f12ebc63..a00b39955f 100644 --- a/docs/manpages/vfs_shadow_copy.8 +++ b/docs/manpages/vfs_shadow_copy.8 @@ -2,12 +2,12 @@ .\" Title: vfs_shadow_copy .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_SHADOW_COPY" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_SHADOW_COPY" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_shadow_copy2.8 b/docs/manpages/vfs_shadow_copy2.8 index c8dcc8d32b..2507867f12 100644 --- a/docs/manpages/vfs_shadow_copy2.8 +++ b/docs/manpages/vfs_shadow_copy2.8 @@ -2,12 +2,12 @@ .\" Title: vfs_shadow_copy2 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_SHADOW_COPY2" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_SHADOW_COPY2" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_smb_traffic_analyzer.8 b/docs/manpages/vfs_smb_traffic_analyzer.8 index 2d8bb9bcf2..f87259140e 100644 --- a/docs/manpages/vfs_smb_traffic_analyzer.8 +++ b/docs/manpages/vfs_smb_traffic_analyzer.8 @@ -2,12 +2,12 @@ .\" Title: smb_traffic_analyzer .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "SMB_TRAFFIC_ANALYZER" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "SMB_TRAFFIC_ANALYZER" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_streams_depot.8 b/docs/manpages/vfs_streams_depot.8 index a30d629762..6d38822308 100644 --- a/docs/manpages/vfs_streams_depot.8 +++ b/docs/manpages/vfs_streams_depot.8 @@ -2,12 +2,12 @@ .\" Title: vfs_streams_depot .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_STREAMS_DEPOT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_STREAMS_DEPOT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_streams_xattr.8 b/docs/manpages/vfs_streams_xattr.8 index dd5663fcf6..229605d1fe 100644 --- a/docs/manpages/vfs_streams_xattr.8 +++ b/docs/manpages/vfs_streams_xattr.8 @@ -2,12 +2,12 @@ .\" Title: vfs_streams_xattr .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_STREAMS_XATTR" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_STREAMS_XATTR" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_syncops.8 b/docs/manpages/vfs_syncops.8 index 3193787d2e..a6318b7e49 100644 --- a/docs/manpages/vfs_syncops.8 +++ b/docs/manpages/vfs_syncops.8 @@ -2,12 +2,12 @@ .\" Title: vfs_syncops .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.1 .\" Language: English .\" -.TH "VFS_SYNCOPS" "8" "03/11/2014" "Samba 4\&.1" "System Administration tools" +.TH "VFS_SYNCOPS" "8" "04/17/2014" "Samba 4\&.1" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_time_audit.8 b/docs/manpages/vfs_time_audit.8 index 6152c088a0..603b1e9616 100644 --- a/docs/manpages/vfs_time_audit.8 +++ b/docs/manpages/vfs_time_audit.8 @@ -2,12 +2,12 @@ .\" Title: vfs_time_audit .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_TIME_AUDIT" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_TIME_AUDIT" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_tsmsm.8 b/docs/manpages/vfs_tsmsm.8 index 0cb8935606..9be78e71f5 100644 --- a/docs/manpages/vfs_tsmsm.8 +++ b/docs/manpages/vfs_tsmsm.8 @@ -2,12 +2,12 @@ .\" Title: vfs_tsmsm .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_TSMSM" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_TSMSM" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_xattr_tdb.8 b/docs/manpages/vfs_xattr_tdb.8 index 7ab51f5e7b..32542e8f9e 100644 --- a/docs/manpages/vfs_xattr_tdb.8 +++ b/docs/manpages/vfs_xattr_tdb.8 @@ -2,12 +2,12 @@ .\" Title: vfs_xattr_tdb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_XATTR_TDB" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_XATTR_TDB" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfs_zfsacl.8 b/docs/manpages/vfs_zfsacl.8 index 41ef0345af..223a863177 100644 --- a/docs/manpages/vfs_zfsacl.8 +++ b/docs/manpages/vfs_zfsacl.8 @@ -2,12 +2,12 @@ .\" Title: vfs_zfsacl .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFS_ZFSACL" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "VFS_ZFSACL" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/vfstest.1 b/docs/manpages/vfstest.1 index f6b62728e3..191224be7b 100644 --- a/docs/manpages/vfstest.1 +++ b/docs/manpages/vfstest.1 @@ -2,12 +2,12 @@ .\" Title: vfstest .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "VFSTEST" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "VFSTEST" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/wbinfo.1 b/docs/manpages/wbinfo.1 index fe7f64393a..e6dd103faf 100644 --- a/docs/manpages/wbinfo.1 +++ b/docs/manpages/wbinfo.1 @@ -2,12 +2,12 @@ .\" Title: wbinfo .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: User Commands .\" Source: Samba 4.0 .\" Language: English .\" -.TH "WBINFO" "1" "03/11/2014" "Samba 4\&.0" "User Commands" +.TH "WBINFO" "1" "04/17/2014" "Samba 4\&.0" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/winbind_krb5_locator.7 b/docs/manpages/winbind_krb5_locator.7 index 2e673e9167..f1e89a6350 100644 --- a/docs/manpages/winbind_krb5_locator.7 +++ b/docs/manpages/winbind_krb5_locator.7 @@ -2,12 +2,12 @@ .\" Title: winbind_krb5_locator .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: 7 .\" Source: Samba 4.0 .\" Language: English .\" -.TH "WINBIND_KRB5_LOCATOR" "7" "03/11/2014" "Samba 4\&.0" "7" +.TH "WINBIND_KRB5_LOCATOR" "7" "04/17/2014" "Samba 4\&.0" "7" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/manpages/winbindd.8 b/docs/manpages/winbindd.8 index b1cc8ea239..b85651742c 100644 --- a/docs/manpages/winbindd.8 +++ b/docs/manpages/winbindd.8 @@ -2,12 +2,12 @@ .\" Title: winbindd .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 03/11/2014 +.\" Date: 04/17/2014 .\" Manual: System Administration tools .\" Source: Samba 4.0 .\" Language: English .\" -.TH "WINBINDD" "8" "03/11/2014" "Samba 4\&.0" "System Administration tools" +.TH "WINBINDD" "8" "04/17/2014" "Samba 4\&.0" "System Administration tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/lib/replace/wscript b/lib/replace/wscript index b6fb10b9b0..8451689800 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -363,10 +363,19 @@ removeea setea headers='netinet/in.h arpa/nameser.h resolv.h') + # try to find libintl (if --without-gettext is not given) conf.env.intl_libs='' if not Options.options.disable_gettext: + # any extra path given to look at? + if not Options.options.gettext_location == 'None': + conf.env['CFLAGS'].extend(["-I%s" % Options.options.gettext_location]); + conf.env['LDFLAGS'].extend(["-L%s" % Options.options.gettext_location]); + else: + conf.env['CFLAGS'].extend(["-I/usr/local"]); + conf.env['LDFLAGS'].extend(["-L/usr/local"]); conf.CHECK_HEADERS('libintl.h') conf.CHECK_LIB('intl') + conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h") # *textdomain functions are not strictly necessary conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset', '', checklibc=True, headers='libintl.h') @@ -385,18 +394,27 @@ removeea setea else: # Some hosts need lib iconv for linking with lib intl # So we try with flags just in case it helps. - oldflags = conf.env['EXTRA_LDFLAGS']; - conf.env['EXTRA_LDFLAGS'].extend("-liconv") + oldflags = list(conf.env['EXTRA_LDFLAGS']); + conf.env['EXTRA_LDFLAGS'].extend(["-liconv"]) conf.CHECK_FUNCS_IN('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', 'intl', checklibc=False, headers='libintl.h') conf.env['EXTRA_LDFLAGS'] = oldflags if conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DGETTEXT']: # save for dependency definitions conf.env.intl_libs='iconv intl' - else: - conf.fatal('library gettext not found, try specifying the path to ' + - 'it with --with-gettext=</path/to/gettext> or ' + - '--without-gettext to build without''') + + # did we find both prototypes and a library to link against? + # if not, unset the detected values (see Bug #9911) + if not (conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DECL_GETTEXT']): + conf.undefine('HAVE_GETTEXT') + conf.undefine('HAVE_DECL_GETTEXT') + if not (conf.env['HAVE_DGETTEXT'] and conf.env['HAVE_DECL_DGETTEXT']): + conf.undefine('HAVE_DGETTEXT') + conf.undefine('HAVE_DECL_DGETTEXT') + + # did the user insist on gettext (--with-gettext)? + if Options.options.gettext_location != 'None' and (not conf.env['HAVE_GETTEXT'] or not conf.env['HAVE_DGETTEXT']): + conf.fatal('library gettext not found at specified location') conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h') diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c index 4750675802..eeb922fbbc 100644 --- a/lib/tevent/tevent_queue.c +++ b/lib/tevent/tevent_queue.c @@ -140,6 +140,10 @@ static void tevent_queue_immediate_trigger(struct tevent_context *ev, return; } + if (!q->list) { + return; + } + q->list->triggered = true; q->list->trigger(q->list->req, q->list->private_data); } diff --git a/libcli/smb/smb2cli_create.c b/libcli/smb/smb2cli_create.c index 3f8d67250c..9cb94b1196 100644 --- a/libcli/smb/smb2cli_create.c +++ b/libcli/smb/smb2cli_create.c @@ -63,6 +63,8 @@ struct tevent_req *smb2cli_create_send( uint8_t *dyn; size_t dyn_len; size_t max_dyn_len; + uint32_t additional_flags = 0; + uint32_t clear_flags = 0; req = tevent_req_create(mem_ctx, &state, struct smb2cli_create_state); @@ -130,6 +132,12 @@ struct tevent_req *smb2cli_create_send( data_blob_free(&blob); } + if (smbXcli_conn_dfs_supported(conn) && + smbXcli_tcon_is_dfs_share(tcon)) + { + additional_flags |= SMB2_HDR_FLAG_DFS; + } + /* * We use max_dyn_len = 0 * as we don't explicitly ask for any output length. @@ -140,7 +148,7 @@ struct tevent_req *smb2cli_create_send( max_dyn_len = 0; subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE, - 0, 0, /* flags */ + additional_flags, clear_flags, timeout_msec, tcon, session, diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 14d4cc3859..25fbabd00d 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -167,6 +167,9 @@ struct smbXcli_session { }; struct smbXcli_tcon { + bool is_smb1; + uint32_t fs_attributes; + struct { uint16_t tcon_id; uint16_t optional_support; @@ -1269,6 +1272,19 @@ struct tevent_req *smb1cli_req_create(TALLOC_CTX *mem_ctx, if (tcon) { tid = tcon->smb1.tcon_id; + + if (tcon->fs_attributes & FILE_CASE_SENSITIVE_SEARCH) { + clear_flags |= FLAG_CASELESS_PATHNAMES; + } else { + /* Default setting, case insensitive. */ + additional_flags |= FLAG_CASELESS_PATHNAMES; + } + + if (smbXcli_conn_dfs_supported(conn) && + smbXcli_tcon_is_dfs_share(tcon)) + { + additional_flags2 |= FLAGS2_DFS_PATHNAMES; + } } state->smb1.recv_cmd = 0xFF; @@ -2460,6 +2476,15 @@ bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn) || (talloc_array_length(conn->pending) != 0)); } +bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn) +{ + if (conn->protocol >= PROTOCOL_SMB2_02) { + return (smb2cli_conn_server_capabilities(conn) & SMB2_CAP_DFS); + } + + return (smb1cli_conn_capabilities(conn) & CAP_DFS); +} + bool smb2cli_conn_req_possible(struct smbXcli_conn *conn, uint32_t *max_dyn_len) { uint16_t credits = 1; @@ -5014,6 +5039,38 @@ struct smbXcli_tcon *smbXcli_tcon_create(TALLOC_CTX *mem_ctx) return tcon; } +void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon *tcon, + uint32_t fs_attributes) +{ + tcon->fs_attributes = fs_attributes; +} + +uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon *tcon) +{ + return tcon->fs_attributes; +} + +bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon) +{ + if (tcon == NULL) { + return false; + } + + if (tcon->is_smb1) { + if (tcon->smb1.optional_support & SMB_SHARE_IN_DFS) { + return true; + } + + return false; + } + + if (tcon->smb2.capabilities & SMB2_SHARE_CAP_DFS) { + return true; + } + + return false; +} + uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon) { return tcon->smb1.tcon_id; @@ -5021,6 +5078,7 @@ uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon) void smb1cli_tcon_set_id(struct smbXcli_tcon *tcon, uint16_t tcon_id) { + tcon->is_smb1 = true; tcon->smb1.tcon_id = tcon_id; } @@ -5032,6 +5090,8 @@ bool smb1cli_tcon_set_values(struct smbXcli_tcon *tcon, const char *service, const char *fs_type) { + tcon->is_smb1 = true; + tcon->fs_attributes = 0; tcon->smb1.tcon_id = tcon_id; tcon->smb1.optional_support = optional_support; tcon->smb1.maximal_access = maximal_access; @@ -5070,6 +5130,8 @@ void smb2cli_tcon_set_values(struct smbXcli_tcon *tcon, uint32_t capabilities, uint32_t maximal_access) { + tcon->is_smb1 = false; + tcon->fs_attributes = 0; tcon->smb2.tcon_id = tcon_id; tcon->smb2.type = type; tcon->smb2.flags = flags; diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index 3d93427219..5fe40180b6 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -43,6 +43,8 @@ void smbXcli_conn_disconnect(struct smbXcli_conn *conn, NTSTATUS status); bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn); +bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn); + enum protocol_types smbXcli_conn_protocol(struct smbXcli_conn *conn); bool smbXcli_conn_use_unicode(struct smbXcli_conn *conn); @@ -297,6 +299,10 @@ NTSTATUS smb2cli_session_set_channel_key(struct smbXcli_session *session, NTSTATUS smb2cli_session_encryption_on(struct smbXcli_session *session); struct smbXcli_tcon *smbXcli_tcon_create(TALLOC_CTX *mem_ctx); +void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon *tcon, + uint32_t fs_attributes); +uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon *tcon); +bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon); uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon); void smb1cli_tcon_set_id(struct smbXcli_tcon *tcon, uint16_t tcon_id); bool smb1cli_tcon_set_values(struct smbXcli_tcon *tcon, diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h index 6dd7b28a14..175ffafc4d 100644 --- a/libcli/smb/smb_constants.h +++ b/libcli/smb/smb_constants.h @@ -208,6 +208,14 @@ enum smb_signing_setting { #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08 +/* + * The negotiated buffer size for non LARGE_READX/WRITEX + * should be limited to uint16_t and has to be at least + * 500, which is the default for MinClientBufferSize on Windows. + */ +#define SMB_BUFFER_SIZE_MIN 500 +#define SMB_BUFFER_SIZE_MAX 65535 + /* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */ #define CAP_RAW_MODE 0x00000001 @@ -363,6 +371,25 @@ enum csc_policy { #define OPLOCK_BREAK_TO_NONE 0 #define OPLOCK_BREAK_TO_LEVEL_II 1 +/* Filesystem Attributes. */ +#define FILE_CASE_SENSITIVE_SEARCH 0x00000001 +#define FILE_CASE_PRESERVED_NAMES 0x00000002 +#define FILE_UNICODE_ON_DISK 0x00000004 +/* According to cifs9f, this is 4, not 8 */ +/* Acconding to testing, this actually sets the security attribute! */ +#define FILE_PERSISTENT_ACLS 0x00000008 +#define FILE_FILE_COMPRESSION 0x00000010 +#define FILE_VOLUME_QUOTAS 0x00000020 +#define FILE_SUPPORTS_SPARSE_FILES 0x00000040 +#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080 +#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100 +#define FS_LFN_APIS 0x00004000 +#define FILE_VOLUME_IS_COMPRESSED 0x00008000 +#define FILE_SUPPORTS_OBJECT_IDS 0x00010000 +#define FILE_SUPPORTS_ENCRYPTION 0x00020000 +#define FILE_NAMED_STREAMS 0x00040000 +#define FILE_READ_ONLY_VOLUME 0x00080000 + /* ioctl codes */ #define IOCTL_QUERY_JOB_INFO 0x530060 diff --git a/libcli/smbreadline/smbreadline.c b/libcli/smbreadline/smbreadline.c index cff25a7f5a..80e10b0071 100644 --- a/libcli/smbreadline/smbreadline.c +++ b/libcli/smbreadline/smbreadline.c @@ -141,7 +141,7 @@ char *smb_readline(const char *prompt, void (*callback)(void), #if HAVE_DECL_RL_EVENT_HOOK if (callback) - rl_event_hook = (Function *)callback; + rl_event_hook = (rl_hook_func_t *)callback; #endif ret = readline(prompt); if (ret && *ret) diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl index d8f2649f83..80efbd5222 100644 --- a/librpc/idl/lsa.idl +++ b/librpc/idl/lsa.idl @@ -1328,14 +1328,14 @@ import "misc.idl", "security.idl"; [default] uint32 flags; } lsa_ForestTrustCollisionFlags; - typedef struct { + typedef [public] struct { uint32 index; lsa_ForestTrustCollisionRecordType type; [switch_is(type)] lsa_ForestTrustCollisionFlags flags; lsa_String name; } lsa_ForestTrustCollisionRecord; - typedef struct { + typedef [public] struct { uint32 count; [size_is(count)] lsa_ForestTrustCollisionRecord **entries; } lsa_ForestTrustCollisionInfo; diff --git a/librpc/ndr/ndr_nbt.c b/librpc/ndr/ndr_nbt.c index f2a1ca3ba5..842e9720c3 100644 --- a/librpc/ndr/ndr_nbt.c +++ b/librpc/ndr/ndr_nbt.c @@ -27,7 +27,7 @@ #include "../libcli/netlogon/netlogon.h" /* don't allow an unlimited number of name components */ -#define MAX_COMPONENTS 10 +#define MAX_COMPONENTS 128 /** print a nbt string diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index c796b466ad..fed94cde5d 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -693,6 +693,20 @@ sub ParseFunction_Sync($$$$) } $self->pidl(""); + $self->pidl("/* Out parameters */"); + foreach my $e (@{$fn->{ELEMENTS}}) { + next unless grep(/out/, @{$e->{DIRECTION}}); + + $self->ParseCopyArgument($fn, $e, "r.out.", "_"); + } + $self->pidl(""); + + if (defined($fn->{RETURN_TYPE})) { + $self->pidl("/* Result */"); + $self->pidl("ZERO_STRUCT(r.out.result);"); + $self->pidl(""); + } + $self->pidl("status = dcerpc_$name\_r(h, mem_ctx, &r);"); $self->pidl("if (!NT_STATUS_IS_OK(status)) {"); $self->indent; diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build index eb5f1e0c37..5023e07014 100644 --- a/pidl/lib/wscript_build +++ b/pidl/lib/wscript_build @@ -1,4 +1,37 @@ #!/usr/bin/env python # install the pidl modules -bld.INSTALL_WILDCARD('${DATAROOTDIR}/perl5', '**/*.pm', flat=False) +bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR, + ''' + Parse/Pidl.pm + Parse/Pidl/Samba4.pm + Parse/Pidl/CUtil.pm + Parse/Pidl/Expr.pm + Parse/Pidl/Wireshark/Conformance.pm + Parse/Pidl/Wireshark/NDR.pm + Parse/Pidl/ODL.pm + Parse/Pidl/Dump.pm + Parse/Pidl/Util.pm + Parse/Pidl/Samba4/Header.pm + Parse/Pidl/Samba4/COM/Header.pm + Parse/Pidl/Samba4/COM/Proxy.pm + Parse/Pidl/Samba4/COM/Stub.pm + Parse/Pidl/Samba4/TDR.pm + Parse/Pidl/Samba4/NDR/Server.pm + Parse/Pidl/Samba4/NDR/Client.pm + Parse/Pidl/Samba4/NDR/Parser.pm + Parse/Pidl/Samba4/Python.pm + Parse/Pidl/Samba4/Template.pm + Parse/Pidl/IDL.pm + Parse/Pidl/Typelist.pm + Parse/Pidl/Samba3/ClientNDR.pm + Parse/Pidl/Samba3/ServerNDR.pm + Parse/Pidl/Compat.pm + Parse/Pidl/NDR.pm + ''', + flat=False) + +if not bld.CONFIG_SET('USING_SYSTEM_PARSE_YAPP_DRIVER'): + bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR, + 'Parse/Yapp/Driver.pm', + flat=False) diff --git a/pidl/wscript b/pidl/wscript index 7a25734663..49658700f1 100644 --- a/pidl/wscript +++ b/pidl/wscript @@ -3,11 +3,38 @@ import os, sys, Logs from samba_utils import MODE_755 +# This function checks if a perl module is installed on the system. +def check_system_perl_module(conf, module, version=None): + bundle_name = module.replace('::', '_') + module_check = module + found = False + + # Create module string with version + if version: + module_check = module + ' ' + str(version) + + # Check if we have to bundle it. + if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()): + return False + + # Check for system perl module + if not conf.check_perl_module(module_check): + return False + + conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1) + + return True + def set_options(opt): opt.tool_options('perl') def configure(conf): conf.check_tool('perl') + conf.check_perl_ext_devel() + + # Check if perl(Parse::Yapp::Driver) is available. + check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05) + # we need a recent version of MakeMaker to get the right man page names if conf.CHECK_PERL_MANPAGE(): conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1') @@ -26,9 +53,6 @@ def build(bld): if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'): return - pidl_src = ['pidl'] - pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split()) - pidl_manpages = { 'pidl': 'man1/pidl.${PERLMAN1EXT}', 'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}', diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py index 0ac9cf4b8b..f2c5685b3f 100644 --- a/python/samba/tests/dns.py +++ b/python/samba/tests/dns.py @@ -171,6 +171,36 @@ class TestSimpleQueries(DNSTest): self.assertEquals(response.answers[0].rdata, os.getenv('SERVER_IP')) + def test_one_mx_query(self): + "create a query packet causing an empty RCODE_OK answer" + p = self.make_name_packet(dns.DNS_OPCODE_QUERY) + questions = [] + + name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain()) + q = self.make_name_question(name, dns.DNS_QTYPE_MX, dns.DNS_QCLASS_IN) + print "asking for ", q.name + questions.append(q) + + self.finish_name_packet(p, questions) + response = self.dns_transaction_udp(p) + self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK) + self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY) + self.assertEquals(response.ancount, 0) + + p = self.make_name_packet(dns.DNS_OPCODE_QUERY) + questions = [] + + name = "invalid-%s.%s" % (os.getenv('SERVER'), self.get_dns_domain()) + q = self.make_name_question(name, dns.DNS_QTYPE_MX, dns.DNS_QCLASS_IN) + print "asking for ", q.name + questions.append(q) + + self.finish_name_packet(p, questions) + response = self.dns_transaction_udp(p) + self.assert_dns_rcode_equals(response, dns.DNS_RCODE_NXDOMAIN) + self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY) + self.assertEquals(response.ancount, 0) + def test_two_queries(self): "create a query packet containing two query records" p = self.make_name_packet(dns.DNS_OPCODE_QUERY) diff --git a/script/autobuild.py b/script/autobuild.py index fe39ed9773..3136643fc9 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -35,7 +35,7 @@ defaulttasks = [ "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "ntdb", "tal tasks = { # We have 'test' before 'install' because, 'test' should work without 'install' - "samba" : [ ("configure", "./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab", "text/plain"), + "samba" : [ ("configure", "./configure.developer ${PREFIX} ${PERL_VENDOR_LIB} --with-selftest-prefix=./bin/ab", "text/plain"), ("make", "make -j", "text/plain"), ("test", "make test FAIL_IMMEDIATELY=1", "text/plain"), ("install", "make install", "text/plain"), @@ -53,7 +53,7 @@ tasks = { ("ctdb-header-install", "cp ./ctdb/include/* ${PREFIX_DIR}/include", "text/plain"), ("ctdb-header-ls", "ls ${PREFIX_DIR}/include/ctdb.h", "text/plain"), - ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab --with-cluster-support --with-ctdb-dir=${PREFIX_DIR} --bundled-libraries=!tdb", "text/plain"), + ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure.developer ${PREFIX} ${PERL_VENDOR_LIB} --with-selftest-prefix=./bin/ab --with-cluster-support --with-ctdb-dir=${PREFIX_DIR} --bundled-libraries=!tdb", "text/plain"), ("make", "make", "text/plain"), ("check", "./bin/smbd -b | grep CLUSTER_SUPPORT", "text/plain"), ("install", "make install", "text/plain"), @@ -82,7 +82,7 @@ tasks = { ("ldb-make", "cd lib/ldb && make", "text/plain"), ("ldb-install", "cd lib/ldb && make install", "text/plain"), - ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX}", "text/plain"), + ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX} ${PERL_VENDOR_LIB}", "text/plain"), ("make", "make", "text/plain"), ("install", "make install", "text/plain")], @@ -212,6 +212,7 @@ class builder(object): self.cmd = self.cmd.replace("${PYTHON_PREFIX}", get_python_lib(standard_lib=1, prefix=self.prefix)) self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix) self.cmd = self.cmd.replace("${PREFIX_DIR}", "%s" % self.prefix) + self.cmd = self.cmd.replace("${PERL_VENDOR_LIB}", "--with-perl-vendorlib=%s/share/perl5" % self.prefix) # if self.output_mime_type == "text/x-subunit": # self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit")) print '%s: [%s] Running %s' % (self.name, self.stage, self.cmd) diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index d86d589cc3..be44ce949d 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -389,6 +389,100 @@ struct security_token *create_local_nt_token(TALLOC_CTX *mem_ctx, return result; } +/*************************************************** + Merge in any groups from /etc/group. +***************************************************/ + +static NTSTATUS add_local_groups(struct security_token *result, + bool is_guest) +{ + gid_t *gids = NULL; + uint32_t getgroups_num_group_sids = 0; + struct passwd *pass = NULL; + TALLOC_CTX *tmp_ctx = talloc_stackframe(); + int i; + + if (is_guest) { + /* + * Guest is a special case. It's always + * a user that can be looked up, but + * result->sids[0] is set to DOMAIN\Guest. + * Lookup by account name instead. + */ + pass = Get_Pwnam_alloc(tmp_ctx, lp_guestaccount()); + } else { + uid_t uid; + + /* For non-guest result->sids[0] is always the user sid. */ + if (!sid_to_uid(&result->sids[0], &uid)) { + /* + * Non-mappable SID like SYSTEM. + * Can't be in any /etc/group groups. + */ + TALLOC_FREE(tmp_ctx); + return NT_STATUS_OK; + } + + pass = getpwuid_alloc(tmp_ctx, uid); + if (pass == NULL) { + DEBUG(1, ("SID %s -> getpwuid(%u) failed\n", + sid_string_dbg(&result->sids[0]), + (unsigned int)uid)); + } + } + + if (!pass) { + TALLOC_FREE(tmp_ctx); + return NT_STATUS_UNSUCCESSFUL; + } + + /* + * Now we must get any groups this user has been + * added to in /etc/group and merge them in. + * This has to be done in every code path + * that creates an NT token, as remote users + * may have been added to the local /etc/group + * database. Tokens created merely from the + * info3 structs (via the DC or via the krb5 PAC) + * won't have these local groups. Note the + * groups added here will only be UNIX groups + * (S-1-22-2-XXXX groups) as getgroups_unix_user() + * turns off winbindd before calling getgroups(). + * + * NB. This is duplicating work already + * done in the 'unix_user:' case of + * create_token_from_sid() but won't + * do anything other than be inefficient + * in that case. + */ + + if (!getgroups_unix_user(tmp_ctx, pass->pw_name, pass->pw_gid, + &gids, &getgroups_num_group_sids)) { + DEBUG(1, ("getgroups_unix_user for user %s failed\n", + pass->pw_name)); + TALLOC_FREE(tmp_ctx); + return NT_STATUS_UNSUCCESSFUL; + } + + for (i=0; i<getgroups_num_group_sids; i++) { + NTSTATUS status; + struct dom_sid grp_sid; + gid_to_sid(&grp_sid, gids[i]); + + status = add_sid_to_array_unique(result, + &grp_sid, + &result->sids, + &result->num_sids); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(3, ("Failed to add UNIX SID to nt token\n")); + TALLOC_FREE(tmp_ctx); + return status; + } + } + TALLOC_FREE(tmp_ctx); + return NT_STATUS_OK; +} + static NTSTATUS finalize_local_nt_token(struct security_token *result, bool is_guest) { @@ -396,6 +490,13 @@ static NTSTATUS finalize_local_nt_token(struct security_token *result, gid_t gid; NTSTATUS status; + /* Add any local groups. */ + + status = add_local_groups(result, is_guest); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + /* Add in BUILTIN sids */ status = add_sid_to_array(result, &global_sid_World, diff --git a/source3/build/charset.py b/source3/build/charset.py index 44852a6c52..0033557736 100644 --- a/source3/build/charset.py +++ b/source3/build/charset.py @@ -33,6 +33,12 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False): default_unix_charset="UTF-8" # TODO: this used to warn about the set charset on cross builds + if default_dos_charset is False or default_unix_charset is False: + # we found iconv, but it failed to convert anything (e.g. on AIX) + conf.undefine('HAVE_NATIVE_ICONV'); + default_dos_charset = "ASCII" + default_unix_charset = "UTF-8" + conf.DEFINE('DEFAULT_DOS_CHARSET', default_dos_charset, quote=True) conf.DEFINE('DEFAULT_UNIX_CHARSET', default_unix_charset, quote=True) diff --git a/source3/client/client.c b/source3/client/client.c index afa58475f2..9d5cec90b1 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -232,7 +232,7 @@ static int readfile(uint8_t *b, int n, XFILE *f) return x_fread(b,1,n,f); i = 0; - while (i < (n - 1) && (i < BUFFER_SIZE)) { + while (i < (n - 1)) { if ((c = x_getc(f)) == EOF) { break; } @@ -1695,7 +1695,6 @@ static int do_allinfo(const char *name) struct timespec b_time, a_time, m_time, c_time; off_t size; uint16_t mode; - SMB_INO_T ino; NTTIME tmp; uint16_t fnum; unsigned int num_streams; @@ -1722,8 +1721,8 @@ static int do_allinfo(const char *name) } d_printf("altname: %s\n", altname); - status = cli_qpathinfo2(cli, name, &b_time, &a_time, &m_time, &c_time, - &size, &mode, &ino); + status = cli_qpathinfo3(cli, name, &b_time, &a_time, &m_time, &c_time, + &size, &mode, NULL); if (!NT_STATUS_IS_OK(status)) { d_printf("%s getting pathinfo for %s\n", nt_errstr(status), name); @@ -1800,7 +1799,7 @@ static int do_allinfo(const char *name) d_printf("%s\n", snapshots[i]); snap_name = talloc_asprintf(talloc_tos(), "%s%s", snapshots[i], name); - status = cli_qpathinfo2(cli, snap_name, &b_time, &a_time, + status = cli_qpathinfo3(cli, snap_name, &b_time, &a_time, &m_time, &c_time, &size, NULL, NULL); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/include/client.h b/source3/include/client.h index 09f96601c0..3f92d6dcde 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -22,7 +22,7 @@ #ifndef _CLIENT_H #define _CLIENT_H -#define CLI_BUFFER_SIZE (0xFFFF) +#define CLI_BUFFER_SIZE SMB_BUFFER_SIZE_MAX /* default client timeout to 20 seconds on most commands */ #define CLIENT_TIMEOUT (20 * 1000) @@ -77,7 +77,6 @@ struct cli_state { uint32_t server_posix_capabilities; /* What the client requested. */ uint32_t requested_posix_capabilities; - bool dfsroot; bool backup_intent; /* The list of pipes currently open on this connection. */ @@ -91,8 +90,6 @@ struct cli_state { bool use_oplocks; /* should we use oplocks? */ - bool case_sensitive; /* False by default. */ - /* Where (if anywhere) this is mounted under DFS. */ char *dfs_mountpoint; diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h index 64cb1d5ade..bba63f8dd0 100644 --- a/source3/include/ctdbd_conn.h +++ b/source3/include/ctdbd_conn.h @@ -76,7 +76,7 @@ NTSTATUS ctdbd_traverse(uint32_t db_id, NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn, const struct sockaddr_storage *server, const struct sockaddr_storage *client, - void (*release_ip_handler)(const char *ip_addr, + bool (*release_ip_handler)(const char *ip_addr, void *private_data), void *private_data); diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h index 63c96fecd1..ce73181fac 100644 --- a/source3/include/libsmb_internal.h +++ b/source3/include/libsmb_internal.h @@ -78,6 +78,7 @@ struct _SMBCSRV { dev_t dev; bool no_pathinfo; bool no_pathinfo2; + bool no_pathinfo3; bool no_nt_session; struct policy_handle pol; diff --git a/source3/include/messages.h b/source3/include/messages.h index 12fc439969..09c39cc9b0 100644 --- a/source3/include/messages.h +++ b/source3/include/messages.h @@ -101,6 +101,9 @@ bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx); void *messaging_tdb_event(TALLOC_CTX *mem_ctx, struct messaging_context *msg, struct tevent_context *ev); +NTSTATUS messaging_tdb_cleanup(struct messaging_context *msg_ctx, + struct server_id pid); + NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx, TALLOC_CTX *mem_ctx, struct messaging_backend **presult); @@ -140,6 +143,9 @@ NTSTATUS messaging_send_buf(struct messaging_context *msg_ctx, void messaging_dispatch_rec(struct messaging_context *msg_ctx, struct messaging_rec *rec); +void messaging_cleanup_server(struct messaging_context *msg_ctx, + struct server_id pid); + #include "librpc/gen_ndr/ndr_messaging.h" #endif diff --git a/source3/include/smb.h b/source3/include/smb.h index e1ab34409d..7ff997e2de 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -32,11 +32,9 @@ /* logged when starting the various Samba daemons */ #define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-2013" - -#define BUFFER_SIZE (128*1024) - #define SAFETY_MARGIN 1024 #define LARGE_WRITEX_HDR_SIZE 65 +#define LARGE_WRITEX_BUFFER_SIZE (128*1024) #define NMB_PORT 137 #define DGRAM_PORT 138 @@ -513,25 +511,6 @@ Offset Data length. #define RENAME_FLAG_RENAME 0x104 #define RENAME_FLAG_COPY 0x105 -/* Filesystem Attributes. */ -#define FILE_CASE_SENSITIVE_SEARCH 0x00000001 -#define FILE_CASE_PRESERVED_NAMES 0x00000002 -#define FILE_UNICODE_ON_DISK 0x00000004 -/* According to cifs9f, this is 4, not 8 */ -/* Acconding to testing, this actually sets the security attribute! */ -#define FILE_PERSISTENT_ACLS 0x00000008 -#define FILE_FILE_COMPRESSION 0x00000010 -#define FILE_VOLUME_QUOTAS 0x00000020 -#define FILE_SUPPORTS_SPARSE_FILES 0x00000040 -#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080 -#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100 -#define FS_LFN_APIS 0x00004000 -#define FILE_VOLUME_IS_COMPRESSED 0x00008000 -#define FILE_SUPPORTS_OBJECT_IDS 0x00010000 -#define FILE_SUPPORTS_ENCRYPTION 0x00020000 -#define FILE_NAMED_STREAMS 0x00040000 -#define FILE_READ_ONLY_VOLUME 0x00080000 - /* ChangeNotify flags. */ #define FILE_NOTIFY_CHANGE_FILE_NAME 0x001 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x002 diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 630b22e6c5..1c70b3bec7 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -59,7 +59,7 @@ struct ctdbd_connection { struct ctdb_packet_context *pkt; struct tevent_fd *fde; - void (*release_ip_handler)(const char *ip_addr, void *private_data); + bool (*release_ip_handler)(const char *ip_addr, void *private_data); void *release_ip_priv; }; @@ -427,10 +427,23 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid, if ((conn->release_ip_handler != NULL) && (msg->srvid == CTDB_SRVID_RELEASE_IP)) { + bool ret; + /* must be dispatched immediately */ DEBUG(10, ("received CTDB_SRVID_RELEASE_IP\n")); - conn->release_ip_handler((const char *)msg->data, - conn->release_ip_priv); + ret = conn->release_ip_handler((const char *)msg->data, + conn->release_ip_priv); + if (ret) { + /* + * We need to release the ip, + * so return an error to the upper layers. + * + * We make sure we don't trigger this again. + */ + conn->release_ip_handler = NULL; + conn->release_ip_priv = NULL; + return NT_STATUS_ADDRESS_CLOSED; + } TALLOC_FREE(hdr); goto next_pkt; } @@ -629,10 +642,21 @@ static NTSTATUS ctdb_handle_message(uint8_t *buf, size_t length, if ((conn->release_ip_handler != NULL) && (msg->srvid == CTDB_SRVID_RELEASE_IP)) { + bool ret; + /* must be dispatched immediately */ DEBUG(10, ("received CTDB_SRVID_RELEASE_IP\n")); - conn->release_ip_handler((const char *)msg->data, - conn->release_ip_priv); + ret = conn->release_ip_handler((const char *)msg->data, + conn->release_ip_priv); + if (ret) { + /* + * We need to release the ip. + * + * We make sure we don't trigger this again. + */ + conn->release_ip_handler = NULL; + conn->release_ip_priv = NULL; + } TALLOC_FREE(buf); return NT_STATUS_OK; } @@ -1691,7 +1715,7 @@ static void smbd_ctdb_canonicalize_ip(const struct sockaddr_storage *in, NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn, const struct sockaddr_storage *_server, const struct sockaddr_storage *_client, - void (*release_ip_handler)(const char *ip_addr, + bool (*release_ip_handler)(const char *ip_addr, void *private_data), void *private_data) { diff --git a/source3/lib/messages.c b/source3/lib/messages.c index f4d62279d9..cb78e22434 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -397,4 +397,21 @@ void messaging_dispatch_rec(struct messaging_context *msg_ctx, return; } +/* + Call when a process has terminated abnormally. +*/ +void messaging_cleanup_server(struct messaging_context *msg_ctx, + struct server_id server) +{ + if (server_id_is_disconnected(&server)) { + return; + } + + if (!procid_is_local(&server)) { + return; + } + + (void)messaging_tdb_cleanup(msg_ctx, server); + +} /** @} **/ diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c index 6b63d72925..859eeb858e 100644 --- a/source3/lib/messages_local.c +++ b/source3/lib/messages_local.c @@ -45,6 +45,7 @@ #include "includes.h" #include "system/filesys.h" #include "messages.h" +#include "serverid.h" #include "lib/tdb_wrap/tdb_wrap.h" #include "lib/param/param.h" @@ -200,6 +201,43 @@ static TDB_DATA message_key_pid(TALLOC_CTX *mem_ctx, struct server_id pid) return kbuf; } +/******************************************************************* + Called when a process has terminated abnormally. Remove all messages + pending for it. +******************************************************************/ + +NTSTATUS messaging_tdb_cleanup(struct messaging_context *msg_ctx, + struct server_id pid) +{ + struct messaging_tdb_context *ctx = talloc_get_type( + msg_ctx->local->private_data, + struct messaging_tdb_context); + struct tdb_wrap *tdb = ctx->tdb; + TDB_DATA key; + TALLOC_CTX *frame = talloc_stackframe(); + + key = message_key_pid(frame, pid); + /* + * We have to lock the key to avoid + * races in case the server_id was + * re-used and is active (a remote + * possibility, true). We only + * clean up the database if we + * know server_id doesn't exist + * while checked under the chainlock. + */ + if (tdb_chainlock(tdb->tdb, key) != 0) { + TALLOC_FREE(frame); + return NT_STATUS_LOCK_NOT_GRANTED; + } + if (!serverid_exists(&pid)) { + (void)tdb_delete(tdb->tdb, key); + } + tdb_chainunlock(tdb->tdb, key); + TALLOC_FREE(frame); + return NT_STATUS_OK; +} + /* Fetch the messaging array for a process */ diff --git a/source3/lib/smbd_tevent_queue.c b/source3/lib/smbd_tevent_queue.c new file mode 100644 index 0000000000..421f77dca2 --- /dev/null +++ b/source3/lib/smbd_tevent_queue.c @@ -0,0 +1,81 @@ +/* + Unix SMB/CIFS implementation. + Infrastructure for async requests + Copyright (C) Volker Lendecke 2008 + Copyright (C) Stefan Metzmacher 2009 + + ** NOTE! The following LGPL license applies to the tevent + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. +*/ + +/* Back-port of missing API from 4.2.x for tevent_queues. */ + +#include "replace.h" +#include <tevent.h> +#include "source3/lib/smbd_tevent_queue.h" + +struct tevent_queue_wait_state { + uint8_t dummy; +}; + +static void tevent_queue_wait_trigger(struct tevent_req *req, + void *private_data); + +struct tevent_req *smbd_tevent_queue_wait_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct tevent_queue *queue) +{ + struct tevent_req *req; + struct tevent_queue_wait_state *state; + bool ok; + + req = tevent_req_create(mem_ctx, &state, + struct tevent_queue_wait_state); + if (req == NULL) { + return NULL; + } + + ok = tevent_queue_add(queue, ev, req, + tevent_queue_wait_trigger, + NULL); + if (!ok) { + tevent_req_oom(req); + return tevent_req_post(req, ev); + } + + return req; +} + +static void tevent_queue_wait_trigger(struct tevent_req *req, + void *private_data) +{ + tevent_req_done(req); +} + +bool smbd_tevent_queue_wait_recv(struct tevent_req *req) +{ + enum tevent_req_state state; + uint64_t err; + + if (tevent_req_is_error(req, &state, &err)) { + tevent_req_received(req); + return false; + } + + tevent_req_received(req); + return true; +} diff --git a/source3/lib/smbd_tevent_queue.h b/source3/lib/smbd_tevent_queue.h new file mode 100644 index 0000000000..c919958ae1 --- /dev/null +++ b/source3/lib/smbd_tevent_queue.h @@ -0,0 +1,34 @@ +/* + Unix SMB/CIFS implementation. + Infrastructure for async requests + Copyright (C) Volker Lendecke 2008 + Copyright (C) Stefan Metzmacher 2009 + + ** NOTE! The following LGPL license applies to the tevent + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. +*/ + +/* Back-port of missing API from 4.2 for tevent_queues. */ + +#ifndef _SMBD_TEVENT_QUEUE_H_ +#define _SMBD_TEVENT_QUEUE_H_ +struct tevent_req *smbd_tevent_queue_wait_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct tevent_queue *queue); + +bool smbd_tevent_queue_wait_recv(struct tevent_req *req); +#endif diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index c8ef5b5774..fb99132e57 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1143,13 +1143,16 @@ static ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, #ifdef HAVE_LDAP_ADD_RESULT_ENTRY while (cookie) { LDAPMessage *res2 = NULL; - ADS_STATUS status2; LDAPMessage *msg, *next; - status2 = ads_do_paged_search_args(ads, bind_path, scope, expr, + status = ads_do_paged_search_args(ads, bind_path, scope, expr, attrs, args, &res2, &count, &cookie); - - if (!ADS_ERR_OK(status2)) break; + if (!ADS_ERR_OK(status)) { + /* Ensure we free all collected results */ + ads_msgfree(ads, *res); + *res = NULL; + break; + } /* this relies on the way that ldap_add_result_entry() works internally. I hope that this works on all ldap libs, but I have only tested with openldap */ diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index ed68a5d927..8d5c3d4b26 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -76,17 +76,6 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx, } *state->ptr = state; - if (cli->case_sensitive) { - clear_flags |= FLAG_CASELESS_PATHNAMES; - } else { - /* Default setting, case insensitive. */ - additional_flags |= FLAG_CASELESS_PATHNAMES; - } - - if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) { - additional_flags2 |= FLAGS2_DFS_PATHNAMES; - } - state->req = smb1cli_req_create(state, ev, cli->conn, smb_command, additional_flags, clear_flags, additional_flags2, clear_flags2, @@ -134,17 +123,6 @@ struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, } *state->ptr = state; - if (cli->case_sensitive) { - clear_flags |= FLAG_CASELESS_PATHNAMES; - } else { - /* Default setting, case insensitive. */ - additional_flags |= FLAG_CASELESS_PATHNAMES; - } - - if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) { - additional_flags2 |= FLAGS2_DFS_PATHNAMES; - } - state->req = smb1cli_req_send(state, ev, cli->conn, smb_command, additional_flags, clear_flags, additional_flags2, clear_flags2, diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 7ec3b56640..13e77046cf 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2575,21 +2575,22 @@ static void cli_tcon_andx_done(struct tevent_req *subreq) * Avoids issues when connecting to Win9x boxes sharing files */ - cli->dfsroot = false; - if ((wct > 2) && (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_LANMAN2)) { optional_support = SVAL(vwv+2, 0); } - if (optional_support & SMB_SHARE_IN_DFS) { - cli->dfsroot = true; - } - if (optional_support & SMB_EXTENDED_SIGNATURES) { smb1cli_session_protect_session_key(cli->smb1.session); } - cli_state_set_tid(cli, SVAL(inhdr, HDR_TID)); + smb1cli_tcon_set_values(state->cli->smb1.tcon, + SVAL(inhdr, HDR_TID), + optional_support, + 0, /* maximal_access */ + 0, /* guest_maximal_access */ + NULL, /* service */ + NULL); /* fs_type */ + tevent_req_done(req); } @@ -2723,7 +2724,15 @@ static void cli_tree_connect_raw_done(struct tevent_req *subreq) if (tevent_req_nterror(req, status)) { return; } - cli_state_set_tid(state->cli, tid); + + smb1cli_tcon_set_values(state->cli->smb1.tcon, + tid, + 0, /* optional_support */ + 0, /* maximal_access */ + 0, /* guest_maximal_access */ + NULL, /* service */ + NULL); /* fs_type */ + tevent_req_done(req); } diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 57126e6233..ff48719c76 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -234,7 +234,7 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx, here before trying to connect to the original share. cli_check_msdfs_proxy() will fail if it is a normal share. */ - if ((smb1cli_conn_capabilities(c->conn) & CAP_DFS) && + if (smbXcli_conn_dfs_supported(c->conn) && cli_check_msdfs_proxy(ctx, c, sharename, &newserver, &newshare, force_encrypt, @@ -622,7 +622,7 @@ static bool cli_dfs_check_error(struct cli_state *cli, NTSTATUS expected, { /* only deal with DS when we negotiated NT_STATUS codes and UNICODE */ - if (!(smb1cli_conn_capabilities(cli->conn) & CAP_UNICODE)) { + if (!(smbXcli_conn_use_unicode(cli->conn))) { return false; } if (!(smb1cli_conn_capabilities(cli->conn) & CAP_STATUS32)) { @@ -645,9 +645,7 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx, size_t *num_refs, size_t *consumed) { - unsigned int data_len = 0; unsigned int param_len = 0; - uint16_t setup[1]; uint16_t recv_flags2; uint8_t *param = NULL; uint8_t *rdata = NULL; @@ -664,8 +662,6 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx, *num_refs = 0; *refs = NULL; - SSVAL(setup, 0, TRANSACT2_GET_DFS_REFERRAL); - param = talloc_array(talloc_tos(), uint8_t, 2); if (!param) { status = NT_STATUS_NO_MEMORY; @@ -683,20 +679,63 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx, param_len = talloc_get_size(param); path_ucs = (smb_ucs2_t *)¶m[2]; - status = cli_trans(talloc_tos(), cli, SMBtrans2, - NULL, 0xffff, 0, 0, - setup, 1, 0, - param, param_len, 2, - NULL, 0, CLI_BUFFER_SIZE, - &recv_flags2, - NULL, 0, NULL, /* rsetup */ - NULL, 0, NULL, - &rdata, 4, &data_len); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + DATA_BLOB in_input_buffer; + DATA_BLOB in_output_buffer = data_blob_null; + DATA_BLOB out_input_buffer = data_blob_null; + DATA_BLOB out_output_buffer = data_blob_null; + + in_input_buffer.data = param; + in_input_buffer.length = param_len; + + status = smb2cli_ioctl(cli->conn, + cli->timeout, + cli->smb2.session, + cli->smb2.tcon, + UINT64_MAX, /* in_fid_persistent */ + UINT64_MAX, /* in_fid_volatile */ + FSCTL_DFS_GET_REFERRALS, + 0, /* in_max_input_length */ + &in_input_buffer, + CLI_BUFFER_SIZE, /* in_max_output_length */ + &in_output_buffer, + SMB2_IOCTL_FLAG_IS_FSCTL, + talloc_tos(), + &out_input_buffer, + &out_output_buffer); + if (!NT_STATUS_IS_OK(status)) { + goto out; + } - endp = (char *)rdata + data_len; + if (out_output_buffer.length < 4) { + status = NT_STATUS_INVALID_NETWORK_RESPONSE; + goto out; + } + + recv_flags2 = FLAGS2_UNICODE_STRINGS; + rdata = out_output_buffer.data; + endp = (char *)rdata + out_output_buffer.length; + } else { + unsigned int data_len = 0; + uint16_t setup[1]; + + SSVAL(setup, 0, TRANSACT2_GET_DFS_REFERRAL); + + status = cli_trans(talloc_tos(), cli, SMBtrans2, + NULL, 0xffff, 0, 0, + setup, 1, 0, + param, param_len, 2, + NULL, 0, CLI_BUFFER_SIZE, + &recv_flags2, + NULL, 0, NULL, /* rsetup */ + NULL, 0, NULL, + &rdata, 4, &data_len); + if (!NT_STATUS_IS_OK(status)) { + goto out; + } + + endp = (char *)rdata + data_len; + } consumed_ucs = SVAL(rdata, 0); num_referrals = SVAL(rdata, 2); @@ -822,6 +861,8 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, SMB_STRUCT_STAT sbuf; uint32 attributes; NTSTATUS status; + struct smbXcli_tcon *root_tcon = NULL; + struct smbXcli_tcon *target_tcon = NULL; if ( !rootcli || !path || !targetcli ) { return NT_STATUS_INVALID_PARAMETER; @@ -829,7 +870,13 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, /* Don't do anything if this is not a DFS root. */ - if ( !rootcli->dfsroot) { + if (smbXcli_conn_protocol(rootcli->conn) >= PROTOCOL_SMB2_02) { + root_tcon = rootcli->smb2.tcon; + } else { + root_tcon = rootcli->smb1.tcon; + } + + if (!smbXcli_tcon_is_dfs_share(root_tcon)) { *targetcli = rootcli; *pp_targetpath = talloc_strdup(ctx, path); if (!*pp_targetpath) { @@ -1029,8 +1076,14 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, done: + if (smbXcli_conn_protocol((*targetcli)->conn) >= PROTOCOL_SMB2_02) { + target_tcon = (*targetcli)->smb2.tcon; + } else { + target_tcon = (*targetcli)->smb1.tcon; + } + /* If returning true ensure we return a dfs root full path. */ - if ((*targetcli)->dfsroot) { + if (smbXcli_tcon_is_dfs_share(target_tcon)) { dfs_path = talloc_strdup(ctx, *pp_targetpath); if (!dfs_path) { return NT_STATUS_NO_MEMORY; diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 821a134a6c..8a3881018e 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -177,7 +177,6 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, cli->raw_status = NT_STATUS_INTERNAL_ERROR; cli->map_dos_errors = true; /* remove this */ cli->timeout = CLIENT_TIMEOUT; - cli->case_sensitive = false; /* Set the CLI_FORCE_DOSERR environment variable to test client routines using DOS errors instead of STATUS32 @@ -425,8 +424,29 @@ uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid) bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive) { - bool ret = cli->case_sensitive; - cli->case_sensitive = case_sensitive; + bool ret; + uint32_t fs_attrs; + struct smbXcli_tcon *tcon; + + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + tcon = cli->smb2.tcon; + } else { + tcon = cli->smb1.tcon; + } + + fs_attrs = smbXcli_tcon_get_fs_attributes(tcon); + if (fs_attrs & FILE_CASE_SENSITIVE_SEARCH) { + ret = true; + } else { + ret = false; + } + if (case_sensitive) { + fs_attrs |= FILE_CASE_SENSITIVE_SEARCH; + } else { + fs_attrs &= ~FILE_CASE_SENSITIVE_SEARCH; + } + smbXcli_tcon_set_fs_attributes(tcon, fs_attrs); + return ret; } diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index d6d2fae04d..7e6f8d74ba 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -1265,6 +1265,7 @@ NTSTATUS cli_qpathinfo_basic_recv(struct tevent_req *req, return status; } + sbuf->st_ex_btime = interpret_long_date((char *)state->data); sbuf->st_ex_atime = interpret_long_date((char *)state->data+8); sbuf->st_ex_mtime = interpret_long_date((char *)state->data+16); sbuf->st_ex_ctime = interpret_long_date((char *)state->data+24); @@ -1362,3 +1363,112 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin return NT_STATUS_OK; } + +/**************************************************************************** + Send a qpathinfo SMB_QUERY_FILE_STADNDARD_INFO call. +****************************************************************************/ + +NTSTATUS cli_qpathinfo_standard(struct cli_state *cli, const char *fname, + uint64_t *allocated, uint64_t *size, + uint32_t *nlinks, + bool *is_del_pending, bool *is_dir) +{ + uint8_t *rdata; + uint32_t num_rdata; + NTSTATUS status; + + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + return NT_STATUS_NOT_IMPLEMENTED; + } + + status = cli_qpathinfo(talloc_tos(), cli, fname, + SMB_QUERY_FILE_STANDARD_INFO, + 24, CLI_BUFFER_SIZE, &rdata, &num_rdata); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (allocated) { + *allocated = BVAL(rdata, 0); + } + + if (size) { + *size = BVAL(rdata, 8); + } + + if (nlinks) { + *nlinks = IVAL(rdata, 16); + } + + if (is_del_pending) { + *is_del_pending = CVAL(rdata, 20); + } + + if (is_dir) { + *is_dir = CVAL(rdata, 20); + } + + TALLOC_FREE(rdata); + + return NT_STATUS_OK; +} + + +/* like cli_qpathinfo2 but do not use SMB_QUERY_FILE_ALL_INFO with smb1 */ +NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname, + struct timespec *create_time, + struct timespec *access_time, + struct timespec *write_time, + struct timespec *change_time, + off_t *size, uint16 *mode, + SMB_INO_T *ino) +{ + NTSTATUS status = NT_STATUS_OK; + SMB_STRUCT_STAT st; + uint32_t attr; + uint64_t pos; + + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + return cli_qpathinfo2(cli, fname, + create_time, access_time, write_time, change_time, + size, mode, ino); + } + + if (create_time || access_time || write_time || change_time || mode) { + status = cli_qpathinfo_basic(cli, fname, &st, &attr); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + } + + if (size) { + status = cli_qpathinfo_standard(cli, fname, + NULL, &pos, NULL, NULL, NULL); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + *size = pos; + } + + if (create_time) { + *create_time = st.st_ex_btime; + } + if (access_time) { + *access_time = st.st_ex_atime; + } + if (write_time) { + *write_time = st.st_ex_mtime; + } + if (change_time) { + *change_time = st.st_ex_ctime; + } + if (mode) { + *mode = attr; + } + if (ino) { + *ino = 0; + } + + return NT_STATUS_OK; +} diff --git a/source3/libsmb/clirap.h b/source3/libsmb/clirap.h index e105182f09..54f06b4e76 100644 --- a/source3/libsmb/clirap.h +++ b/source3/libsmb/clirap.h @@ -82,6 +82,13 @@ NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname, struct timespec *change_time, off_t *size, uint16 *mode, SMB_INO_T *ino); +NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname, + struct timespec *create_time, + struct timespec *access_time, + struct timespec *write_time, + struct timespec *change_time, + off_t *size, uint16 *mode, + SMB_INO_T *ino); struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli, @@ -115,6 +122,10 @@ NTSTATUS cli_qpathinfo_basic_recv(struct tevent_req *req, SMB_STRUCT_STAT *sbuf, uint32 *attributes); NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf, uint32 *attributes); +NTSTATUS cli_qpathinfo_standard(struct cli_state *cli, const char *fname, + uint64_t *allocated, uint64_t *size, + uint32_t *nlinks, + bool *is_del_pending, bool *is_dir); NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); struct tevent_req *cli_qpathinfo_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c index 08fda5fdb5..54621348f3 100644 --- a/source3/libsmb/clitrans.c +++ b/source3/libsmb/clitrans.c @@ -73,16 +73,6 @@ struct tevent_req *cli_trans_send( return NULL; } *state->ptr = state; - if (cli->case_sensitive) { - clear_flags |= FLAG_CASELESS_PATHNAMES; - } else { - /* Default setting, case insensitive. */ - additional_flags |= FLAG_CASELESS_PATHNAMES; - } - - if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) { - additional_flags2 |= FLAGS2_DFS_PATHNAMES; - } state->req = smb1cli_trans_send(state, ev, cli->conn, cmd, @@ -169,17 +159,6 @@ NTSTATUS cli_trans(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t additional_flags2 = 0; uint16_t clear_flags2 = 0; - if (cli->case_sensitive) { - clear_flags |= FLAG_CASELESS_PATHNAMES; - } else { - /* Default setting, case insensitive. */ - additional_flags |= FLAG_CASELESS_PATHNAMES; - } - - if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) { - additional_flags2 |= FLAGS2_DFS_PATHNAMES; - } - status = smb1cli_trans(mem_ctx, cli->conn, trans_cmd, additional_flags, clear_flags, diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c index 32210b6c1a..8fb7a2e67e 100644 --- a/source3/libsmb/libsmb_file.c +++ b/source3/libsmb/libsmb_file.c @@ -558,11 +558,24 @@ SMBC_getatr(SMBCCTX * context, return True; } + srv->no_pathinfo2 = True; + + if (!srv->no_pathinfo3 && + NT_STATUS_IS_OK(cli_qpathinfo3(targetcli, targetpath, + create_time_ts, + access_time_ts, + write_time_ts, + change_time_ts, + size, mode, ino))) { + TALLOC_FREE(frame); + return True; + } + + srv->no_pathinfo3 = True; + /* if this is NT then don't bother with the getatr */ if (smb1cli_conn_capabilities(targetcli->conn) & CAP_NT_SMBS) { - errno = EPERM; - TALLOC_FREE(frame); - return False; + goto all_failed; } if (NT_STATUS_IS_OK(cli_getatr(targetcli, targetpath, mode, size, &write_time))) { @@ -581,11 +594,17 @@ SMBC_getatr(SMBCCTX * context, if (change_time_ts != NULL) { *change_time_ts = w_time_ts; } - srv->no_pathinfo2 = True; + if (ino) { + *ino = 0; + } TALLOC_FREE(frame); return True; } +all_failed: + srv->no_pathinfo2 = False; + srv->no_pathinfo3 = False; + errno = EPERM; TALLOC_FREE(frame); return False; diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 7a20c30b77..517753d531 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -256,6 +256,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, NTSTATUS status; char *newserver, *newshare; int flags = 0; + struct smbXcli_tcon *tcon = NULL; ZERO_STRUCT(c); *in_cache = false; @@ -497,7 +498,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, here before trying to connect to the original share. cli_check_msdfs_proxy() will fail if it is a normal share. */ - if ((smb1cli_conn_capabilities(c->conn) & CAP_DFS) && + if (smbXcli_conn_dfs_supported(c->conn) && cli_check_msdfs_proxy(ctx, c, share, &newserver, &newshare, /* FIXME: cli_check_msdfs_proxy() does @@ -528,6 +529,12 @@ SMBC_server_internal(TALLOC_CTX *ctx, DEBUG(4,(" tconx ok\n")); + if (smbXcli_conn_protocol(c->conn) >= PROTOCOL_SMB2_02) { + tcon = c->smb2.tcon; + } else { + tcon = c->smb1.tcon; + } + /* Determine if this share supports case sensitivity */ if (is_ipc) { DEBUG(4, ("IPC$ so ignore case sensitivity\n")); @@ -555,10 +562,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, (fs_attrs & FILE_CASE_SENSITIVE_SEARCH ? "True" : "False"))); - cli_set_case_sensitive(c, - (fs_attrs & FILE_CASE_SENSITIVE_SEARCH - ? True - : False)); + smbXcli_tcon_set_fs_attributes(tcon, fs_attrs); } if (context->internal->smb_encryption_level) { @@ -602,6 +606,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, srv->dev = (dev_t)(str_checksum(server) ^ str_checksum(share)); srv->no_pathinfo = False; srv->no_pathinfo2 = False; + srv->no_pathinfo3 = False; srv->no_nt_session = False; done: diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c index fbbd887edf..94449e0d86 100644 --- a/source3/libsmb/libsmb_stat.c +++ b/source3/libsmb/libsmb_stat.c @@ -364,6 +364,13 @@ SMBC_fstatvfs_ctx(SMBCCTX *context, unsigned long flags = 0; uint32 fs_attrs = 0; struct cli_state *cli = file->srv->cli; + struct smbXcli_tcon *tcon; + + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + tcon = cli->smb2.tcon; + } else { + tcon = cli->smb1.tcon; + } /* Initialize all fields (at least until we actually use them) */ memset(st, 0, sizeof(*st)); @@ -469,7 +476,9 @@ SMBC_fstatvfs_ctx(SMBCCTX *context, } /* See if DFS is supported */ - if ((smb1cli_conn_capabilities(cli->conn) & CAP_DFS) && cli->dfsroot) { + if (smbXcli_conn_dfs_supported(cli->conn) && + smbXcli_tcon_is_dfs_share(tcon)) + { flags |= SMBC_VFS_FEATURE_DFS; } diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 865aaca1b4..78c2538d09 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -1862,12 +1862,14 @@ static void byte_range_lock_flush(struct byte_range_lock *br_lck) } if (br_lck->num_locks == 0) { - /* No locks - delete this entry. */ - NTSTATUS status = dbwrap_record_delete(br_lck->record); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("delete_rec returned %s\n", - nt_errstr(status))); - smb_panic("Could not delete byte range lock entry"); + if (br_lck->record) { + /* No locks and the record existed - delete this entry. */ + NTSTATUS status = dbwrap_record_delete(br_lck->record); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("delete_rec returned %s\n", + nt_errstr(status))); + smb_panic("Could not delete byte range lock entry"); + } } } else { TDB_DATA data; @@ -1932,7 +1934,12 @@ static struct byte_range_lock *brl_get_locks_internal(TALLOC_CTX *mem_ctx, if (do_read_only) { NTSTATUS status; status = dbwrap_fetch(brlock_db, br_lck, key, &data); - if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_EQUAL(status,NT_STATUS_NOT_FOUND)) { + /* + * No locks on this file. data should be empty. + */ + ZERO_STRUCT(data); + } else if (!NT_STATUS_IS_OK(status)) { DEBUG(3, ("Could not fetch byte range lock record\n")); TALLOC_FREE(br_lck); return NULL; @@ -1942,12 +1949,15 @@ static struct byte_range_lock *brl_get_locks_internal(TALLOC_CTX *mem_ctx, br_lck->record = dbwrap_fetch_locked(brlock_db, br_lck, key); if (br_lck->record == NULL) { - DEBUG(3, ("Could not lock byte range lock entry\n")); - TALLOC_FREE(br_lck); - return NULL; + /* + * We're going to assume this means no locks on + * the file, not a talloc fail. If it was a talloc + * fail we'll just have to die elsewhere. + */ + ZERO_STRUCT(data); + } else { + data = dbwrap_record_get_value(br_lck->record); } - - data = dbwrap_record_get_value(br_lck->record); } br_lck->read_only = do_read_only; diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 3ce7067673..8ba07fc64d 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -646,7 +646,8 @@ static int streams_depot_unlink(vfs_handle_struct *handle, return -1; } - if (smb_fname_base->st.st_ex_nlink == 1) { + ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname); + if (ret == 0) { char *dirname = stream_dir(handle, smb_fname_base, &smb_fname_base->st, false); @@ -656,8 +657,6 @@ static int streams_depot_unlink(vfs_handle_struct *handle, TALLOC_FREE(dirname); } - ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname); - TALLOC_FREE(smb_fname_base); return ret; } @@ -690,7 +689,8 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path) return -1; } - if (smb_fname_base->st.st_ex_nlink == 2) { + ret = SMB_VFS_NEXT_RMDIR(handle, path); + if (ret == 0) { char *dirname = stream_dir(handle, smb_fname_base, &smb_fname_base->st, false); @@ -700,8 +700,6 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path) TALLOC_FREE(dirname); } - ret = SMB_VFS_NEXT_RMDIR(handle, path); - TALLOC_FREE(smb_fname_base); return ret; } diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index b9945ac8b9..a339a1db52 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -5467,7 +5467,7 @@ int lp_min_receive_file_size(void) if (Globals.iminreceivefile < 0) { return 0; } - return MIN(Globals.iminreceivefile, BUFFER_SIZE); + return Globals.iminreceivefile; } /******************************************************************* diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 7a1f36549f..2d6bc6fcac 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -132,6 +132,31 @@ static bool print_driver_directories_init(void) } /**************************************************************************** + Forward a MSG_PRINTER_DRVUPGRADE message from another smbd to the + background lpq updater. +****************************************************************************/ + +static void forward_drv_upgrade_printer_msg(struct messaging_context *msg, + void *private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data) +{ + extern pid_t background_lpq_updater_pid; + + if (background_lpq_updater_pid == -1) { + DEBUG(3,("no background lpq queue updater\n")); + return; + } + + messaging_send_buf(msg, + pid_to_procid(background_lpq_updater_pid), + MSG_PRINTER_DRVUPGRADE, + data->data, + data->length); +} + +/**************************************************************************** Open the NT printing tdbs. Done once before fork(). ****************************************************************************/ @@ -149,10 +174,10 @@ bool nt_printing_init(struct messaging_context *msg_ctx) /* * register callback to handle updating printers as new - * drivers are installed + * drivers are installed. Forwards to background lpq updater. */ messaging_register(msg_ctx, NULL, MSG_PRINTER_DRVUPGRADE, - do_drv_upgrade_printer); + forward_drv_upgrade_printer_msg); /* of course, none of the message callbacks matter if you don't tell messages.c that you interested in receiving PRINT_GENERAL diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c index 6e02ee5f72..7e89ec4cd7 100644 --- a/source3/printing/printer_list.c +++ b/source3/printing/printer_list.c @@ -133,6 +133,7 @@ NTSTATUS printer_list_get_printer(TALLOC_CTX *mem_ctx, done: SAFE_FREE(nstr); SAFE_FREE(cstr); + SAFE_FREE(lstr); TALLOC_FREE(key); return status; } diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c index bc6c33f9a8..aa0d0fb6a8 100644 --- a/source3/printing/queue_process.c +++ b/source3/printing/queue_process.c @@ -32,6 +32,7 @@ #include "smbd/smbd.h" #include "rpc_server/rpc_config.h" #include "printing/load.h" +#include "rpc_server/spoolss/srv_spoolss_nt.h" extern pid_t start_spoolssd(struct tevent_context *ev_ctx, struct messaging_context *msg_ctx); @@ -314,6 +315,11 @@ pid_t start_background_queue(struct tevent_context *ev, bq_smb_conf_updated); messaging_register(msg_ctx, NULL, MSG_PRINTER_UPDATE, print_queue_receive); + /* Remove previous forwarder message set in parent. */ + messaging_deregister(msg_ctx, MSG_PRINTER_DRVUPGRADE, NULL); + + messaging_register(msg_ctx, NULL, MSG_PRINTER_DRVUPGRADE, + do_drv_upgrade_printer); fde = tevent_add_fd(ev, ev, pause_pipe[1], TEVENT_FD_READ, printing_pause_fd_handler, diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c index 8f182f824c..7525fd1c2b 100644 --- a/source3/printing/spoolssd.c +++ b/source3/printing/spoolssd.c @@ -33,6 +33,7 @@ #include "librpc/gen_ndr/srv_spoolss.h" #include "rpc_server/rpc_server.h" #include "rpc_server/rpc_ep_register.h" +#include "rpc_server/rpc_config.h" #include "rpc_server/spoolss/srv_spoolss_nt.h" #include "librpc/rpc/dcerpc_ep.h" #include "lib/server_prefork.h" @@ -631,6 +632,7 @@ static char *get_bq_logfile(void) pid_t start_spoolssd(struct tevent_context *ev_ctx, struct messaging_context *msg_ctx) { + enum rpc_service_mode_e epm_mode = rpc_epmapper_mode(); struct rpc_srv_callbacks spoolss_cb; struct dcerpc_binding_vector *v; TALLOC_CTX *mem_ctx; @@ -778,25 +780,28 @@ pid_t start_spoolssd(struct tevent_context *ev_ctx, exit(1); } - status = dcerpc_binding_vector_new(mem_ctx, &v); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("Failed to create binding vector (%s)\n", - nt_errstr(status))); - exit(1); - } + if (epm_mode != RPC_SERVICE_MODE_DISABLED && + (lp_parm_bool(-1, "rpc_server", "register_embedded_np", false))) { + status = dcerpc_binding_vector_new(mem_ctx, &v); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("Failed to create binding vector (%s)\n", + nt_errstr(status))); + exit(1); + } - status = dcerpc_binding_vector_add_np_default(&ndr_table_spoolss, v); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("Failed to add np to binding vector (%s)\n", - nt_errstr(status))); - exit(1); - } + status = dcerpc_binding_vector_add_np_default(&ndr_table_spoolss, v); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("Failed to add np to binding vector (%s)\n", + nt_errstr(status))); + exit(1); + } - status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_spoolss, v); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("Failed to register spoolss endpoint! (%s)\n", - nt_errstr(status))); - exit(1); + status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_spoolss, v); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("Failed to register spoolss endpoint! (%s)\n", + nt_errstr(status))); + exit(1); + } } talloc_free(mem_ctx); diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c index 78caa5bae7..f0696adbcc 100644 --- a/source3/rpc_client/rpc_transport_np.c +++ b/source3/rpc_client/rpc_transport_np.c @@ -21,12 +21,18 @@ #include "../lib/util/tevent_ntstatus.h" #include "rpc_client/rpc_transport.h" #include "libsmb/cli_np_tstream.h" +#include "client.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_CLI struct rpc_transport_np_init_state { struct rpc_cli_transport *transport; + int retries; + struct tevent_context *ev; + struct cli_state *cli; + struct timeval abs_timeout; + const char *pipe_name; }; static void rpc_transport_np_init_pipe_open(struct tevent_req *subreq); @@ -38,7 +44,6 @@ struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx, { struct tevent_req *req; struct rpc_transport_np_init_state *state; - const char *pipe_name; struct tevent_req *subreq; req = tevent_req_create(mem_ctx, &state, @@ -47,16 +52,19 @@ struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx, return NULL; } - pipe_name = get_pipe_name_from_syntax(state, abstract_syntax); - if (tevent_req_nomem(pipe_name, req)) { + state->ev = ev; + state->cli = cli; + state->abs_timeout = timeval_current_ofs_msec(cli->timeout); + state->pipe_name = get_pipe_name_from_syntax(state, abstract_syntax); + if (tevent_req_nomem(state->pipe_name, req)) { return tevent_req_post(req, ev); } - while (pipe_name[0] == '\\') { - pipe_name++; + while (state->pipe_name[0] == '\\') { + state->pipe_name++; } - subreq = tstream_cli_np_open_send(state, ev, cli, pipe_name); + subreq = tstream_cli_np_open_send(state, ev, cli, state->pipe_name); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -65,6 +73,25 @@ struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX *mem_ctx, return req; } +static void rpc_transport_np_init_pipe_open_retry(struct tevent_context *ev, + struct tevent_timer *te, + struct timeval t, + void *priv_data) +{ + struct tevent_req *subreq; + struct tevent_req *req = talloc_get_type(priv_data, struct tevent_req); + struct rpc_transport_np_init_state *state = tevent_req_data( + req, struct rpc_transport_np_init_state); + + subreq = tstream_cli_np_open_send(state, ev, state->cli, + state->pipe_name); + if (tevent_req_nomem(subreq, req)) { + return; + } + tevent_req_set_callback(subreq, rpc_transport_np_init_pipe_open, req); + state->retries++; +} + static void rpc_transport_np_init_pipe_open(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( @@ -76,7 +103,23 @@ static void rpc_transport_np_init_pipe_open(struct tevent_req *subreq) status = tstream_cli_np_open_recv(subreq, state, &stream); TALLOC_FREE(subreq); - if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_PIPE_NOT_AVAILABLE) + && (!timeval_expired(&state->abs_timeout))) { + struct tevent_timer *te; + /* + * Retry on STATUS_PIPE_NOT_AVAILABLE, Windows starts some + * servers (FssagentRpc) on demand. + */ + DEBUG(2, ("RPC pipe %s not available, retry %d\n", + state->pipe_name, state->retries)); + te = tevent_add_timer(state->ev, state, + timeval_current_ofs_msec(100 * state->retries), + rpc_transport_np_init_pipe_open_retry, req); + if (tevent_req_nomem(te, req)) { + return; + } + return; + } else if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); return; } diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 7359cb22b0..64f5cbed2f 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -1513,6 +1513,7 @@ void srv_spoolss_cleanup(void) /********************************************************************** callback to receive a MSG_PRINTER_DRVUPGRADE message and interate over all printers, upgrading ones as necessary + This is now *ONLY* called inside the background lpq updater. JRA. **********************************************************************/ void do_drv_upgrade_printer(struct messaging_context *msg, diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 894f12c2e9..7daff04f2a 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -1561,24 +1561,16 @@ static bool process_request_pdu(struct pipes_struct *p, struct ncacn_packet *pkt } } - if (pkt->pfc_flags & DCERPC_PFC_FLAG_LAST) { - bool ret = False; - /* - * Ok - we finally have a complete RPC stream. - * Call the rpc command to process it. - */ - - /* - * Process the complete data stream here. - */ - if (pipe_init_outgoing_data(p)) { - ret = api_pipe_request(p, pkt); - } - - return ret; + if (!(pkt->pfc_flags & DCERPC_PFC_FLAG_LAST)) { + return true; } - return True; + /* + * Ok - we finally have a complete RPC stream. + * Call the rpc command to process it. + */ + + return api_pipe_request(p, pkt); } /**************************************************************************** @@ -1626,6 +1618,10 @@ void process_complete_pdu(struct pipes_struct *p) DEBUG(10, ("Processing packet type %u\n", (unsigned int)pkt->ptype)); + if (!pipe_init_outgoing_data(p)) { + goto done; + } + switch (pkt->ptype) { case DCERPC_PKT_REQUEST: reply = process_request_pdu(p, pkt); @@ -1658,9 +1654,7 @@ void process_complete_pdu(struct pipes_struct *p) /* * We assume that a pipe bind is only in one pdu. */ - if (pipe_init_outgoing_data(p)) { - reply = api_pipe_bind_req(p, pkt); - } + reply = api_pipe_bind_req(p, pkt); break; case DCERPC_PKT_BIND_ACK: @@ -1675,9 +1669,7 @@ void process_complete_pdu(struct pipes_struct *p) /* * We assume that a pipe bind is only in one pdu. */ - if (pipe_init_outgoing_data(p)) { - reply = api_pipe_alter_context(p, pkt); - } + reply = api_pipe_alter_context(p, pkt); break; case DCERPC_PKT_ALTER_RESP: @@ -1689,9 +1681,7 @@ void process_complete_pdu(struct pipes_struct *p) /* * The third packet in an auth exchange. */ - if (pipe_init_outgoing_data(p)) { - reply = api_pipe_bind_auth3(p, pkt); - } + reply = api_pipe_bind_auth3(p, pkt); break; case DCERPC_PKT_SHUTDOWN: diff --git a/source3/rpcclient/cmd_fss.c b/source3/rpcclient/cmd_fss.c index af194e2f87..972fe9dbd4 100644 --- a/source3/rpcclient/cmd_fss.c +++ b/source3/rpcclient/cmd_fss.c @@ -88,7 +88,7 @@ static NTSTATUS cmd_fss_is_path_sup(struct rpc_pipe_client *cli, } ZERO_STRUCT(r); - r.in.ShareName = talloc_asprintf(mem_ctx, "%s\\%s", + r.in.ShareName = talloc_asprintf(mem_ctx, "%s\\%s\\", cli->srv_name_slash, argv[1]); if (r.in.ShareName == NULL) { return NT_STATUS_NO_MEMORY; @@ -187,8 +187,24 @@ static NTSTATUS cmd_fss_create_expose_parse(TALLOC_CTX *mem_ctx, int argc, } for (i = 0; i < num_share_args; i++) { - map_array[i].ShareNameUNC = talloc_asprintf(mem_ctx, "\\\\%s\\%s", - desthost, argv[i + num_non_share_args]); + /* + * A trailing slash should to be present in the request UNC, + * otherwise Windows Server 2012 FSRVP servers don't append + * a '$' to exposed hidden share shadow-copies. E.g. + * AddToShadowCopySet(UNC=\\server\hidden$) + * CommitShadowCopySet() + * ExposeShadowCopySet() + * -> new share = \\server\hidden$@{ShadowCopy.ShadowCopyId} + * But... + * AddToShadowCopySet(UNC=\\server\hidden$\) + * CommitShadowCopySet() + * ExposeShadowCopySet() + * -> new share = \\server\hidden$@{ShadowCopy.ShadowCopyId}$ + */ + map_array[i].ShareNameUNC = talloc_asprintf(mem_ctx, + "\\\\%s\\%s\\", + desthost, + argv[i + num_non_share_args]); if (map_array[i].ShareNameUNC == NULL) { return NT_STATUS_NO_MEMORY; } @@ -199,6 +215,24 @@ static NTSTATUS cmd_fss_create_expose_parse(TALLOC_CTX *mem_ctx, int argc, return NT_STATUS_OK; } +static NTSTATUS cmd_fss_abort(TALLOC_CTX *mem_ctx, + struct dcerpc_binding_handle *b, + struct GUID *sc_set_id) +{ + NTSTATUS status; + struct fss_AbortShadowCopySet r_scset_abort; + + ZERO_STRUCT(r_scset_abort); + r_scset_abort.in.ShadowCopySetId = *sc_set_id; + status = dcerpc_fss_AbortShadowCopySet_r(b, mem_ctx, &r_scset_abort); + if (!NT_STATUS_IS_OK(status) || (r_scset_abort.out.result != 0)) { + DEBUG(0, ("AbortShadowCopySet failed: %s result: 0x%x\n", + nt_errstr(status), r_scset_abort.out.result)); + return NT_STATUS_UNSUCCESSFUL; + } + return NT_STATUS_OK; +} + static NTSTATUS cmd_fss_create_expose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, const char **argv) @@ -292,7 +326,7 @@ static NTSTATUS cmd_fss_create_expose(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(status) || (r_scset_add.out.result != 0)) { DEBUG(0, ("AddToShadowCopySet failed: %s result: 0x%x\n", nt_errstr(status), r_scset_add.out.result)); - goto err_out; + goto err_sc_set_abort; } printf("%s(%s): %s shadow-copy added to set\n", GUID_string(tmp_ctx, r_scset_start.out.pShadowCopySetId), @@ -310,7 +344,7 @@ static NTSTATUS cmd_fss_create_expose(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(status) || (r_scset_prep.out.result != 0)) { DEBUG(0, ("PrepareShadowCopySet failed: %s result: 0x%x\n", nt_errstr(status), r_scset_prep.out.result)); - goto err_out; + goto err_sc_set_abort; } printf("%s: prepare completed in %llu secs\n", GUID_string(tmp_ctx, r_scset_start.out.pShadowCopySetId), @@ -324,7 +358,7 @@ static NTSTATUS cmd_fss_create_expose(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(status) || (r_scset_commit.out.result != 0)) { DEBUG(0, ("CommitShadowCopySet failed: %s result: 0x%x\n", nt_errstr(status), r_scset_commit.out.result)); - goto err_out; + goto err_sc_set_abort; } printf("%s: commit completed in %llu secs\n", GUID_string(tmp_ctx, r_scset_start.out.pShadowCopySetId), @@ -360,6 +394,11 @@ static NTSTATUS cmd_fss_create_expose(struct rpc_pipe_client *cli, map->ShadowCopyShareName, map->ShareNameUNC); } + talloc_free(tmp_ctx); + return NT_STATUS_OK; + +err_sc_set_abort: + cmd_fss_abort(tmp_ctx, b, r_scset_start.out.pShadowCopySetId); err_out: talloc_free(tmp_ctx); return status; @@ -395,7 +434,7 @@ static NTSTATUS cmd_fss_delete(struct rpc_pipe_client *cli, } ZERO_STRUCT(r_sharemap_del); - r_sharemap_del.in.ShareName = talloc_asprintf(tmp_ctx, "\\\\%s\\%s", + r_sharemap_del.in.ShareName = talloc_asprintf(tmp_ctx, "\\\\%s\\%s\\", cli->desthost, argv[1]); if (r_sharemap_del.in.ShareName == NULL) { status = NT_STATUS_NO_MEMORY; @@ -449,7 +488,7 @@ static NTSTATUS cmd_fss_is_shadow_copied(struct rpc_pipe_client *cli, } ZERO_STRUCT(r); - r.in.ShareName = talloc_asprintf(mem_ctx, "%s\\%s", + r.in.ShareName = talloc_asprintf(mem_ctx, "%s\\%s\\", cli->srv_name_slash, argv[1]); if (r.in.ShareName == NULL) { return NT_STATUS_NO_MEMORY; @@ -504,7 +543,7 @@ static NTSTATUS cmd_fss_get_mapping(struct rpc_pipe_client *cli, } ZERO_STRUCT(r_sharemap_get); - r_sharemap_get.in.ShareName = talloc_asprintf(tmp_ctx, "\\\\%s\\%s", + r_sharemap_get.in.ShareName = talloc_asprintf(tmp_ctx, "\\\\%s\\%s\\", cli->desthost, argv[1]); if (r_sharemap_get.in.ShareName == NULL) { status = NT_STATUS_NO_MEMORY; diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index df0e52488d..1286ced231 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -633,6 +633,7 @@ struct user_struct { }; struct smbd_server_connection { + NTSTATUS status; int sock; const struct tsocket_address *local_address; const struct tsocket_address *remote_address; diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 91d5047c4c..dbb259cedc 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -109,12 +109,14 @@ void send_trans_reply(connection_struct *conn, int lparam = rparam ? rparam_len : 0; struct smbd_server_connection *sconn = req->sconn; int max_send = sconn->smb1.sessions.max_send; + /* HACK: make sure we send at least 128 byte in one go */ + int hdr_overhead = SMB_BUFFER_SIZE_MIN - 128; if (buffer_too_large) DEBUG(5,("send_trans_reply: buffer %d too large\n", ldata )); - this_lparam = MIN(lparam,max_send - 500); /* hack */ - this_ldata = MIN(ldata,max_send - (500+this_lparam)); + this_lparam = MIN(lparam,max_send - hdr_overhead); + this_ldata = MIN(ldata,max_send - (hdr_overhead+this_lparam)); align = ((this_lparam)%4); @@ -163,9 +165,9 @@ void send_trans_reply(connection_struct *conn, while (tot_data_sent < ldata || tot_param_sent < lparam) { this_lparam = MIN(lparam-tot_param_sent, - max_send - 500); /* hack */ + max_send - hdr_overhead); this_ldata = MIN(ldata -tot_data_sent, - max_send - (500+this_lparam)); + max_send - (hdr_overhead+this_lparam)); if(this_lparam < 0) this_lparam = 0; diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 52a2a4852e..096a3a09c9 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -221,9 +221,11 @@ static NTSTATUS parse_dfs_path(connection_struct *conn, Fake up a connection struct for the VFS layer, for use in applications (such as the python bindings), that do not want the global working directory changed under them. + + SMB_VFS_CONNECT requires root privileges. *********************************************************/ -NTSTATUS create_conn_struct(TALLOC_CTX *ctx, +static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx, struct tevent_context *ev, struct messaging_context *msg, connection_struct **pconn, @@ -347,6 +349,33 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx, } /******************************************************** + Fake up a connection struct for the VFS layer, for use in + applications (such as the python bindings), that do not want the + global working directory changed under them. + + SMB_VFS_CONNECT requires root privileges. +*********************************************************/ + +NTSTATUS create_conn_struct(TALLOC_CTX *ctx, + struct tevent_context *ev, + struct messaging_context *msg, + connection_struct **pconn, + int snum, + const char *path, + const struct auth_session_info *session_info) +{ + NTSTATUS status; + become_root(); + status = create_conn_struct_as_root(ctx, ev, + msg, pconn, + snum, path, + session_info); + unbecome_root(); + + return status; +} + +/******************************************************** Fake up a connection struct for the VFS layer. Note: this performs a vfs connect and CHANGES CWD !!!! JRA. diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 706d701e13..45bde2f085 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -152,6 +152,13 @@ bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer, ssize_t ret; char *buf_out = buffer; + if (!NT_STATUS_IS_OK(sconn->status)) { + /* + * we're not supposed to do any io + */ + return true; + } + smbd_lock_socket(sconn); if (do_signing) { @@ -237,7 +244,7 @@ static bool valid_packet_size(size_t len) * of header. Don't print the error if this fits.... JRA. */ - if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) { + if (len > (LARGE_WRITEX_BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) { DEBUG(0,("Invalid packet length! (%lu bytes).\n", (unsigned long)len)); return false; @@ -2442,6 +2449,15 @@ static void smbd_server_connection_handler(struct tevent_context *ev, struct smbd_server_connection *conn = talloc_get_type(private_data, struct smbd_server_connection); + if (!NT_STATUS_IS_OK(conn->status)) { + /* + * we're not supposed to do any io + */ + TEVENT_FD_NOT_READABLE(conn->smb1.fde); + TEVENT_FD_NOT_WRITEABLE(conn->smb1.fde); + return; + } + if (flags & TEVENT_FD_WRITE) { smbd_server_connection_write_handler(conn); return; @@ -2460,6 +2476,15 @@ static void smbd_server_echo_handler(struct tevent_context *ev, struct smbd_server_connection *conn = talloc_get_type(private_data, struct smbd_server_connection); + if (!NT_STATUS_IS_OK(conn->status)) { + /* + * we're not supposed to do any io + */ + TEVENT_FD_NOT_READABLE(conn->smb1.echo_handler.trusted_fde); + TEVENT_FD_NOT_WRITEABLE(conn->smb1.echo_handler.trusted_fde); + return; + } + if (flags & TEVENT_FD_WRITE) { smbd_server_connection_write_handler(conn); return; @@ -2475,13 +2500,32 @@ static void smbd_server_echo_handler(struct tevent_context *ev, struct smbd_release_ip_state { struct smbd_server_connection *sconn; + struct tevent_immediate *im; char addr[INET6_ADDRSTRLEN]; }; +static void smbd_release_ip_immediate(struct tevent_context *ctx, + struct tevent_immediate *im, + void *private_data) +{ + struct smbd_release_ip_state *state = + talloc_get_type_abort(private_data, + struct smbd_release_ip_state); + + if (!NT_STATUS_EQUAL(state->sconn->status, NT_STATUS_ADDRESS_CLOSED)) { + /* + * smbd_server_connection_terminate() already triggered ? + */ + return; + } + + smbd_server_connection_terminate(state->sconn, "CTDB_SRVID_RELEASE_IP"); +} + /**************************************************************************** received when we should release a specific IP ****************************************************************************/ -static void release_ip(const char *ip, void *priv) +static bool release_ip(const char *ip, void *priv) { struct smbd_release_ip_state *state = talloc_get_type_abort(priv, @@ -2489,6 +2533,11 @@ static void release_ip(const char *ip, void *priv) const char *addr = state->addr; const char *p = addr; + if (!NT_STATUS_IS_OK(state->sconn->status)) { + /* avoid recursion */ + return false; + } + if (strncmp("::ffff:", addr, 7) == 0) { p = addr + 7; } @@ -2515,11 +2564,22 @@ static void release_ip(const char *ip, void *priv) * triggered and has implication on our process model, * we can just use smbd_server_connection_terminate() * (also for SMB1). + * + * We don't call smbd_server_connection_terminate() directly + * as we might be called from within ctdbd_migrate(), + * we need to defer our action to the next event loop */ - smbd_server_connection_terminate(state->sconn, - "CTDB_SRVID_RELEASE_IP"); - return; + tevent_schedule_immediate(state->im, state->sconn->ev_ctx, + smbd_release_ip_immediate, state); + + /* + * Make sure we don't get any io on the connection. + */ + state->sconn->status = NT_STATUS_ADDRESS_CLOSED; + return true; } + + return false; } static NTSTATUS smbd_register_ips(struct smbd_server_connection *sconn, @@ -2539,6 +2599,10 @@ static NTSTATUS smbd_register_ips(struct smbd_server_connection *sconn, return NT_STATUS_NO_MEMORY; } state->sconn = sconn; + state->im = tevent_create_immediate(state); + if (state->im == NULL) { + return NT_STATUS_NO_MEMORY; + } if (print_sockaddr(state->addr, sizeof(state->addr), srv) == NULL) { return NT_STATUS_NO_MEMORY; } @@ -3303,6 +3367,7 @@ void smbd_process(struct tevent_context *ev_ctx, const char *remaddr = NULL; char *rhost; int ret; + int tmp; conn = talloc_zero(ev_ctx, struct smbXsrv_connection); if (conn == NULL) { @@ -3591,10 +3656,14 @@ void smbd_process(struct tevent_context *ev_ctx, sconn->nbt.got_session = false; - sconn->smb1.negprot.max_recv = MIN(lp_max_xmit(),BUFFER_SIZE); + tmp = lp_max_xmit(); + tmp = MAX(tmp, SMB_BUFFER_SIZE_MIN); + tmp = MIN(tmp, SMB_BUFFER_SIZE_MAX); + + sconn->smb1.negprot.max_recv = tmp; sconn->smb1.sessions.done_sesssetup = false; - sconn->smb1.sessions.max_send = BUFFER_SIZE; + sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX; if (!init_dptrs(sconn)) { exit_server("init_dptrs() failed"); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 6b926fb111..055efd377a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1698,11 +1698,10 @@ void reply_search(struct smb_request *req) } } else { unsigned int i; - maxentries = MIN( - maxentries, - ((BUFFER_SIZE - - ((uint8 *)smb_buf(req->outbuf) + 3 - req->outbuf)) - /DIR_STRUCT_SIZE)); + size_t hdr_size = ((uint8_t *)smb_buf(req->outbuf) + 3 - req->outbuf); + size_t available_space = sconn->smb1.sessions.max_send - hdr_size; + + maxentries = MIN(maxentries, available_space/DIR_STRUCT_SIZE); DEBUG(8,("dirpath=<%s> dontdescend=<%s>\n", directory,lp_dontdescend(ctx, SNUM(conn)))); @@ -3470,6 +3469,7 @@ void reply_lockread(struct smb_request *req) char *data; off_t startpos; size_t numtoread; + size_t maxtoread; NTSTATUS status; files_struct *fsp; struct byte_range_lock *br_lck = NULL; @@ -3500,18 +3500,12 @@ void reply_lockread(struct smb_request *req) numtoread = SVAL(req->vwv+1, 0); startpos = IVAL_TO_SMB_OFF_T(req->vwv+2, 0); - numtoread = MIN(BUFFER_SIZE - (smb_size + 3*2 + 3), numtoread); - - reply_outbuf(req, 5, numtoread + 3); - - data = smb_buf(req->outbuf) + 3; - /* * NB. Discovered by Menny Hamburger at Mainsoft. This is a core+ * protocol request that predates the read/write lock concept. * Thus instead of asking for a read lock here we need to ask * for a write lock. JRA. - * Note that the requested lock size is unaffected by max_recv. + * Note that the requested lock size is unaffected by max_send. */ br_lck = do_lock(req->sconn->msg_ctx, @@ -3534,16 +3528,22 @@ void reply_lockread(struct smb_request *req) } /* - * However the requested READ size IS affected by max_recv. Insanity.... JRA. + * However the requested READ size IS affected by max_send. Insanity.... JRA. */ + maxtoread = sconn->smb1.sessions.max_send - (smb_size + 5*2 + 3); - if (numtoread > sconn->smb1.negprot.max_recv) { - DEBUG(0,("reply_lockread: requested read size (%u) is greater than maximum allowed (%u). \ + if (numtoread > maxtoread) { + DEBUG(0,("reply_lockread: requested read size (%u) is greater than maximum allowed (%u/%u). \ Returning short read of maximum allowed for compatibility with Windows 2000.\n", - (unsigned int)numtoread, - (unsigned int)sconn->smb1.negprot.max_recv)); - numtoread = MIN(numtoread, sconn->smb1.negprot.max_recv); + (unsigned int)numtoread, (unsigned int)maxtoread, + (unsigned int)sconn->smb1.sessions.max_send)); + numtoread = maxtoread; } + + reply_outbuf(req, 5, numtoread + 3); + + data = smb_buf(req->outbuf) + 3; + nread = read_file(fsp,data,startpos,numtoread); if (nread < 0) { @@ -3578,10 +3578,10 @@ void reply_read(struct smb_request *req) { connection_struct *conn = req->conn; size_t numtoread; + size_t maxtoread; ssize_t nread = 0; char *data; off_t startpos; - int outsize = 0; files_struct *fsp; struct lock_struct lock; struct smbd_server_connection *sconn = req->sconn; @@ -3610,17 +3610,17 @@ void reply_read(struct smb_request *req) numtoread = SVAL(req->vwv+1, 0); startpos = IVAL_TO_SMB_OFF_T(req->vwv+2, 0); - numtoread = MIN(BUFFER_SIZE-outsize,numtoread); - /* - * The requested read size cannot be greater than max_recv. JRA. + * The requested read size cannot be greater than max_send. JRA. */ - if (numtoread > sconn->smb1.negprot.max_recv) { - DEBUG(0,("reply_read: requested read size (%u) is greater than maximum allowed (%u). \ + maxtoread = sconn->smb1.sessions.max_send - (smb_size + 5*2 + 3); + + if (numtoread > maxtoread) { + DEBUG(0,("reply_read: requested read size (%u) is greater than maximum allowed (%u/%u). \ Returning short read of maximum allowed for compatibility with Windows 2000.\n", - (unsigned int)numtoread, - (unsigned int)sconn->smb1.negprot.max_recv)); - numtoread = MIN(numtoread, sconn->smb1.negprot.max_recv); + (unsigned int)numtoread, (unsigned int)maxtoread, + (unsigned int)sconn->smb1.sessions.max_send)); + numtoread = maxtoread; } reply_outbuf(req, 5, numtoread+3); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index d3cd33ec90..1f553e7ecd 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -455,6 +455,13 @@ static void remove_child_pid(struct smbd_parent_context *parent, parent); DEBUG(1,("Scheduled cleanup of brl and lock database after unclean shutdown\n")); } + + /* + * Ensure we flush any stored messages + * queued for the child process that + * terminated uncleanly. + */ + messaging_cleanup_server(parent->msg_ctx, child_id); } if (!serverid_deregister(child_id)) { diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index dfa2b1dacb..3bfa2bcfc1 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -99,13 +99,22 @@ static void exit_server_common(enum server_exit_reason how, change_to_root_user(); - if (sconn && sconn->smb1.negprot.auth_context) { - TALLOC_FREE(sconn->smb1.negprot.auth_context); - } - if (sconn) { NTSTATUS status; + if (NT_STATUS_IS_OK(sconn->status)) { + switch (how) { + case SERVER_EXIT_ABNORMAL: + sconn->status = NT_STATUS_INTERNAL_ERROR; + break; + case SERVER_EXIT_NORMAL: + sconn->status = NT_STATUS_LOCAL_DISCONNECT; + break; + } + } + + TALLOC_FREE(sconn->smb1.negprot.auth_context); + if (lp_log_writeable_files_on_exit()) { bool found = false; files_forall(sconn, log_writeable_file_fn, &found); diff --git a/source3/smbd/service.c b/source3/smbd/service.c index a7464f0722..7d06551ffb 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -614,11 +614,19 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn, } /* - * Set up the share security descriptor + * Set up the share security descriptor. + * NOTE - we use the *INCOMING USER* session_info + * here, as does (indirectly) change_to_user(), + * which can be called on any incoming packet. + * This way we set up the share access based + * on the authenticated user, not the forced + * user. See bug: + * + * https://bugzilla.samba.org/show_bug.cgi?id=9878 */ status = check_user_share_access(conn, - conn->session_info, + vuser->session_info, &conn->share_access, &conn->read_only); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 4728759c6c..512832847c 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -379,10 +379,13 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req) } if (!sconn->smb1.sessions.done_sesssetup) { - sconn->smb1.sessions.max_send = - MIN(sconn->smb1.sessions.max_send,smb_bufsize); + if (smb_bufsize < SMB_BUFFER_SIZE_MIN) { + reply_force_doserror(req, ERRSRV, ERRerror); + return; + } + sconn->smb1.sessions.max_send = smb_bufsize; + sconn->smb1.sessions.done_sesssetup = true; } - sconn->smb1.sessions.done_sesssetup = true; /* current_user_info is changed on new vuid */ reload_services(sconn, conn_snum_used, true); @@ -1084,10 +1087,14 @@ void reply_sesssetup_and_X(struct smb_request *req) req->vuid = sess_vuid; if (!sconn->smb1.sessions.done_sesssetup) { - sconn->smb1.sessions.max_send = - MIN(sconn->smb1.sessions.max_send,smb_bufsize); + if (smb_bufsize < SMB_BUFFER_SIZE_MIN) { + reply_force_doserror(req, ERRSRV, ERRerror); + END_PROFILE(SMBsesssetupX); + return; + } + sconn->smb1.sessions.max_send = smb_bufsize; + sconn->smb1.sessions.done_sesssetup = true; } - sconn->smb1.sessions.done_sesssetup = true; END_PROFILE(SMBsesssetupX); } diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c index 671cd6f066..2ee7afa5d6 100644 --- a/source3/smbd/smb2_lock.c +++ b/source3/smbd/smb2_lock.c @@ -368,23 +368,43 @@ static NTSTATUS smbd_smb2_lock_recv(struct tevent_req *req) static bool smbd_smb2_lock_cancel(struct tevent_req *req) { - struct smbd_smb2_request *smb2req = NULL; - struct smbd_smb2_lock_state *state = tevent_req_data(req, - struct smbd_smb2_lock_state); - if (!state) { - return false; - } + struct smbd_smb2_request *smb2req = NULL; + struct smbd_smb2_lock_state *state = tevent_req_data(req, + struct smbd_smb2_lock_state); + if (!state) { + return false; + } - if (!state->smb2req) { - return false; - } + if (!state->smb2req) { + return false; + } - smb2req = state->smb2req; + smb2req = state->smb2req; remove_pending_lock(state, state->blr); tevent_req_defer_callback(req, smb2req->sconn->ev_ctx); + + /* + * If the request is canceled because of logoff, tdis or close + * the status is NT_STATUS_RANGE_NOT_LOCKED instead of + * NT_STATUS_CANCELLED. + * + * Note that the close case is handled in + * cancel_pending_lock_requests_by_fid_smb2(SHUTDOWN_CLOSE) + * for now. + */ + if (!NT_STATUS_IS_OK(smb2req->session->status)) { + tevent_req_nterror(req, NT_STATUS_RANGE_NOT_LOCKED); + return true; + } + + if (!NT_STATUS_IS_OK(smb2req->tcon->status)) { + tevent_req_nterror(req, NT_STATUS_RANGE_NOT_LOCKED); + return true; + } + tevent_req_nterror(req, NT_STATUS_CANCELLED); - return true; + return true; } /**************************************************************** diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index e5f7de3382..58eddee54a 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -2841,6 +2841,13 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct smbd_server_connection *s size_t max_send_queue_len; size_t cur_send_queue_len; + if (!NT_STATUS_IS_OK(sconn->status)) { + /* + * we're not supposed to do any io + */ + return NT_STATUS_OK; + } + if (state->req != NULL) { /* * if there is already a tstream_readv_pdu @@ -3085,6 +3092,15 @@ static NTSTATUS smbd_smb2_io_handler(struct smbd_server_connection *sconn, NTSTATUS status; NTTIME now; + if (!NT_STATUS_IS_OK(sconn->status)) { + /* + * we're not supposed to do any io + */ + TEVENT_FD_NOT_READABLE(sconn->smb2.fde); + TEVENT_FD_NOT_WRITEABLE(sconn->smb2.fde); + return NT_STATUS_OK; + } + if (fde_flags & TEVENT_FD_WRITE) { status = smbd_smb2_flush_send_queue(sconn); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 265f802021..e911945fb6 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -28,6 +28,7 @@ #include "../lib/tsocket/tsocket.h" #include "../libcli/security/security.h" #include "../lib/util/tevent_ntstatus.h" +#include "lib/smbd_tevent_queue.h" static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, @@ -751,44 +752,190 @@ static NTSTATUS smbd_smb2_session_setup_recv(struct tevent_req *req, return status; } +static struct tevent_req *smbd_smb2_logoff_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct smbd_smb2_request *smb2req); +static NTSTATUS smbd_smb2_logoff_recv(struct tevent_req *req); +static void smbd_smb2_request_logoff_done(struct tevent_req *subreq); + NTSTATUS smbd_smb2_request_process_logoff(struct smbd_smb2_request *req) { NTSTATUS status; - DATA_BLOB outbody; + struct tevent_req *subreq = NULL; status = smbd_smb2_request_verify_sizes(req, 0x04); if (!NT_STATUS_IS_OK(status)) { return smbd_smb2_request_error(req, status); } + subreq = smbd_smb2_logoff_send(req, req->sconn->ev_ctx, req); + if (subreq == NULL) { + return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); + } + tevent_req_set_callback(subreq, smbd_smb2_request_logoff_done, req); + /* - * TODO: cancel all outstanding requests on the session + * Wait a long time before going async on this to allow + * requests we're waiting on to finish. Set timeout to 10 secs. */ - status = smbXsrv_session_logoff(req->session); + return smbd_smb2_request_pending_queue(req, subreq, 10000000); +} + +static void smbd_smb2_request_logoff_done(struct tevent_req *subreq) +{ + struct smbd_smb2_request *smb2req = + tevent_req_callback_data(subreq, + struct smbd_smb2_request); + DATA_BLOB outbody; + NTSTATUS status; + NTSTATUS error; + + status = smbd_smb2_logoff_recv(subreq); + TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("smbd_smb2_request_process_logoff: " - "smbXsrv_session_logoff() failed: %s\n", - nt_errstr(status))); + error = smbd_smb2_request_error(smb2req, status); + if (!NT_STATUS_IS_OK(error)) { + smbd_server_connection_terminate(smb2req->sconn, + nt_errstr(error)); + return; + } + return; + } + + outbody = data_blob_talloc(smb2req->out.vector, NULL, 0x04); + if (outbody.data == NULL) { + error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); + if (!NT_STATUS_IS_OK(error)) { + smbd_server_connection_terminate(smb2req->sconn, + nt_errstr(error)); + return; + } + return; + } + + SSVAL(outbody.data, 0x00, 0x04); /* struct size */ + SSVAL(outbody.data, 0x02, 0); /* reserved */ + + error = smbd_smb2_request_done(smb2req, outbody, NULL); + if (!NT_STATUS_IS_OK(error)) { + smbd_server_connection_terminate(smb2req->sconn, + nt_errstr(error)); + return; + } +} + +struct smbd_smb2_logout_state { + struct smbd_smb2_request *smb2req; + struct tevent_queue *wait_queue; +}; + +static void smbd_smb2_logoff_wait_done(struct tevent_req *subreq); + +static struct tevent_req *smbd_smb2_logoff_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct smbd_smb2_request *smb2req) +{ + struct tevent_req *req; + struct smbd_smb2_logout_state *state; + struct tevent_req *subreq; + struct smbd_smb2_request *preq; + + req = tevent_req_create(mem_ctx, &state, + struct smbd_smb2_logout_state); + if (req == NULL) { + return NULL; + } + state->smb2req = smb2req; + + state->wait_queue = tevent_queue_create(state, "logoff_wait_queue"); + if (tevent_req_nomem(state->wait_queue, req)) { + return tevent_req_post(req, ev); + } + + /* + * Make sure that no new request will be able to use this session. + */ + smb2req->session->status = NT_STATUS_USER_SESSION_DELETED; + + for (preq = smb2req->sconn->smb2.requests; preq != NULL; preq = preq->next) { + if (preq == smb2req) { + /* Can't cancel current request. */ + continue; + } + if (preq->session != smb2req->session) { + /* Request on different session. */ + continue; + } + + /* + * Never cancel anything in a compound + * request. Way too hard to deal with + * the result. + */ + if (!preq->compound_related && preq->subreq != NULL) { + tevent_req_cancel(preq->subreq); + } + /* - * If we hit this case, there is something completely - * wrong, so we better disconnect the transport connection. + * Now wait until the request is finished. + * + * We don't set a callback, as we just want to block the + * wait queue and the talloc_free() of the request will + * remove the item from the wait queue. */ - return status; + subreq = smbd_tevent_queue_wait_send(preq, ev, state->wait_queue); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } } /* - * we may need to sign the response, so we need to keep - * the session until the response is sent to the wire. + * Now we add our own waiter to the end of the queue, + * this way we get notified when all pending requests are finished + * and send to the socket. + */ + subreq = smbd_tevent_queue_wait_send(state, ev, state->wait_queue); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, smbd_smb2_logoff_wait_done, req); + + return req; +} + +static void smbd_smb2_logoff_wait_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct smbd_smb2_logout_state *state = tevent_req_data( + req, struct smbd_smb2_logout_state); + NTSTATUS status; + + smbd_tevent_queue_wait_recv(subreq); + TALLOC_FREE(subreq); + + /* + * As we've been awoken, we may have changed + * uid in the meantime. Ensure we're still + * root (SMB2_OP_LOGOFF has .as_root = true). */ - talloc_steal(req, req->session); + change_to_root_user(); - outbody = data_blob_talloc(req->out.vector, NULL, 0x04); - if (outbody.data == NULL) { - return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); + status = smbXsrv_session_logoff(state->smb2req->session); + if (tevent_req_nterror(req, status)) { + return; } - SSVAL(outbody.data, 0x00, 0x04); /* struct size */ - SSVAL(outbody.data, 0x02, 0); /* reserved */ + /* + * we may need to sign the response, so we need to keep + * the session until the response is sent to the wire. + */ + talloc_steal(state->smb2req, state->smb2req->session); + + tevent_req_done(req); +} - return smbd_smb2_request_done(req, outbody, NULL); +static NTSTATUS smbd_smb2_logoff_recv(struct tevent_req *req) +{ + return tevent_req_simple_recv_ntstatus(req); } diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c index ca67461e8d..ef2e318b24 100644 --- a/source3/smbd/smb2_tcon.c +++ b/source3/smbd/smb2_tcon.c @@ -26,6 +26,7 @@ #include "auth.h" #include "lib/param/loadparm.h" #include "../lib/util/tevent_ntstatus.h" +#include "lib/smbd_tevent_queue.h" static struct tevent_req *smbd_smb2_tree_connect_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, @@ -411,40 +412,187 @@ static NTSTATUS smbd_smb2_tree_connect_recv(struct tevent_req *req, return NT_STATUS_OK; } +static struct tevent_req *smbd_smb2_tdis_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct smbd_smb2_request *smb2req); +static NTSTATUS smbd_smb2_tdis_recv(struct tevent_req *req); +static void smbd_smb2_request_tdis_done(struct tevent_req *subreq); + NTSTATUS smbd_smb2_request_process_tdis(struct smbd_smb2_request *req) { NTSTATUS status; - DATA_BLOB outbody; + struct tevent_req *subreq = NULL; status = smbd_smb2_request_verify_sizes(req, 0x04); if (!NT_STATUS_IS_OK(status)) { return smbd_smb2_request_error(req, status); } + subreq = smbd_smb2_tdis_send(req, req->sconn->ev_ctx, req); + if (subreq == NULL) { + return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); + } + tevent_req_set_callback(subreq, smbd_smb2_request_tdis_done, req); + /* - * TODO: cancel all outstanding requests on the tcon + * Wait a long time before going async on this to allow + * requests we're waiting on to finish. Set timeout to 10 secs. */ - status = smbXsrv_tcon_disconnect(req->tcon, req->tcon->compat->vuid); + return smbd_smb2_request_pending_queue(req, subreq, 10000000); +} + +static void smbd_smb2_request_tdis_done(struct tevent_req *subreq) +{ + struct smbd_smb2_request *smb2req = + tevent_req_callback_data(subreq, + struct smbd_smb2_request); + DATA_BLOB outbody; + NTSTATUS status; + NTSTATUS error; + + status = smbd_smb2_tdis_recv(subreq); + TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("smbd_smb2_request_process_tdis: " - "smbXsrv_tcon_disconnect() failed: %s\n", - nt_errstr(status))); - /* - * If we hit this case, there is something completely - * wrong, so we better disconnect the transport connection. - */ - return status; + error = smbd_smb2_request_error(smb2req, status); + if (!NT_STATUS_IS_OK(error)) { + smbd_server_connection_terminate(smb2req->sconn, + nt_errstr(error)); + return; + } + return; } - TALLOC_FREE(req->tcon); - - outbody = data_blob_talloc(req->out.vector, NULL, 0x04); + outbody = data_blob_talloc(smb2req->out.vector, NULL, 0x04); if (outbody.data == NULL) { - return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY); + error = smbd_smb2_request_error(smb2req, NT_STATUS_NO_MEMORY); + if (!NT_STATUS_IS_OK(error)) { + smbd_server_connection_terminate(smb2req->sconn, + nt_errstr(error)); + return; + } + return; } SSVAL(outbody.data, 0x00, 0x04); /* struct size */ SSVAL(outbody.data, 0x02, 0); /* reserved */ - return smbd_smb2_request_done(req, outbody, NULL); + error = smbd_smb2_request_done(smb2req, outbody, NULL); + if (!NT_STATUS_IS_OK(error)) { + smbd_server_connection_terminate(smb2req->sconn, + nt_errstr(error)); + return; + } +} + +struct smbd_smb2_tdis_state { + struct smbd_smb2_request *smb2req; + struct tevent_queue *wait_queue; +}; + +static void smbd_smb2_tdis_wait_done(struct tevent_req *subreq); + +static struct tevent_req *smbd_smb2_tdis_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct smbd_smb2_request *smb2req) +{ + struct tevent_req *req; + struct smbd_smb2_tdis_state *state; + struct tevent_req *subreq; + struct smbd_smb2_request *preq; + + req = tevent_req_create(mem_ctx, &state, + struct smbd_smb2_tdis_state); + if (req == NULL) { + return NULL; + } + state->smb2req = smb2req; + + state->wait_queue = tevent_queue_create(state, "tdis_wait_queue"); + if (tevent_req_nomem(state->wait_queue, req)) { + return tevent_req_post(req, ev); + } + + /* + * Make sure that no new request will be able to use this tcon. + */ + smb2req->tcon->status = NT_STATUS_NETWORK_NAME_DELETED; + + for (preq = smb2req->sconn->smb2.requests; preq != NULL; preq = preq->next) { + if (preq == smb2req) { + /* Can't cancel current request. */ + continue; + } + if (preq->tcon != smb2req->tcon) { + /* Request on different tcon. */ + continue; + } + + /* + * Never cancel anything in a compound + * request. Way too hard to deal with + * the result. + */ + if (!preq->compound_related && preq->subreq != NULL) { + tevent_req_cancel(preq->subreq); + } + + /* + * Now wait until the request is finished. + * + * We don't set a callback, as we just want to block the + * wait queue and the talloc_free() of the request will + * remove the item from the wait queue. + */ + subreq = smbd_tevent_queue_wait_send(preq, ev, state->wait_queue); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + } + + /* + * Now we add our own waiter to the end of the queue, + * this way we get notified when all pending requests are finished + * and send to the socket. + */ + subreq = smbd_tevent_queue_wait_send(state, ev, state->wait_queue); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, smbd_smb2_tdis_wait_done, req); + + return req; +} + +static void smbd_smb2_tdis_wait_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct smbd_smb2_tdis_state *state = tevent_req_data( + req, struct smbd_smb2_tdis_state); + NTSTATUS status; + + smbd_tevent_queue_wait_recv(subreq); + TALLOC_FREE(subreq); + + /* + * As we've been awoken, we may have changed + * uid in the meantime. Ensure we're still + * root (SMB2_OP_TDIS has .as_root = true). + */ + change_to_root_user(); + + status = smbXsrv_tcon_disconnect(state->smb2req->tcon, + state->smb2req->tcon->compat->vuid); + if (tevent_req_nterror(req, status)) { + return; + } + + /* We did tear down the tcon. */ + TALLOC_FREE(state->smb2req->tcon); + tevent_req_done(req); +} + +static NTSTATUS smbd_smb2_tdis_recv(struct tevent_req *req) +{ + return tevent_req_simple_recv_ntstatus(req); } diff --git a/source3/torture/torture.c b/source3/torture/torture.c index b7badc6d76..197f71f59b 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -3087,7 +3087,7 @@ static bool run_randomipc(int dummy) cli_api(cli, param, param_len, 8, - NULL, 0, BUFFER_SIZE, + NULL, 0, CLI_BUFFER_SIZE, &rparam, &rprcnt, &rdata, &rdrcnt); if (i % 100 == 0) { diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c index 33f1a90cf9..734971bb2a 100644 --- a/source3/utils/smbfilter.c +++ b/source3/utils/smbfilter.c @@ -35,7 +35,6 @@ #define CLI_CAPABILITY_SET 0 static char *netbiosname; -static char packet[BUFFER_SIZE]; static void save_file(const char *fname, void *ppacket, size_t length) { @@ -178,6 +177,7 @@ static void filter_child(int c, struct sockaddr_storage *dest_ss) { NTSTATUS status; int s = -1; + uint8_t packet[128*1024]; /* we have a connection from a new client, now connect to the server */ status = open_socket_out(dest_ss, TCP_SMB_PORT, LONG_CONNECT_TIMEOUT, &s); diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c index e10d511493..b474220949 100644 --- a/source3/winbindd/wb_lookupsids.c +++ b/source3/winbindd/wb_lookupsids.c @@ -320,7 +320,7 @@ static struct wb_lookupsids_domain *wb_lookupsids_get_domain( } } - wb_domain = find_domain_from_sid_noinit(sid); + wb_domain = find_lookup_domain_from_sid(sid); if (wb_domain == NULL) { return NULL; } diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index e23d0487b6..b873655579 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -74,6 +74,7 @@ NTSTATUS _wbint_LookupSid(struct pipes_struct *p, struct wbint_LookupSid *r) NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r) { struct winbindd_domain *domain = wb_child_domain(); + struct lsa_RefDomainList *domains = r->out.domains; NTSTATUS status; if (domain == NULL) { @@ -87,7 +88,12 @@ NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r) * done at the wbint RPC layer. */ status = rpc_lookup_sids(p->mem_ctx, domain, r->in.sids, - &r->out.domains, &r->out.names); + &domains, &r->out.names); + + if (domains != NULL) { + r->out.domains = domains; + } + reset_cm_connection_on_error(domain, status); return status; } diff --git a/source3/wscript_build b/source3/wscript_build index e0432bf903..d4f999a0c6 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -67,6 +67,7 @@ LIB_SRC = ''' lib/fncall.c libads/krb5_errs.c lib/system_smbd.c lib/audit.c lib/tevent_wait.c + lib/smbd_tevent_queue.c lib/idmap_cache.c lib/util_ea.c''' diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c index a6248d4493..ff8fe13877 100644 --- a/source4/cldap_server/cldap_server.c +++ b/source4/cldap_server/cldap_server.c @@ -158,7 +158,7 @@ static NTSTATUS cldapd_startup_interfaces(struct cldapd_server *cldapd, struct l /* if we are allowing incoming packets from any address, then we need to bind to the wildcard address */ if (!lpcfg_bind_interfaces_only(lp_ctx)) { - const char **wcard = iface_list_wildcard(cldapd, lp_ctx); + char **wcard = iface_list_wildcard(cldapd); NT_STATUS_HAVE_NO_MEMORY(wcard); for (i=0; wcard[i]; i++) { status = cldapd_add_socket(cldapd, lp_ctx, wcard[i]); diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c index 5414e1d9ee..77f797bf5b 100644 --- a/source4/dns_server/dns_query.c +++ b/source4/dns_server/dns_query.c @@ -258,7 +258,7 @@ static WERROR handle_question(struct dns_server *dns, struct dns_res_rec **answers, uint16_t *ancount) { struct dns_res_rec *ans = *answers; - WERROR werror; + WERROR werror, werror_return; unsigned int ri; struct dnsp_DnssrvRpcRecord *recs; uint16_t rec_count, ai = *ancount; @@ -275,6 +275,9 @@ static WERROR handle_question(struct dns_server *dns, return WERR_NOMEM; } + /* Set up for an NXDOMAIN reply if no match is found */ + werror_return = DNS_ERR(NAME_ERROR); + for (ri = 0; ri < rec_count; ri++) { if ((recs[ri].wType == DNS_TYPE_CNAME) && ((question->question_type == DNS_QTYPE_A) || @@ -319,28 +322,27 @@ static WERROR handle_question(struct dns_server *dns, if (!W_ERROR_IS_OK(werror)) { return werror; } + werror_return = WERR_OK; continue; } if ((question->question_type != DNS_QTYPE_ALL) && (recs[ri].wType != question->question_type)) { + werror_return = WERR_OK; continue; } werror = create_response_rr(question, &recs[ri], &ans, &ai); if (!W_ERROR_IS_OK(werror)) { return werror; } - } - - if (ai == 0) { - return DNS_ERR(NAME_ERROR); + werror_return = WERR_OK; } *ancount = ai; *answers = ans; - return WERR_OK; + return werror_return; } static NTSTATUS create_tkey(struct dns_server *dns, diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 7ad4acae7a..976774d020 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -657,7 +657,7 @@ static NTSTATUS dns_add_socket(struct dns_server *dns, /* setup our listening sockets on the configured network interfaces */ -static NTSTATUS dns_startup_interfaces(struct dns_server *dns, struct loadparm_context *lp_ctx, +static NTSTATUS dns_startup_interfaces(struct dns_server *dns, struct interface *ifaces) { const struct model_ops *model_ops; @@ -687,8 +687,8 @@ static NTSTATUS dns_startup_interfaces(struct dns_server *dns, struct loadparm_c NT_STATUS_NOT_OK_RETURN(status); } } else { - const char **wcard; - wcard = iface_list_wildcard(tmp_ctx, lp_ctx); + char **wcard; + wcard = iface_list_wildcard(tmp_ctx); if (wcard == NULL) { DEBUG(0, ("No wildcard address available\n")); return NT_STATUS_INTERNAL_ERROR; @@ -891,7 +891,7 @@ static void dns_task_init(struct task_server *task) DLIST_ADD_END(dns->zones, z, NULL); } - status = dns_startup_interfaces(dns, task->lp_ctx, ifaces); + status = dns_startup_interfaces(dns, ifaces); if (!NT_STATUS_IS_OK(status)) { task_server_terminate(task, "dns failed to setup interfaces", true); return; diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h index bd5a1b86bb..2d113ae543 100644 --- a/source4/heimdal_build/config.h +++ b/source4/heimdal_build/config.h @@ -41,7 +41,8 @@ #endif /*Workaround for heimdal define vs samba define*/ -#ifdef HAVE_LIBINTL_H +#if defined(HAVE_LIBINTL_H) && defined(HAVE_BINDTEXTDOMAIN) &&\ + defined(HAVE_TEXTDOMAIN) #define LIBINTL #endif diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c index a8939069aa..2fa175595f 100644 --- a/source4/kdc/kdc.c +++ b/source4/kdc/kdc.c @@ -734,7 +734,7 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c /* if we are allowing incoming packets from any address, then we need to bind to the wildcard address */ if (!lpcfg_bind_interfaces_only(lp_ctx)) { - const char **wcard = iface_list_wildcard(kdc, lp_ctx); + char **wcard = iface_list_wildcard(kdc); NT_STATUS_HAVE_NO_MEMORY(wcard); for (i=0; wcard[i]; i++) { if (kdc_port) { diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 0c0becae13..99595ebd12 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -962,9 +962,9 @@ static void ldapsrv_task_init(struct task_server *task) if (!NT_STATUS_IS_OK(status)) goto failed; } } else { - const char **wcard; + char **wcard; int i; - wcard = iface_list_wildcard(task, task->lp_ctx); + wcard = iface_list_wildcard(task); if (wcard == NULL) { DEBUG(0,("No wildcard addresses available\n")); goto failed; diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c index 7a4733f466..504a7277e3 100644 --- a/source4/lib/socket/interface.c +++ b/source4/lib/socket/interface.c @@ -503,29 +503,13 @@ bool iface_list_same_net(const char *ip1, const char *ip2, const char *netmask) return the list of wildcard interfaces this will include the IPv4 0.0.0.0, and may include IPv6 :: */ -const char **iface_list_wildcard(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +char **iface_list_wildcard(TALLOC_CTX *mem_ctx) { - const char **ret; - ret = (const char **)str_list_make(mem_ctx, "0.0.0.0", NULL); - if (ret == NULL) return NULL; - + char **ret; #ifdef HAVE_IPV6 - if (lpcfg_parm_bool(lp_ctx, NULL, "ipv6", "enable", true)) { - struct interface *local_interfaces = NULL; - - load_interface_list(ret, lp_ctx, &local_interfaces); - - if (iface_list_first_v6(local_interfaces)) { - TALLOC_FREE(local_interfaces); - /* - * only add "::" if we have at least - * one ipv6 interface - */ - return str_list_add(ret, "::"); - } - TALLOC_FREE(local_interfaces); - } + ret = str_list_make(mem_ctx, "::,0.0.0.0", NULL); +#else + ret = str_list_make(mem_ctx, "0.0.0.0", NULL); #endif - return ret; } diff --git a/source4/libcli/raw/smb.h b/source4/libcli/raw/smb.h index 279ada1817..38aefb6745 100644 --- a/source4/libcli/raw/smb.h +++ b/source4/libcli/raw/smb.h @@ -251,20 +251,6 @@ #define RENAME_FLAG_RENAME 0x104 #define RENAME_FLAG_COPY 0x105 -/* Filesystem Attributes. */ -#define FILE_CASE_SENSITIVE_SEARCH 0x01 -#define FILE_CASE_PRESERVED_NAMES 0x02 -#define FILE_UNICODE_ON_DISK 0x04 -/* According to cifs9f, this is 4, not 8 */ -/* Acconding to testing, this actually sets the security attribute! */ -#define FILE_PERSISTENT_ACLS 0x08 -/* These entries added from cifs9f --tsb */ -#define FILE_FILE_COMPRESSION 0x10 -#define FILE_VOLUME_QUOTAS 0x20 -/* I think this is wrong. JRA #define FILE_DEVICE_IS_MOUNTED 0x20 */ -#define FILE_VOLUME_SPARSE_FILE 0x40 -#define FILE_VOLUME_IS_COMPRESSED 0x8000 - /* ChangeNotify flags. */ #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002 diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 10e711b37d..e41c0556f3 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -1739,9 +1739,9 @@ static NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx, NT_STATUS_NOT_OK_RETURN(status); } } else { - const char **wcard; + char **wcard; int i; - wcard = iface_list_wildcard(dce_ctx, lp_ctx); + wcard = iface_list_wildcard(dce_ctx); NT_STATUS_HAVE_NO_MEMORY(wcard); for (i=0; wcard[i]; i++) { status = add_socket_rpc_tcp_iface(dce_ctx, e, event_ctx, model_ops, wcard[i]); diff --git a/source4/smb_server/service_smb.c b/source4/smb_server/service_smb.c index 958792e8a7..0e4897c735 100644 --- a/source4/smb_server/service_smb.c +++ b/source4/smb_server/service_smb.c @@ -63,9 +63,9 @@ static void smbsrv_task_init(struct task_server *task) if (!NT_STATUS_IS_OK(status)) goto failed; } } else { - const char **wcard; + char **wcard; int i; - wcard = iface_list_wildcard(task, task->lp_ctx); + wcard = iface_list_wildcard(task); if (wcard == NULL) { DEBUG(0,("No wildcard addresses available\n")); goto failed; diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c index 9350c136a2..a27ae9054d 100644 --- a/source4/torture/smb2/lock.c +++ b/source4/torture/smb2/lock.c @@ -1044,11 +1044,12 @@ static bool test_cancel_tdis(struct torture_context *torture, torture_comment(torture, " Check pending lock reply\n"); status = smb2_lock_recv(req, &lck); - if (torture_setting_bool(torture, "samba4", false)) { - /* saying that this lock succeeded is nonsense - the - * tree is gone!! */ - CHECK_STATUS(status, NT_STATUS_RANGE_NOT_LOCKED); - } else { + if (!NT_STATUS_EQUAL(status, NT_STATUS_RANGE_NOT_LOCKED)) { + /* + * The status depends on the server internals + * the order in which the files are closed + * by smb2_tdis(). + */ CHECK_STATUS(status, NT_STATUS_OK); } @@ -1087,7 +1088,7 @@ static bool test_cancel_logoff(struct torture_context *torture, struct smb2_lock_element el[2]; struct smb2_request *req = NULL; - const char *fname = BASEDIR "\\cancel_tdis.txt"; + const char *fname = BASEDIR "\\cancel_logoff.txt"; status = torture_smb2_testdir(tree, BASEDIR, &h); CHECK_STATUS(status, NT_STATUS_OK); @@ -1130,11 +1131,12 @@ static bool test_cancel_logoff(struct torture_context *torture, torture_comment(torture, " Check pending lock reply\n"); status = smb2_lock_recv(req, &lck); - if (torture_setting_bool(torture, "samba4", false)) { - /* another bogus 'success' code from windows. The lock - * cannot have succeeded, as we are now logged off */ - CHECK_STATUS(status, NT_STATUS_RANGE_NOT_LOCKED); - } else { + if (!NT_STATUS_EQUAL(status, NT_STATUS_RANGE_NOT_LOCKED)) { + /* + * The status depends on the server internals + * the order in which the files are closed + * by smb2_logoff(). + */ CHECK_STATUS(status, NT_STATUS_OK); } diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c index e83b099958..a737661408 100644 --- a/source4/torture/smb2/notify.c +++ b/source4/torture/smb2/notify.c @@ -69,6 +69,13 @@ goto done; \ }} while (0) +#define WAIT_FOR_ASYNC_RESPONSE(req) \ + while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) { \ + if (tevent_loop_once(torture->ev) != 0) { \ + break; \ + } \ + } + #define BASEDIR "test_notify" #define FNAME "smb2-notify01.dat" @@ -1188,7 +1195,7 @@ static bool torture_smb2_notify_tree_disconnect( smb2_deltree(tree, BASEDIR); smb2_util_rmdir(tree, BASEDIR); - torture_comment(torture, "TESTING CHANGE NOTIFY FOLLOWED BY " + torture_comment(torture, "TESTING CHANGE NOTIFY+CANCEL FOLLOWED BY " "TREE-DISCONNECT\n"); /* @@ -1240,12 +1247,76 @@ done: } /* + testing of change notifies followed by a tdis - no cancel +*/ + +static bool torture_smb2_notify_tree_disconnect_1( + struct torture_context *torture, + struct smb2_tree *tree) +{ + bool ret = true; + NTSTATUS status; + union smb_notify notify; + union smb_open io; + struct smb2_handle h1; + struct smb2_request *req; + + smb2_deltree(tree, BASEDIR); + smb2_util_rmdir(tree, BASEDIR); + + torture_comment(torture, "TESTING CHANGE NOTIFY ASYNC FOLLOWED BY " + "TREE-DISCONNECT\n"); + + /* + get a handle on the directory + */ + ZERO_STRUCT(io.smb2); + io.generic.level = RAW_OPEN_SMB2; + io.smb2.in.create_flags = 0; + io.smb2.in.desired_access = SEC_FILE_ALL; + io.smb2.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; + io.smb2.in.file_attributes = FILE_ATTRIBUTE_NORMAL; + io.smb2.in.share_access = NTCREATEX_SHARE_ACCESS_READ | + NTCREATEX_SHARE_ACCESS_WRITE; + io.smb2.in.alloc_size = 0; + io.smb2.in.create_disposition = NTCREATEX_DISP_CREATE; + io.smb2.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS; + io.smb2.in.security_flags = 0; + io.smb2.in.fname = BASEDIR; + + status = smb2_create(tree, torture, &(io.smb2)); + CHECK_STATUS(status, NT_STATUS_OK); + h1 = io.smb2.out.file.handle; + + /* ask for a change notify, + on file or directory name changes */ + ZERO_STRUCT(notify.smb2); + notify.smb2.level = RAW_NOTIFY_SMB2; + notify.smb2.in.buffer_size = 1000; + notify.smb2.in.completion_filter = FILE_NOTIFY_CHANGE_NAME; + notify.smb2.in.file.handle = h1; + notify.smb2.in.recursive = true; + + req = smb2_notify_send(tree, &(notify.smb2)); + WAIT_FOR_ASYNC_RESPONSE(req); + + status = smb2_tdis(tree); + CHECK_STATUS(status, NT_STATUS_OK); + + status = smb2_notify_recv(req, torture, &(notify.smb2)); + CHECK_VAL(notify.smb2.out.num_changes, 0); + +done: + smb2_deltree(tree, BASEDIR); + return ret; +} + +/* basic testing of change notifies followed by a ulogoff */ static bool torture_smb2_notify_ulogoff(struct torture_context *torture, - struct smb2_tree *tree1, - struct smb2_tree *tree2) + struct smb2_tree *tree1) { bool ret = true; NTSTATUS status; @@ -1276,11 +1347,11 @@ static bool torture_smb2_notify_ulogoff(struct torture_context *torture, io.smb2.in.security_flags = 0; io.smb2.in.fname = BASEDIR; - status = smb2_create(tree2, torture, &(io.smb2)); + status = smb2_create(tree1, torture, &(io.smb2)); CHECK_STATUS(status, NT_STATUS_OK); io.smb2.in.create_disposition = NTCREATEX_DISP_OPEN; - status = smb2_create(tree2, torture, &(io.smb2)); + status = smb2_create(tree1, torture, &(io.smb2)); CHECK_STATUS(status, NT_STATUS_OK); h1 = io.smb2.out.file.handle; @@ -1295,7 +1366,9 @@ static bool torture_smb2_notify_ulogoff(struct torture_context *torture, req = smb2_notify_send(tree1, &(notify.smb2)); - status = smb2_logoff(tree2->session); + WAIT_FOR_ASYNC_RESPONSE(req); + + status = smb2_logoff(tree1->session); CHECK_STATUS(status, NT_STATUS_OK); status = smb2_notify_recv(req, torture, &(notify.smb2)); @@ -1991,8 +2064,9 @@ struct torture_suite *torture_smb2_notify_init(void) torture_suite_add_2smb2_test(suite, "dir", torture_smb2_notify_dir); torture_suite_add_2smb2_test(suite, "mask", torture_smb2_notify_mask); torture_suite_add_1smb2_test(suite, "tdis", torture_smb2_notify_tree_disconnect); + torture_suite_add_1smb2_test(suite, "tdis1", torture_smb2_notify_tree_disconnect_1); torture_suite_add_2smb2_test(suite, "mask-change", torture_smb2_notify_mask_change); - torture_suite_add_2smb2_test(suite, "logoff", torture_smb2_notify_ulogoff); + torture_suite_add_1smb2_test(suite, "logoff", torture_smb2_notify_ulogoff); torture_suite_add_1smb2_test(suite, "tree", torture_smb2_notify_tree); torture_suite_add_2smb2_test(suite, "basedir", torture_smb2_notify_basedir); torture_suite_add_2smb2_test(suite, "double", torture_smb2_notify_double); diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c index 239612a6bd..0339b55661 100644 --- a/source4/web_server/web_server.c +++ b/source4/web_server/web_server.c @@ -336,9 +336,9 @@ static void websrv_task_init(struct task_server *task) talloc_free(ifaces); } else { - const char **wcard; + char **wcard; int i; - wcard = iface_list_wildcard(task, task->lp_ctx); + wcard = iface_list_wildcard(task); if (wcard == NULL) { DEBUG(0,("No wildcard addresses available\n")); goto failed; |