[SCM] Samba Shared Repository - branch v4-1-stable updated

Karolin Seeger kseeger at samba.org
Thu Apr 17 02:50:58 MDT 2014


The branch, v4-1-stable has been updated
       via  9da023a WHATSNEW: Add release notes for Samba 4.1.7.
       via  dadd863 s3: messages: Implement cleanup of dead records.
       via  bdd6da6 s3:libsmb: SMBC_getatr() if no method worked, try all methods again on next attempt
       via  4aa742a client: use cli_qpathinfo3 for allinfo
       via  0874ff2 s3:libsmb: cli_qpathinfo3 use cli_qpathinfo2 for smb2
       via  e98e835 client: remove a write only variable
       via  66115ff s3:libsmb: SMBC_getatr use pathinfo3 for second try
       via  0bea2d2 s3:libsmb: SMBC_getatr do not let ino undefined on success
       via  d15c014 s3:libsmb: SMBC_getatr try pathinfo2 only once
       via  976030c s3:libsmb: add function cli_qpathinfo3()
       via  f76511c s3:libsmb: add function cli_qpathinfo_standard()
       via  1f4b445 s3:libsmb: pass creation or birth time in cli_qpathinfo_basic()
       via  b1c6431 rpcclient: abort shadow-copy set on commit failure
       via  400e4f0 rpcclient: append a trailing slash to FSRVP request UNCs
       via  c9703c9 s3: smbd: Ensure we always go via getgroups_unix_user() when creating an NT token.
       via  34fcb4e lsa.idl: define lsa.ForestTrustCollisionInfo and ForestTrustCollisionRecord as public structs
       via  3687ab1 s3-rpc_server: Fix handling of fragmented rpc requests.
       via  f2592b6 s3:rpc_server: minor refactoring of process_request_pdu()
       via  f3f0f62 pidl-waf: Only install Yapp::Driver if it is not available.
       via  c7a35ab pidl-waf: Check for system perl(Parse::Yapp::Driver).
       via  7d66a2c pidl-waf: Add a function to check for a system perl module.
       via  fadd326 pidl-waf: Do not glob to install pidl modules.
       via  3957564 pidl-waf: Install pidl modules to the perl vendorlib directory.
       via  7876b4b pidl-waf: Remove unused variable pidl_src.
       via  fe7d930 autobuild: Set perl vendorlib direcotry.
       via  b1d86ee buildtools: Add perl vendorlib configure option.
       via  4ba0f7a buildtools: Rename perl vendorarch configure option.
       via  b53c122 dns: Extend tests for records with another type
       via  5e62b6e bug #10471: Don't respond with NXDOMAIN to records that exist with another type
       via  8745204 s3: smbd: Fileserving share access checks.
       via  032ab0b smbreadline: switch to new-style readline typedef
       via  d60f58d s4:lib/socket: simplify iface_list_wildcard() and its callers
       via  0644125 s4:lib/socket: use the same logic in iface_list_wildcard() as in smbd
       via  8d256c8 s3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE
       via  3ada2b3 s3:smbd: fix the maxentries calculation depending on the max_send.
       via  f5f5e5b s3:smbd: simplify maxentries calculation in reply_search()
       via  57f6afc s3:smbd: fix the read numtoread calculation depending on the max_send.
       via  6deb0f2 s3:smbd: fix the lockread numtoread calculation depending on the max_send.
       via  434e211 s3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.
       via  49197c1 s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.
       via  9404bd6 s3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c
       via  39af4a7 s3:smbd: reject a MaxBufferSize < SMB_BUFFER_SIZE_MIN (500) in a session setup request
       via  8724f6c s3:smbd: use sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX
       via  047f881 s3:smbd: use SMB_BUFFER_SIZE_MIN/MAX to limit lp_max_xmit()
       via  08aa53b s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX
       via  ba91a66 libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX defines
       via  3a36bf7 s3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()
       via  2092577 s3:client: only limit the buffer by the given length 'n'
       via  3528b52 s3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE
       via  8733ce1 s3:utils/smbfilter: use a local variable for the packet buffer
       via  3b6d207 s4: smbtorture: Add a proper change_notify going async followed by tdis test.
       via  4df79f0 s4: smbtorture: Update the torture_smb2_notify_ulogoff test to demonstrate the problem.
       via  91dea25 s3:smb2_tcon: cancel and wait for pending requests on tdis
       via  e039346 s3:smb2_sesssetup: cancel and wait for pending requests on logoff
       via  3f4af7f s3:smb2_tcon: split smbd_smb2_tdis into an async *_send/recv pair.
       via  0ca9ce8 s3:smb2_sesssetup: split smbd_smb2_logoff into an async *_send/recv pair.
       via  ad5d9c3 s3:smb2_lock: return RANGE_NOT_LOCKED instead of CANCELLED for logoff and tdis
       via  2ded846 s3:smb2_lock: fix whitespaces/tabs in smbd_smb2_lock_cancel()
       via  1a4e5cf s4:torture/smb2: accept NT_STATUS_RANGE_NOT_LOCKED after smb2_logoff/tdis
       via  a9703c9 s3: lib: Back-port tevent_queue_wait_send/recv -> smbd_tevent_queue_wait_send/recv
       via  c77fbd2 tevent: fix crash bug in tevent_queue_immediate_trigger()
       via  71eade3 Merge tag 'samba-4.1.6' into v4-1-test
       via  1cd273e VERSION: Bump version number up to 4.1.7.
       via  5d724b9 VERSION: Disable git snapshots for the 4.1.6 release.
       via  31d0028 WHATSNEW: Add release notes for Samba 4.1.6.
       via  0508f04 CVE-2013-6442: s3:smbcacls - ensure we don't lose an existing ACL when setting owner or group owner.
       via  b6f2145 CVE-2013-4496:Revert remainder of ce895609b04380bfc41e4f8fddc84bd2f9324340
       via  1313f96 CVE-2013-4496:samr: Remove ChangePasswordUser
       via  cb9fdd3 CVE-2013-4496:s3:auth: fix memory leak in the ACCOUNT_LOCKED_OUT case.
       via  0f243b2 CVE-2013-4496:s3-samr: Block attempts to crack passwords via repeated password changes
       via  705595f s3-spoolssd: Don't register spoolssd if epmd is not running.
       via  51241bb s3-vfs: Fix stream_depot vfs module on btrfs.
       via  70455f0 s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()
       via  64bb989 s3:winbindd: fix _wbint_LookupSids() on error
       via  0acd76f pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers
       via  3d5ae09 s3: smbd: Ensure brl_get_locks_internal() always returns a valid struct byte_range_lock even if there are no locks.
       via  c62eec5 doc: add "spoolss: architecture" parameter usage
       via  d94e563 s3-printing: Fix obvious memory leak in printer_list_get_printer().
       via  440052f rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE
       via  729b124 s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"
       via  cd17ba7 s3:lib/ctdbd_conn: let release_ip_handler return bool
       via  2942419 s3:smbd: maintain smbd_server_connection->status
       via  540cfe1 s3:smbd: simplify exit_server_common()
       via  7318632 s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.
       via  ad1dac1 waf: improve iconv checks
       via  f2774ce s3:libsmb: call smbXcli_tcon_set_fs_attributes() directly
       via  082c5ea s3:libsmb: remove unused cli_state->case_sensitive
       via  2acadbb s3:libsmb: remove unused cli_state->dfsroot
       via  ee8089b s3:libsmb: add SMB2/3 support to cli_dfs_get_referral()
       via  c35d8a3 s3/libsmb: make use of smbXcli_tcon_is_dfs_share()
       via  e55b6fb s3/libsmb: Use smbXcli_conn_dfs_supported instead of test on CAP_DFS
       via  e5b0378 s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES anymore
       via  75acb84 s3:libsmb: call smbXcli_tcon_{get,set}_fs_attributes() from cli_set_case_sensitive()
       via  e5b7647 libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs shares
       via  66de913 libcli/smb: add FLAG_CASELESS_PATHNAMES based on FILE_CASE_SENSITIVE_SEARCH to smb1 requests
       via  c711e5b libcli/smb: move Filesystem Attributes defines to smb_constants.h
       via  748b205 libcli/smb: add FLAGS2_DFS_PATHNAMES for SMB1 operations against dfs shares
       via  18d7628 libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()
       via  27bad7d libcli/smb: add smbXcli_tcon_is_dfs_share()
       via  2bd871c libcli/smb: Introduce smbXcli_conn_dfs_supported
       via  26f03f1 s3:libsmb: make use of smb1cli_tcon_set_values()
       via  3b0e363 s3/libsmb: Use smbXcli_conn_use_unicode instead of smb1 specific test
       via  195a64c heimdal_build: only enable libintl functions if everything was found
       via  bbbeed6 waf:lib/replace fix iconv checks on HP/UX
       via  8a0b5a4 waf:lib/replace gettext configure checks
       via  57df0d3 waf:lib/replace fix gettext detection
       via  7a64fb0 waf:lib/replace change detection of gettext
       via  05f917c waf:lib/replace fix up libintl related checks
       via  540da46 waf:lib/replace correct detection of libiconv
       via  ec1dacc s3: printing: Fix problem with server taking too long to respond to a MSG_PRINTER_DRVUPGRADE message.
       via  ce98b19 librpc/nbt: increase MAX_COMPONENTS limit for nbt_names.
       via  09e750b dfs: always call create_conn_struct with root privileges
       via  629e95e VERSION: Bump version number up to 4.1.6...
      from  48966b6 VERSION: Disable git snapshots for the 4.1.6 release.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-stable


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |    2 +-
 WHATSNEW.txt                                       |  117 ++++++++++++-
 buildtools/wafadmin/Tools/perl.py                  |   23 ++-
 buildtools/wafsamba/wscript                        |    3 +-
 .../smbdotconf/printing/spoolssarchitecture.xml    |   15 ++
 lib/replace/wscript                                |   30 +++-
 lib/tevent/tevent_queue.c                          |    4 +
 libcli/smb/smb2cli_create.c                        |   10 +-
 libcli/smb/smbXcli_base.c                          |   62 +++++++
 libcli/smb/smbXcli_base.h                          |    6 +
 libcli/smb/smb_constants.h                         |   27 +++
 libcli/smbreadline/smbreadline.c                   |    2 +-
 librpc/idl/lsa.idl                                 |    4 +-
 librpc/ndr/ndr_nbt.c                               |    2 +-
 pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm           |   14 ++
 pidl/lib/wscript_build                             |   35 ++++-
 pidl/wscript                                       |   30 +++-
 python/samba/tests/dns.py                          |   30 ++++
 script/autobuild.py                                |    7 +-
 source3/auth/token_util.c                          |  101 +++++++++++
 source3/build/charset.py                           |    6 +
 source3/client/client.c                            |    9 +-
 source3/include/client.h                           |    5 +-
 source3/include/ctdbd_conn.h                       |    2 +-
 source3/include/libsmb_internal.h                  |    1 +
 source3/include/messages.h                         |    6 +
 source3/include/smb.h                              |   23 +---
 source3/lib/ctdbd_conn.c                           |   36 ++++-
 source3/lib/messages.c                             |   17 ++
 source3/lib/messages_local.c                       |   38 ++++
 .../lib/smbd_tevent_queue.c                        |   59 ++++---
 .../kerberos.h => source3/lib/smbd_tevent_queue.h  |   31 ++--
 source3/libads/ldap.c                              |   11 +-
 source3/libsmb/async_smb.c                         |   22 ---
 source3/libsmb/cliconnect.c                        |   25 ++-
 source3/libsmb/clidfs.c                            |   95 ++++++++---
 source3/libsmb/clientgen.c                         |   26 +++-
 source3/libsmb/clirap.c                            |  110 ++++++++++++
 source3/libsmb/clirap.h                            |   11 ++
 source3/libsmb/clitrans.c                          |   21 ---
 source3/libsmb/libsmb_file.c                       |   27 +++-
 source3/libsmb/libsmb_server.c                     |   15 +-
 source3/libsmb/libsmb_stat.c                       |   11 +-
 source3/locking/brlock.c                           |   34 +++--
 source3/modules/vfs_streams_depot.c                |   10 +-
 source3/param/loadparm.c                           |    2 +-
 source3/printing/nt_printing.c                     |   29 +++-
 source3/printing/printer_list.c                    |    1 +
 source3/printing/queue_process.c                   |    6 +
 source3/printing/spoolssd.c                        |   39 +++--
 source3/rpc_client/rpc_transport_np.c              |   57 ++++++-
 source3/rpc_server/spoolss/srv_spoolss_nt.c        |    1 +
 source3/rpc_server/srv_pipe.c                      |   40 ++---
 source3/rpcclient/cmd_fss.c                        |   57 +++++-
 source3/smbd/globals.h                             |    1 +
 source3/smbd/ipc.c                                 |   10 +-
 source3/smbd/msdfs.c                               |   31 ++++-
 source3/smbd/process.c                             |   83 ++++++++-
 source3/smbd/reply.c                               |   54 +++---
 source3/smbd/server.c                              |    7 +
 source3/smbd/server_exit.c                         |   17 ++-
 source3/smbd/service.c                             |   12 +-
 source3/smbd/sesssetup.c                           |   19 ++-
 source3/smbd/smb2_lock.c                           |   42 ++++--
 source3/smbd/smb2_server.c                         |   16 ++
 source3/smbd/smb2_sesssetup.c                      |  183 ++++++++++++++++++--
 source3/smbd/smb2_tcon.c                           |  180 ++++++++++++++++++--
 source3/torture/torture.c                          |    2 +-
 source3/utils/smbfilter.c                          |    2 +-
 source3/winbindd/wb_lookupsids.c                   |    2 +-
 source3/winbindd/winbindd_dual_srv.c               |    8 +-
 source3/wscript_build                              |    1 +
 source4/cldap_server/cldap_server.c                |    2 +-
 source4/dns_server/dns_query.c                     |   14 +-
 source4/dns_server/dns_server.c                    |    8 +-
 source4/heimdal_build/config.h                     |    3 +-
 source4/kdc/kdc.c                                  |    2 +-
 source4/ldap_server/ldap_server.c                  |    4 +-
 source4/lib/socket/interface.c                     |   26 +---
 source4/libcli/raw/smb.h                           |   14 --
 source4/rpc_server/dcerpc_server.c                 |    4 +-
 source4/smb_server/service_smb.c                   |    4 +-
 source4/torture/smb2/lock.c                        |   24 ++--
 source4/torture/smb2/notify.c                      |   88 +++++++++-
 source4/web_server/web_server.c                    |    4 +-
 85 files changed, 1824 insertions(+), 450 deletions(-)
 create mode 100644 docs-xml/smbdotconf/printing/spoolssarchitecture.xml
 copy lib/tevent/tevent_wakeup.c => source3/lib/smbd_tevent_queue.c (53%)
 copy lib/replace/system/kerberos.h => source3/lib/smbd_tevent_queue.h (61%)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 4c9eba6..3e45362 100644
