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

Karolin Seeger kseeger at samba.org
Mon Sep 8 04:08:58 MDT 2014


The branch, v4-1-stable has been updated
       via  6cc1d30 Merge tag 'samba-4.1.11' into v4-1-test
       via  85c575d WHATSNEW: Add release notes for Samba 4.1.12.
       via  5475d5e s3: smbd: vfs_dirsort module.
       via  f165bb9 s4-rpc: dnsserver: handle updates of tombstoned dnsNode objects
       via  98fb614 s4-rpc: dnsserver: Do not search for deleted DNS entries
       via  132b848 s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before add/modify
       via  8de4f48 s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before removing records
       via  f20179b s4:dlz_bind9: let dlz_bind9 use dns_common_replace()
       via  5a3b783 s4:dlz_bind9: let dlz_bind9 use dns_common_extract()
       via  07f72fc s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() for name lookup
       via  4f7d4fd torture-dns: Add test for dlz_bind9 updates
       via  0b9c775 torture-dns: Add test for dlz_bind9 zonedumps
       via  0542349 torture-dns: Add test for dlz_bind9 lookups
       via  f5d39b6 s4:torture:dlz_bind9: fix spnego tests
       via  ce13047 s4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()
       via  889e958 s4:dlz_bind9: avoid some compiler warnings
       via  f23aa6f s4:dns_server: handle tombstones in handle_one_update()
       via  0329ef4 s4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()
       via  2fbb9b9 s4:dns_server: make sure dns_common_lookup() doesn't return tombstones
       via  31b5192 s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()
       via  ec0df9f s4:dns_server: split out dns_common_replace()
       via  256349dd s4:dns_server: remove const from dns_replace_records()
       via  f3df058 s4:dns_server: split out dns_common_extract() and dns_common_lookup()
       via  f3e6b38 s4:dns_server: split out a private 'dnsserver_common' library
       via  d3abd55 s4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXIST
       via  e6adf09 s4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()
       via  eb0e0b1 provision: Correctly provision the SOA record minimum TTL
       via  748e78e s4-rpc: dnsserver: return DNS_RANK_NS_GLUE recors when explicitly asked for
       via  c371cad s4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filter
       via  019c587 s4-rpc: dnsserver: Correctly set rank for glue NS records
       via  5fdc841 s4:setup/dns_update_list: make use of the new substitution variables
       via  d3947ea s4:samba_dnsupdate: provide more substitution variables e.g. IF_RODC
       via  78cad21 s4:samba_dnsupdate: don't try to be smart when verifying NS records
       via  0301b53 s4:samba_dnsupdate: cache the already registered records
       via  f8b7027 s4:samba_dnsupdate: fix dnsobj.__str__()
       via  40bac8e s4:samba_dnsupdate: don't lower case the registered names
       via  a444402 python/join: use lowercase for the dnshostname.
       via  0eaca4c selftest/Samba3: also bind to ipv6
       via  2759e97 selftest/Samba4: also bind to ipv6
       via  b62a179 selftest: export _IPV6 environment variables
       via  534f6aa libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for now
       via  1ef078e libcli/dns: add AAAA support to dns_hosts_file.c
       via  391b29a s3: winbindd: On new client connect, prune idle or hung connections older than "winbind request timeout"
       via  fa781e2 s3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds with man page.
       via  121cad3 dosmode: fix FSCTL_SET_SPARSE request validation
       via  a5f0ec0 smbd: Properly initialize mangle_hash
       via  708986f Don't discard result of checking grouptype
       via  7a58844 docs: Fix typos in smb.conf (inherit acls)
       via  df9396a samba: Retain case sensitivity of cifs client
       via  c556d3e lib: strings: Simplify strcasecmp
       via  7c54339 s4: tests: Added local.charset test for Bug 10716 - smbd constantly crashes when filename contains non-ascii character
       via  2765daa lib: strings: Fix the behavior of strncasecmp_m_handle() in the face of bad conversions.
       via  a8cbd5a lib: strings: Fix the behavior of strcasecmp_m_handle() in the face of bad conversions.
       via  5df60b2 printing: reload printer shares on OpenPrinter
       via  00a0c2d smbd: split printer reload processing
       via  44a3d3f server: remove duplicate snum_is_shared_printer()
       via  728e951 smbd: only reprocess printer_list.tdb if it changed
       via  5a647c5 printing: return last change time with pcap_cache_loaded()
       via  b8042f8 printing: remove pcap_cache_add()
       via  62df2fd printing: reload printer_list.tdb from in memory list
       via  0fae4d3 printing: only reload printer shares on client enum
       via  83f448d printing: traverse_read the printer list for share updates
       via  b95dbbe s3: smbd : SMB2 - fix SMB2_SEARCH when searching non wildcard string with a case-canonicalized share.
       via  925a98d s3: smbd - SMB[2|3]. Ensure a \ or / can't be found anywhere in a search path, not just at the start.
       via  3e6e260 s3: enforce a positive allocation_file_size for non-empty files (bug #10543)
       via  834d1f6 passdb: fix NT_STATUS_NO_SUCH_GROUP
       via  9bac84f s3:libsmb: Set a max charge for SMB2 connections
       via  3a0ee0a s3: smbd: POSIX ACLs. Remove incorrect check for SECINFO_PROTECTED_DACL in incoming security_information flags in posix_get_nt_acl_common().
       via  42149a9 libcli/security: add better detection of SECINFO_[UN]PROTECTED_[D|S]ACL in get_sec_info()
       via  83c039c s3:smbd: mask security_information input values with SMB_SUPPORTED_SECINFO_FLAGS
       via  f5d7b2d security.idl: add SMB_SUPPORTED_SECINFO_FLAGS
       via  1c92a1a Fixed a memory leak in cli_set_mntpoint().
       via  99f8ca1 lib: Remove unused nstrcpy
       via  c78ff84 build: fix configure to honour --without-dmapi
       via  93c30e2 tests: dnsserver: Add a update test with name set to '.'
       via  6f46d80 s4-rpc: dnsserver: Allow . to be specified for @ record
       via  bcc0f97 s3: net time - fix usage and core dump.
       via  8f63de4 s3: xml-docs. Ensure users of 'net time' know the remote server must be specified with -S.
       via  cef3156 s3: remove stat_ex.vfs_private completely
       via  4791d5c s3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()
       via  7c49479 s3:vfs:gpfs: remove all writing uses of stat_ex.vfs_private from vfs_gpfs.
       via  9093f2d s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.
       via  1c82326 s3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offline
       via  bddae75 s3:vfs:gpfs: store the winAttrs in the struct_ex when we got them in vfs_gpfs_fstat()
       via  189afb4 s3:idmap: don't log missing range config if range checking not requested
       via  9449ff4 sys_poll_intr: fix timeout arithmetic
       via  a2a4d0b s4:torture/rpc: add rpc.netlogon.ServerReqChallengeGlobal
       via  a78ec00 s4:rpc_server/netlogon: keep a global challenge table
       via  8907f5e lib/util: move memcache.[ch] to the toplevel 'samba-util' library
       via  9e4042b s3:lib/memcache: only include the required header files
       via  cf6b312 s3:lib/memcache: make use of talloc for memcache_elements
       via  857d7b0 s3:lib/memcache: use uint8_t instead of uint8
       via  39aeb27 s4:torture/rpc: add invalidAuthenticate2
       via  cddc250 selftest/knownfail: add ^samba4.rpc.netlogon.*.invalidAuthenticate2 for v4-1-*
       via  4a5a042 libcli/auth: also set secure channel type in netlogon_creds_client_init().
       via  f1cd122 lib: tevent: make TEVENT_SIG_INCREMENT atomic.
       via  c8eea31 VERSION: Bump version up to 4.1.12.
       via  59ebc4c VERSION: Disable git snapshots for the 4.1.11 release.
       via  4c6ab5d WHATSNEW: Add release notes for Samba 4.1.11.
       via  cf24c8b fix unstrcpy
       via  7e7790f Merge tag 'samba-4.1.10' into v4-1-test
       via  b474dc7 VERSION: Bump version number up to 4.1.11...
      from  154a270 VERSION: Disable git snapshots for the 4.1.11 release.

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


- Log -----------------------------------------------------------------
commit 6cc1d3030667d2c57cceac870c0d8480cce45905
Merge: 85c575d311a5b5e2b1ea626b7a706566fd97b3f1 154a270edb95d5141781bc5e76b4b2dcac1be5e2
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Sep 8 11:08:02 2014 +0200

    Merge tag 'samba-4.1.11' into v4-1-test
    
    samba: tag release samba-4.1.11
    
    This commit is actually the samba-4.1.12 release!
    
    It was just forgotten to merge the samba-4.1.11 tag (security release)
    into v4-1-test. This commit is required to bring the git history
    between v4-1-test and v4-1-stable in sync again.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |    2 +-
 WHATSNEW.txt                                       |  137 +++-
 docs-xml/manpages/net.8.xml                        |   15 +-
 docs-xml/smbdotconf/security/inheritowner.xml      |    6 +-
 .../smbdotconf/winbind/winbindrequesttimeout.xml   |   16 +
 lib/param/param_functions.c                        |    1 +
 lib/param/param_table.c                            |    9 +
 lib/replace/replace.h                              |    5 +
 lib/replace/wscript                                |   25 +
 lib/tevent/tevent_signal.c                         |    6 +
 lib/util/charset/tests/charset.c                   |   12 +
 lib/util/charset/util_str.c                        |   37 +-
 {source3/lib => lib/util}/memcache.c               |   22 +-
 {source3/include => lib/util}/memcache.h           |    2 -
 lib/util/select.c                                  |   14 +-
 lib/util/string_wrappers.h                         |    5 -
 lib/util/wscript_build                             |    2 +-
 libcli/auth/credentials.c                          |    2 +
 libcli/auth/proto.h                                |    1 +
 libcli/dns/dns_hosts_file.c                        |   35 +-
 libcli/security/secdesc.c                          |   36 +-
 librpc/idl/security.idl                            |   18 +
 python/samba/join.py                               |    4 +-
 python/samba/provision/sambadns.py                 |    1 +
 python/samba/tests/dcerpc/dnsserver.py             |   41 +-
 python/samba/tests/dns.py                          |    1 +
 selftest/README                                    |    1 +
 selftest/knownfail                                 |    1 +
 selftest/selftest.pl                               |    6 +
 selftest/target/Samba3.pm                          |   15 +-
 selftest/target/Samba4.pm                          |   19 +-
 source3/auth/token_util.c                          |    2 +-
 source3/include/includes.h                         |    8 -
 source3/include/proto.h                            |    1 +
 source3/lib/access.c                               |    2 +-
 source3/lib/id_cache.c                             |    2 +-
 source3/lib/username.c                             |    2 +-
 source3/lib/util_sock.c                            |    2 +-
 source3/librpc/idl/open_files.idl                  |    1 -
 source3/libsmb/clidfs.c                            |    6 +-
 source3/libsmb/libsmb_server.c                     |    5 +
 source3/modules/vfs_default.c                      |   12 +
 source3/modules/vfs_dirsort.c                      |    2 +-
 source3/modules/vfs_gpfs.c                         |   63 +-
 source3/param/loadparm.c                           |    1 +
 source3/passdb/lookup_sid.c                        |    2 +-
 source3/passdb/pdb_interface.c                     |    2 +-
 source3/passdb/pdb_samba_dsdb.c                    |    6 +-
 source3/printing/load.c                            |    4 +-
 source3/printing/pcap.c                            |   54 +-
 source3/printing/pcap.h                            |   13 +-
 source3/printing/print_aix.c                       |   17 +-
 source3/printing/print_iprint.c                    |   16 +-
 source3/printing/print_standard.c                  |    8 +-
 source3/printing/print_svid.c                      |   11 +-
 source3/printing/printer_list.c                    |   17 +-
 source3/printing/printer_list.h                    |    4 +-
 source3/printing/queue_process.c                   |  102 +++-
 source3/printing/spoolssd.c                        |   38 +-
 source3/rpc_client/cli_netlogon.c                  |    1 +
 source3/rpc_server/spoolss/srv_spoolss_nt.c        |   30 +-
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c          |    1 +
 source3/smbd/dir.c                                 |    2 +-
 source3/smbd/dosmode.c                             |   13 +
 source3/smbd/durable.c                             |   14 -
 source3/smbd/globals.c                             |    2 +-
 source3/smbd/lanman.c                              |    1 +
 source3/smbd/mangle_hash.c                         |    4 +
 source3/smbd/mangle_hash2.c                        |    2 +-
 source3/smbd/negprot.c                             |    3 +-
 source3/smbd/nttrans.c                             |    7 +-
 source3/smbd/posix_acls.c                          |    2 +-
 source3/smbd/proto.h                               |    1 +
 source3/smbd/server.c                              |   22 +-
 source3/smbd/server_reload.c                       |   74 +-
 source3/smbd/smb2_find.c                           |   41 +-
 source3/smbd/smb2_getinfo.c                        |    3 +-
 source3/smbd/smb2_setinfo.c                        |    3 +-
 source3/smbd/statcache.c                           |    2 +-
 source3/smbd/vfs.c                                 |    2 +-
 source3/torture/torture.c                          |    2 +-
 source3/utils/net_time.c                           |   30 +-
 source3/winbindd/idmap.c                           |    4 +-
 source3/winbindd/winbindd.c                        |   36 +
 source3/wscript                                    |   72 +-
 source3/wscript_build                              |    2 +-
 source4/dns_server/dlz_bind9.c                     |  377 +++------
 source4/dns_server/dlz_minimal.h                   |    2 +-
 source4/dns_server/dns_server.h                    |    6 +-
 source4/dns_server/dns_update.c                    |   78 ++-
 source4/dns_server/dns_utils.c                     |  150 +----
 source4/dns_server/dnsserver_common.c              |  342 ++++++++
 source4/dns_server/dnsserver_common.h              |   50 ++
 source4/dns_server/wscript_build                   |   14 +-
 source4/dsdb/dns/dns_update.c                      |   13 +
 source4/librpc/rpc/dcerpc_schannel.c               |    1 +
 source4/rpc_server/dnsserver/dcerpc_dnsserver.c    |   22 +-
 source4/rpc_server/dnsserver/dnsdata.c             |   11 +-
 source4/rpc_server/dnsserver/dnsdb.c               |   26 +-
 source4/rpc_server/netlogon/dcerpc_netlogon.c      |   91 ++-
 source4/scripting/bin/samba_dnsupdate              |  213 ++++-
 source4/setup/dns_update_list                      |   82 +-
 source4/torture/dns/dlz_bind9.c                    |  868 +++++++++++++++++++-
 source4/torture/ntp/ntp_signd.c                    |    1 +
 source4/torture/rpc/lsa.c                          |    1 +
 source4/torture/rpc/netlogon.c                     |  164 ++++-
 source4/torture/rpc/samba3rpc.c                    |    2 +
 107 files changed, 2867 insertions(+), 923 deletions(-)
 create mode 100644 docs-xml/smbdotconf/winbind/winbindrequesttimeout.xml
 rename {source3/lib => lib/util}/memcache.c (95%)
 rename {source3/include => lib/util}/memcache.h (99%)
 create mode 100644 source4/dns_server/dnsserver_common.c
 create mode 100644 source4/dns_server/dnsserver_common.h


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 72f82cc..cb14e70 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=1
-SAMBA_VERSION_RELEASE=11
+SAMBA_VERSION_RELEASE=12
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 521ea1f..2505927 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,137 @@
                    ==============================
+                   Release Notes for Samba 4.1.12
+                         September 8, 2014
+                   ==============================
+
+
+This is the latest stable release of Samba 4.1.
+
+Major enhancements in Samba 4.1.12 include:
+
+o  New parameter "winbind request timeout" has been added (bug #3204). Please
+   see smb.conf man page for details.
+o  Fix smbd crashes when filename contains non-ascii character (bug #10716).
+o  dnsserver: Handle updates of tombstoned dnsNode objects (bug #10749).
+
+
+Changes since 4.1.11:
+---------------------
+
+o   Michael Adam <obnox at samba.org>
+    * BUG 10369: build: Fix configure to honour '--without-dmapi'.
+    * BUG 10737: s3:idmap: Don't log missing range config if range checking not
+      requested.
+    * BUG 10741: Fix flapping VFS gpfs offline bit.
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 3204: s3: winbindd: On new client connect, prune idle or hung
+      connections older than "winbind request timeout". Add new parameter
+      "winbind request timeout".
+    * BUG 10640: lib: tevent: make TEVENT_SIG_INCREMENT atomic.
+    * BUG 10650: Make "case sensitive = True" option working with
+      "max protocol = SMB2" or higher in large directories.
+    * BUG 10716: Fix smbd crashes when filename contains non-ascii
+      character.
+    * BUG 10728: 'net time': Fix usage and core dump.
+    * BUG 10773: s3: smbd: POSIX ACLs. Remove incorrect check for
+      SECINFO_PROTECTED_DACL in incoming security_information flags in
+      posix_get_nt_acl_common().
+    * BUG 10794: vfs_dirsort: Fix an off-by-one error that can cause
+      uninitialized memory read.
+
+
+o   Björn Baumbach <bb at sernet.de>
+    * BUG 10543: s3: Enforce a positive allocation_file_size for non-empty
+      files.
+
+
+o   Kai Blin <kai at samba.org>
+    * BUG 10466: provision: Correctly provision the SOA record minimum TTL.
+
+
+o   David Disseldorp <ddiss at samba.org>
+    * BUG 10652: Samba 4 consuming a lot of CPU when re-reading printcap info.
+    * BUG 10787: dosmode: Fix FSCTL_SET_SPARSE request validation.
+
+
+o   Amitay Isaacs <amitay at gmail.com>
+    * BUG 10742: s4-rpc: dnsserver: Allow . to be specified for @ record.
+
+
+o   Daniel Kobras <d.kobras at science-computing.de>
+    * BUG 10731: sys_poll_intr: Fix timeout arithmetic.
+
+
+o   Ross Lagerwall <rosslagerwall at gmail.com>
+    * BUG 10778: s3:libsmb: Set a max charge for SMB2 connections.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 10716: lib: strings: Simplify strcasecmp.
+    * BUG 10758: lib: Remove unused nstrcpy.
+    * BUG 10782: smbd: Properly initialize mangle_hash.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 9831: s4:setup/dns_update_list: make use of the new substitution
+      variables.
+    * BUG 10723: Allow netr_ServerReqChallenge() and netr_ServerAuthenticate3()
+      on different connections.
+    * BUG 10749: s4-rpc: dnsserver: Handle updates of tombstoned dnsNode
+      objects.
+    * BUG 10751: s4-rpc: dnsserver: return DNS_RANK_NS_GLUE recors when
+      explicitly asked for.
+    * BUG 10773: libcli/security: Add better detection of
+      SECINFO_[UN]PROTECTED_[D|S]ACL in get_sec_info().
+
+
+o   Marc Muehlfeld <mmuehlfeld at samba.org>
+    * BUG 10761: docs: Fix typos in smb.conf (inherit acls).
+
+
+o   Shirish Pargaonkar <spargaonkar at suse.com>
+    * BUG 10755: samba: Retain case sensitivity of cifs client.
+
+
+o   Arvid Requate <requate at univention.de>
+    * BUG 9570: passdb: Fix NT_STATUS_NO_SUCH_GROUP.
+
+
+o   Har Gagan Sahai <SHarGagan at novell.com>
+    * BUG 10759: Fix a memory leak in cli_set_mntpoint().
+
+
+o   Roel van Meer <roel at 1afa.com>
+    * BUG 10777: Don't discard result of checking grouptype.
+
+
+#######################################
+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.11
                            August 1, 2014
                    ==============================
@@ -44,10 +177,8 @@ database (https://bugzilla.samba.org/).
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
 
-======================================================================
 
                    ==============================
                    Release Notes for Samba 4.1.10
diff --git a/docs-xml/manpages/net.8.xml b/docs-xml/manpages/net.8.xml
index e2e1b8f..4c88008 100644
--- a/docs-xml/manpages/net.8.xml
+++ b/docs-xml/manpages/net.8.xml
@@ -404,7 +404,8 @@ YOU HAVE BEEN WARNED.
 <title>TIME</title>
 
 <para>Without any options, the <command>NET TIME</command> command 
-displays the time on the remote server.
+displays the time on the remote server. The remote server must be
+specified with the -S option.
 </para>
 
 </refsect3>
@@ -412,21 +413,27 @@ displays the time on the remote server.
 <refsect3>
 <title>TIME SYSTEM</title>
 
-<para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
+<para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
+The remote server must be specified with the -S option.
+</para>
 
 </refsect3>
 
 <refsect3>
 <title>TIME SET</title>
 <para>Tries to set the date and time of the local server to that on 
-the remote server using <command>/bin/date</command>. </para>
+the remote server using <command>/bin/date</command>.
+The remote server must be specified with the -S option.
+</para>
 
 </refsect3>
 
 <refsect3>
 <title>TIME ZONE</title>
 
-<para>Displays the timezone in hours from GMT on the remote computer.</para>
+<para>Displays the timezone in hours from GMT on the remote server.
+The remote server must be specified with the -S option.
+</para>
 
 </refsect3>
 </refsect2>
diff --git a/docs-xml/smbdotconf/security/inheritowner.xml b/docs-xml/smbdotconf/security/inheritowner.xml
index ba4fc61..0ed8285 100644
--- a/docs-xml/smbdotconf/security/inheritowner.xml
+++ b/docs-xml/smbdotconf/security/inheritowner.xml
@@ -10,9 +10,9 @@
 	by the ownership of the parent directory.</para>
 	
 	<para>Common scenarios where this behavior is useful is in 
-	implementing drop-boxes where users can create and edit files but not 
-	delete them and to ensure that newly create files in a user's
-	roaming profile directory are actually owner by the user.</para>
+	implementing drop-boxes, where users can create and edit files but
+	not delete them and ensuring that newly created files in a user's
+	roaming profile directory are actually owned by the user.</para>
 </description>
 
 <related>inherit permissions</related>
diff --git a/docs-xml/smbdotconf/winbind/winbindrequesttimeout.xml b/docs-xml/smbdotconf/winbind/winbindrequesttimeout.xml
new file mode 100644
index 0000000..3220871
--- /dev/null
+++ b/docs-xml/smbdotconf/winbind/winbindrequesttimeout.xml
@@ -0,0 +1,16 @@
+<samba:parameter name="winbind request timeout"
+                 context="G"
+				 type="integer"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>This parameter specifies the number of
+	seconds the <citerefentry><refentrytitle>winbindd</refentrytitle>
+	<manvolnum>8</manvolnum></citerefentry> daemon will wait before
+	disconnecting either a client connection with no outstanding
+	requests (idle) or a client connection with a request that has
+	remained outstanding (hung) for longer than this number of seconds.</para>
+</description>
+
+<value type="default">60</value>
+</samba:parameter>
diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c
index 61f0044..d9d5df6 100644
--- a/lib/param/param_functions.c
+++ b/lib/param/param_functions.c
@@ -341,6 +341,7 @@ FN_GLOBAL_INTEGER(winbind_cache_time, winbind_cache_time)
 FN_GLOBAL_INTEGER(winbind_expand_groups, winbind_expand_groups)
 FN_GLOBAL_INTEGER(winbind_max_clients, winbind_max_clients)
 FN_GLOBAL_INTEGER(winbind_reconnect_delay, winbind_reconnect_delay)
+FN_GLOBAL_INTEGER(winbind_request_timeout, winbind_request_timeout)
 FN_GLOBAL_LIST(auth_methods, AuthMethods)
 FN_GLOBAL_LIST(cluster_addresses, szClusterAddresses)
 FN_GLOBAL_LIST(dcerpc_endpoint_servers, dcerpc_ep_servers)
diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index 7b32998..8e3f952 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -4018,6 +4018,15 @@ static struct parm_struct parm_table[] = {
 		.flags		= FLAG_ADVANCED,
 	},
 	{
+		.label		= "winbind request timeout",
+		.type		= P_INTEGER,
+		.p_class	= P_GLOBAL,
+		.offset		= GLOBAL_VAR(winbind_request_timeout),
+		.special	= NULL,
+		.enum_list	= NULL,
+		.flags		= FLAG_ADVANCED,
+	},
+	{
 		.label		= "winbind max clients",
 		.type		= P_INTEGER,
 		.p_class	= P_GLOBAL,
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index c0b7997..cd0c25e 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -899,4 +899,9 @@ int usleep(useconds_t);
 void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
 #endif
 
+/* Needed for Solaris atomic_add_XX functions. */
+#if defined(HAVE_SYS_ATOMIC_H)
+#include <sys/atomic.h>
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 8451689..f0040b1 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -106,6 +106,7 @@ struct foo bar = { .y = 'X', .x = 1 };
     conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
     conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h')
     conf.CHECK_HEADERS('syscall.h sys/syscall.h inttypes.h')
+    conf.CHECK_HEADERS('sys/atomic.h')
 
     # Check for process set name support
     conf.CHECK_CODE('''
@@ -225,6 +226,30 @@ struct foo bar = { .y = 'X', .x = 1 };
                        msg="Checking whether we have ucontext_t",
                        headers='signal.h sys/ucontext.h')
 
+    # Check for atomic builtins. */
+    conf.CHECK_CODE('''
+                    int main(void) {
+                        int i;
+                        (void)__sync_fetch_and_add(&i, 1);
+                        return 0;
+                    }
+                    ''',
+                    'HAVE___SYNC_FETCH_AND_ADD',
+                    msg='Checking for __sync_fetch_and_add compiler builtin')
+
+    conf.CHECK_CODE('''
+                    #include <stdint.h>
+                    #include <sys/atomic.h>
+                    int main(void) {
+                        int32_t i;
+                        atomic_add_32(&i, 1);
+                        return 0;
+                    }
+                    ''',
+                    'HAVE_ATOMIC_ADD_32',
+                    headers='stdint.h sys/atomic.h',
+                    msg='Checking for atomic_add_32 compiler builtin')
+
     # these may be builtins, so we need the link=False strategy
     conf.CHECK_FUNCS('strdup memmem printf memset memcpy memmove strcpy strncpy bzero', link=False)
 
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index 0fdf646..95a099d 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -42,7 +42,13 @@ struct tevent_sigcounter {
 	uint32_t seen;
 };
 
+#if defined(HAVE___SYNC_FETCH_AND_ADD)
+#define TEVENT_SIG_INCREMENT(s) __sync_fetch_and_add(&((s).count), 1)
+#elif defined(HAVE_ATOMIC_ADD_32)
+#define TEVENT_SIG_INCREMENT(s) atomic_add_32(&((s).count), 1)
+#else
 #define TEVENT_SIG_INCREMENT(s) (s).count++
+#endif
 #define TEVENT_SIG_SEEN(s, n) (s).seen += (n)
 #define TEVENT_SIG_PENDING(s) ((s).seen != (s).count)
 
diff --git a/lib/util/charset/tests/charset.c b/lib/util/charset/tests/charset.c
index 70b6741..a47670e 100644
--- a/lib/util/charset/tests/charset.c
+++ b/lib/util/charset/tests/charset.c
@@ -50,12 +50,18 @@ static bool test_codepoint_cmpi(struct torture_context *tctx)
 
 static bool test_strcasecmp_m(struct torture_context *tctx)
 {
+	/* file.{accented e} in iso8859-1 */
+	const char file_iso8859_1[7] = { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xe9, 0 };
+	/* file.{accented e} in utf8 */
+	const char file_utf8[8] =      { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xc3, 0xa9, 0 };
 	torture_assert(tctx, strcasecmp_m("foo", "bar") != 0, "different strings");
 	torture_assert(tctx, strcasecmp_m("foo", "foo") == 0, "same case strings");
 	torture_assert(tctx, strcasecmp_m("foo", "Foo") == 0, "different case strings");
 	torture_assert(tctx, strcasecmp_m(NULL, "Foo") != 0, "one NULL");
 	torture_assert(tctx, strcasecmp_m("foo", NULL) != 0, "other NULL");
 	torture_assert(tctx, strcasecmp_m(NULL, NULL) == 0, "both NULL");
+	torture_assert(tctx, strcasecmp_m(file_iso8859_1, file_utf8) != 0,
+		"file.{accented e} should differ");
 	return true;
 }
 
@@ -102,6 +108,10 @@ static bool test_string_replace_m(struct torture_context *tctx)
 
 static bool test_strncasecmp_m(struct torture_context *tctx)
 {
+	/* file.{accented e} in iso8859-1 */
+	const char file_iso8859_1[7] = { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xe9, 0 };
+	/* file.{accented e} in utf8 */
+	const char file_utf8[8] =      { 0x66, 0x69, 0x6c, 0x65, 0x2d, 0xc3, 0xa9, 0 };
 	torture_assert(tctx, strncasecmp_m("foo", "bar", 3) != 0, "different strings");
 	torture_assert(tctx, strncasecmp_m("foo", "foo", 3) == 0, "same case strings");
 	torture_assert(tctx, strncasecmp_m("foo", "Foo", 3) == 0, "different case strings");
@@ -111,6 +121,8 @@ static bool test_strncasecmp_m(struct torture_context *tctx)
 	torture_assert(tctx, strncasecmp_m(NULL, "Foo", 3) != 0, "one NULL");
 	torture_assert(tctx, strncasecmp_m("foo", NULL, 3) != 0, "other NULL");
 	torture_assert(tctx, strncasecmp_m(NULL, NULL, 3) == 0, "both NULL");
+	torture_assert(tctx, strncasecmp_m(file_iso8859_1, file_utf8, 6) != 0,
+		"file.{accented e} should differ");
 	return true;
 }
 
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index 688ab5a..d2e6cbb 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -47,6 +47,11 @@ _PUBLIC_ int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 		c1 = next_codepoint_handle(iconv_handle, s1, &size1);
 		c2 = next_codepoint_handle(iconv_handle, s2, &size2);
 
+		if (c1 == INVALID_CODEPOINT ||
+		    c2 == INVALID_CODEPOINT) {
+			return strcasecmp(s1, s2);
+		}
+
 		s1 += size1;
 		s2 += size2;
 
@@ -54,12 +59,6 @@ _PUBLIC_ int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 			continue;
 		}
 
-		if (c1 == INVALID_CODEPOINT ||
-		    c2 == INVALID_CODEPOINT) {
-			/* what else can we do?? */
-			return strcasecmp(s1, s2);
-		}
-
 		if (toupper_m(c1) != toupper_m(c2)) {
 			return c1 - c2;
 		}
@@ -97,6 +96,26 @@ _PUBLIC_ int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 		c1 = next_codepoint_handle(iconv_handle, s1, &size1);
 		c2 = next_codepoint_handle(iconv_handle, s2, &size2);
 
+		if (c1 == INVALID_CODEPOINT ||
+		    c2 == INVALID_CODEPOINT) {
+			/*
+			 * n was specified in characters,
+			 * now we must convert it to bytes.
+			 * As bytes are the smallest
+			 * character unit, the following
+			 * increment and strncasecmp is always
+			 * safe.
+			 *
+			 * The source string was already known
+			 * to be n characters long, so we are
+			 * guaranteed to be able to look at the
+			 * (n remaining + size1) bytes from the
+			 * s1 position).
+			 */
+			n += size1;
+			return strncasecmp(s1, s2, n);
+		}
+
 		s1 += size1;
 		s2 += size2;
 
@@ -104,12 +123,6 @@ _PUBLIC_ int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
 			continue;
 		}
 
-		if (c1 == INVALID_CODEPOINT ||
-		    c2 == INVALID_CODEPOINT) {
-			/* what else can we do?? */
-			return strcasecmp(s1, s2);
-		}
-
 		if (toupper_m(c1) != toupper_m(c2)) {
 			return c1 - c2;
 		}
diff --git a/source3/lib/memcache.c b/lib/util/memcache.c
similarity index 95%
rename from source3/lib/memcache.c
rename to lib/util/memcache.c
index 88453f3..50e59fc 100644
--- a/source3/lib/memcache.c
+++ b/lib/util/memcache.c
@@ -17,8 +17,13 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "memcache.h"
+#include "replace.h"
+#include <talloc.h>
+#include "../lib/util/samba_util.h"
+#include "../lib/util/debug.h"
+#include "../lib/util/dlinklist.h"
 #include "../lib/util/rbtree.h"
+#include "memcache.h"
 
 static struct memcache *global_cache;
 
@@ -26,7 +31,7 @@ struct memcache_element {
 	struct rb_node rb_node;
 	struct memcache_element *prev, *next;
 	size_t keylength, valuelength;
-	uint8 n;		/* This is really an enum, but save memory */
+	uint8_t n;		/* This is really an enum, but save memory */
 	char data[1];		/* placeholder for offsetof */
 };


-- 
Samba Shared Repository


More information about the samba-cvs mailing list