--- a/VERSION
+++ b/VERSION
@@ -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 defe3cb..131cab6 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 at 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 at 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 at 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 at samba.org>
+    * BUG 10471: Don't respond with NXDOMAIN to records that exist with another
+      type.
+
+
+o   Alexander Bokovoy <ab at samba.org>
+    * BUG 10504: lsa.idl: Define lsa.ForestTrustCollisionInfo and
+      ForestTrustCollisionRecord as public structs.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 10439: Increase max netbios name components.
+
+
+o   David Disseldorp <ddiss at 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 at gmail.com>
+    * BUG 10387: 'net ads search' on high latency networks can return a partial
+      list with no error indication.
+
+
+o   Stefan Metzmacher <metze at 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 at catalyst.net.nz>
+    * BUG 10378: dfs: Always call create_conn_struct with root privileges.
+
+
+o   Andreas Schneider <asn at 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 at 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 a6787a8..8f13e28 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 fe2e515..7984227 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 0000000..5ce9f13
--- /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/lib/replace/wscript b/lib/replace/wscript
index b6fb10b..8451689 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 4750675..eeb922f 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 3f8d672..9cb94b1 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 14d4cc3..25fbabd 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 3d93427..5fe4018 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 6dd7b28..175ffaf 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


-- 
Samba Shared Repository


More information about the samba-cvs mailing list