[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0rc2-148-g5a882d8

Karolin Seeger kseeger at samba.org
Tue Jan 20 13:46:43 GMT 2009


The branch, v3-3-stable has been updated
       via  5a882d8b5801f1d7c8a70d1a50b474066b1bf0fb (commit)
       via  ed5dfd619bfbfdfa87eec5f3d9e828321febe347 (commit)
       via  f3a93b5bff5d4002ed46a71d6b26d8b7c15a193c (commit)
       via  e69033012122e2f2fc9dc6731d16daca98b25092 (commit)
       via  221bfd9e4512b086c4b99f3e34737341c2f77233 (commit)
       via  30db1be18438298b529c15f7b72d0465ad271f29 (commit)
       via  c116afda08d8b6653b079933858cf444325b4ab7 (commit)
       via  8c722e34ed6e0368cd7b2a643694ec374c78b5bb (commit)
       via  fac9e930c6bfff9c6f2526814f08cb1a0b3e9f02 (commit)
       via  3f8c7dc3560ec4356ff3c7dffe92394d8ddf62cd (commit)
       via  3a964d47446e08208435757829131efa9a4ccac3 (commit)
       via  5381e478416e1c7e08b938a06b0491bdda169c39 (commit)
       via  6530d84cc18513b1bfaded4dbd01bd517d7b0831 (commit)
       via  1fef03e814a3d3a73f2bd59b3ded1fd707cf9b93 (commit)
       via  45e4ab067b74ba31388d39aec80496b1217ada67 (commit)
       via  fde962def114e51e536719c2a6dd54727d7aaff1 (commit)
       via  927372a559e153a5a14055463e2e5eaba0c460d5 (commit)
       via  662182b62e0fd08c8c256884428a405b2950fd03 (commit)
       via  93e13e56dc8b085eb8119296457fe2809c7074c1 (commit)
       via  a6c7adfb1ee3b7bb7e5993fe1ad1dd45b6af2e7f (commit)
       via  ca87519ad47a1347ec2e1283e1af65eefe127dec (commit)
       via  ffd5792c4e51058ff797a94200dcc63963a597dd (commit)
       via  1d5ff6d55091d430e76722223ea6c8204b55398e (commit)
       via  caed80e66252222f99f9e85223e9ca0378104ba8 (commit)
       via  7945187b78cd10cb8eb89cdfb7fd32d2d6c5f14c (commit)
       via  e97904610006bde4ab112e09588947af4322311e (commit)
       via  5461154831ee99f2cecab26a2be380b97dbdca4c (commit)
      from  777f16abf15afdce4bb9017306276c5b745f116c (commit)

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


- Log -----------------------------------------------------------------
commit 5a882d8b5801f1d7c8a70d1a50b474066b1bf0fb
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Jan 20 11:35:55 2009 +0100

    WHATSNEW: Update changes.
    
    Karolin
    (cherry picked from commit 28a80ea826aa53337817f9d0ce545b6ac3fd54f2)

commit ed5dfd619bfbfdfa87eec5f3d9e828321febe347
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jan 19 16:37:53 2009 -0800

    socket_wrapper: fix PCAP support broken by aaea68791cfea45c6fa69abc93ad6d0e832d0283
    
    We should not close the fd after writing the first packet.
    
    metze
    (cherry picked from commit 53e8f92678428a0c3cbeefa83219609661d28831)

commit f3a93b5bff5d4002ed46a71d6b26d8b7c15a193c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jan 19 16:26:00 2009 -0800

    s3: reinit_after_fork() should reinit the event context before the
    messaging context
    
    Because messaging_reinit() may add events to the event context, which will
    removed by event_context_reinit().
    
    metze
    (cherry picked from commit 56af6112d67aa9dd3757297fbe29ce1a3eabf00d)

commit e69033012122e2f2fc9dc6731d16daca98b25092
Author: Andreas Schneider <anschneider at suse.de>
Date:   Mon Jan 19 16:26:07 2009 +0100

    Avoid flooding of syslog with failing pam_putenv messages.
    
    Signed-off-by: Andreas Schneider <anschneider at suse.de>
    Signed-off-by: Günther Deschner <gd at samba.org>
    (cherry picked from commit acb1debf257c6c3df325267b2a4c8e2d40c1f850)

commit 221bfd9e4512b086c4b99f3e34737341c2f77233
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Jan 19 10:22:46 2009 +0100

    S3-ByExample: Use 'winbindd -D' instead of 'winbindd -B'.
    
    The option '-B' does not exist at all.
    
    Thanks to Jason Ellison for reporting!
    
    Karolin
    (cherry picked from commit 4b26c7bbf4fe93f5ffb92d3f04012be290be25be)
    (cherry picked from commit 05c7d97e6cf25c05ba6a661c0a31c88946ffd5cd)

commit 30db1be18438298b529c15f7b72d0465ad271f29
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Jan 19 08:55:30 2009 +0100

    S3-HowTo: Change 'winbindd -B' to 'winbindd -D'.
    
    There is no option '-B' at all.
    
    Thanks to Jason Ellison for reporting!
    
    Karolin
    (cherry picked from commit 7c1e08518bfbe054db270e72476c642d5db93c0a)
    (cherry picked from commit 3b5d2fd4cc5f7cbe22be1dfc593ca4ba29197b66)

commit c116afda08d8b6653b079933858cf444325b4ab7
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Sat Jan 17 13:21:54 2009 -0500

    Determine case sensitivity based on file system attributes.
    
    - Most of the time, we can determine from the file system we're connecting to
      whether it supports case sensitivity. In those cases, we now set the
      internal case sensitivity flag automatically. For those cases where the
      request to retrieve file system attributes fails, we'll use the
      user-specified option value.
    
    Derrell
    (cherry picked from commit 005bd7eee44160e4531e46be85c67650821a8328)

commit 8c722e34ed6e0368cd7b2a643694ec374c78b5bb
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 14 12:09:46 2009 +0100

    s3:cluster: fix ctdb ipv6 support
    
    We need to use CTDB_CONTROL_TCP_CLIENT instead of CTDB_CONTROL_TCP_ADD.
    
    CTDB_CONTROL_TCP_CLIENT has support for 2 modes in newer ctdb versions:
    
    - with struct ctdb_control_tcp it only supports ipv4.
    - with struct ctdb_control_tcp_addr it supports ipv4 and ipv6.
    
    You need new header files which defines struct ctdb_control_tcp_addr,
    but at runtime it should be fine to work against older
    ctdb versions (<= 1.0.68).
    
    metze
    (cherry picked from commit dc6edf1ab4ae8e3fb3ef40b93135ff0ef5407e12)
    (cherry picked from commit c07bcd6efd3383fc3a46fce35fd34df85ab221c9)

commit fac9e930c6bfff9c6f2526814f08cb1a0b3e9f02
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 14 11:52:01 2009 +0100

    s3:docs: vfs_fileid manpage
    
    metze
    (cherry picked from commit 6a94b7b9270f3d69595b93e2632051c9842645c9)
    (cherry picked from commit 8e13be1db5c51002ae72c42c505a79406b2f4f63)

commit 3f8c7dc3560ec4356ff3c7dffe92394d8ddf62cd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 14 13:59:09 2009 +0100

    s3:vfs_fileid: readd "fileid:algorithm" as option.
    
    "fileid:mapping" is still supported as fallback.
    
    metze
    (cherry picked from commit 554a89df0cf6d9832778e2913f9fe50b78baeedc)
    (cherry picked from commit fe9ad21b8cb5286845350fe2280da2cbe2647bb7)

commit 3a964d47446e08208435757829131efa9a4ccac3
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Fri Jan 16 20:30:11 2009 -0500

    [Bug 6022] smbc_urlencode and smbc_urldecode were not exported
    
    - Since the revamp of libsmbclient, there has still been an external
      declaration for smbc_urlencode and smbc_urldecode in libsmbclient.h, yet
      those functions were renamed and made private. The two choices were to
      remove the function names from libsmbclient.h or to make them public
      again. The reported requested that they be public. This commit makes it so.
    
    Derrell
    (cherry picked from commit bf7eb0164b0c69d5d0f3019f3aa524846f6a4394)

commit 5381e478416e1c7e08b938a06b0491bdda169c39
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Fri Jan 16 15:55:08 2009 -0500

    Treat file names in POSIX-like case-sensitive fashion by default
    
    *** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! ***
    
    - libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default,
      it requests case-sensitive, but the old behavior of case-insensitive can be
      requested with smbc_setOptionCaseSensitive(context, False);
    
      The change of behavior is considered a bug fix, as it was previously
      possible to accidentally overwrite a file that had the same case-insensitive
      name but a different case-sensitive name as a previously-existing file,
      while creating a new file.
    
    Derrell
    (cherry picked from commit 20b765f0a20fe7329559e4bf2a9dac4fe8e13c18)

commit 6530d84cc18513b1bfaded4dbd01bd517d7b0831
Author: Andreas Schneider <anschneider at suse.de>
Date:   Fri Jan 16 12:24:58 2009 -0800

    Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx.
    (cherry picked from commit 889d0dff4e4cfd4d4b4ed16ad64de303c795f879)

commit 1fef03e814a3d3a73f2bd59b3ded1fd707cf9b93
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jan 16 11:55:57 2009 -0800

    "First thing, kill all the language lawyers" :-). Ensure possible insane compilers
    can't kill us later.
    Jeremy.
    (cherry picked from commit 54913913be90323889b2f4dbd6a3ab75f4fa7ccd)

commit 45e4ab067b74ba31388d39aec80496b1217ada67
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Fri Jan 16 12:06:49 2009 -0600

    ads_connect: Return immediately on a failed GC connection.
    
    ads_connect_gc() feeds an explicit server to ads_connect().  However, if the
    resulting connection fails, the latter function was attempting to find a DC
    on its own and continuing the connection.  This resulting in GC searches being
    sent over a connection using port 389 which would fail when using the base
    search suffix outside of the domain naming context.
    
    The fix is to fail immediately in ads_connect() since the GC lookup ordering
    is handled already in ads_connect_gc().
    
    (was commit 073e9f42f0c5f5de5d736ec7843d80a274c891ce in master)
    (cherry picked from commit 2d0fd7543d0543ce59cb84db64afb99aa1f304b4)

commit fde962def114e51e536719c2a6dd54727d7aaff1
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 15 15:55:29 2009 -0800

    Fix bug #6040 -  Missing <th> header in Status page.
    Based on a patch from pkg-samba-maint at lists.alioth.debian.org.
    Jeremy.
    (cherry picked from commit 3764e6ed2a683a69706d7654e46b998de9294883)

commit 927372a559e153a5a14055463e2e5eaba0c460d5
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 15 15:50:50 2009 -0800

    Allow reinit_after_fork to be called safely from within swat and other binaries that don't have
    an event context or a msg context. Fixes crash bug in swat.
    Jeremy.
    (cherry picked from commit 45e6f9c5a4b5d9cdb89f398f1238872251ccbe54)

commit 662182b62e0fd08c8c256884428a405b2950fd03
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 15 13:46:38 2009 +0100

    packaging(RHEL-CTDB): export CC - really use ccache...
    
    metze
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 51e34b38959115e8a04795837b5c5983dc8d824c)

commit 93e13e56dc8b085eb8119296457fe2809c7074c1
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 15 10:41:01 2009 -0800

    Fix bug #6040 - Calling Samba print server with an aliased DNS-name fails.
    Jeremy.
    (cherry picked from commit d6f1bb7677997c4eaa0e474de590c0b36f2dcb3f)

commit a6c7adfb1ee3b7bb7e5993fe1ad1dd45b6af2e7f
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jan 14 13:15:59 2009 -0800

    Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.
    Jeremy.
    (cherry picked from commit 6a8496adce6fa54d5cb86592dd977168319d5da3)

commit ca87519ad47a1347ec2e1283e1af65eefe127dec
Author: Bo Yang <boyang at novell.com>
Date:   Wed Jan 14 11:48:16 2009 -0800

    Fix bug in get_dc_name_via_netlogon(), null pointer refrence.
    (cherry picked from commit 43d6aabfa58cda95f362e86c324c7f2ae21aec53)

commit ffd5792c4e51058ff797a94200dcc63963a597dd
Author: Bo Yang <boyang at novell.com>
Date:   Wed Jan 14 11:16:00 2009 -0800

    Don't send message to any other child in child process.
    (cherry picked from commit d521529b3fcbcd7b183eb466bc06497998fd7e28)

commit 1d5ff6d55091d430e76722223ea6c8204b55398e
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 13 15:42:29 2009 -0800

    From boyang - ensure we never "return" from a forked child, always _exit().
    Jeremy.
    (cherry picked from commit c2515026807e08c7836ef1bd6220bd7eab3a1a5b)

commit caed80e66252222f99f9e85223e9ca0378104ba8
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 13 11:15:00 2009 -0800

    Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
    Jeremy.
    (cherry picked from commit 0e4182d6fd49afe5b2629552e0b53c6e177275a9)

commit 7945187b78cd10cb8eb89cdfb7fd32d2d6c5f14c
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jan 12 16:27:31 2009 -0800

    Deprecate the "share modes" parameter to address bug #6024, swat disagrees with smbstatus as to share mode with share modes = No set in samba.
    Jeremy.
    (cherry picked from commit d727c40eabc72f9351dcf5cd17a079c83f349c65)

commit e97904610006bde4ab112e09588947af4322311e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jan 12 12:32:46 2009 +0100

    s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp cases
    
    SMB signing works the same regardless of the used auth mech.
    
    We need to start with the temp signing ("BSRSPYL ")
    and the session setup response with NT_STATUS_OK
    is the first signed packet.
    
    Now we set the krb5 session key if we got the NT_STATUS_OK
    from the server and then recheck the packet.
    
    All this is needed to make the fallback from krb5 to
    ntlmssp possible. This commit also resets the cli->vuid
    value to 0, if the krb5 auth didn't succeed. Otherwise
    the server handles NTLMSSP packets as krb5 packets.
    
    The restructuring of the SMB signing code is needed to
    make sure the krb5 code only starts the signing engine
    on success. Otherwise the NTLMSSP fallback could not initialize
    the signing engine (again).
    
    metze
    (cherry picked from commit 7d9fd64f38aa5821b38c1223cf87979fc87bfb71)
    (cherry picked from commit 8e29070ccd0b5103af2e6da75644169f46700313)

commit 5461154831ee99f2cecab26a2be380b97dbdca4c
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 10 17:59:43 2009 +0100

    Even for srclen == 0 we have to return something
    
    This fixes a regression reported by Corinna Vinschen <corinna at vinschen.de>
    
    Thanks,
    
    Volker
    (cherry picked from commit eb980cd213c9e2b0dc72ffd3c80efd54bef73c82)

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

Summary of changes:
 WHATSNEW.txt                                       |    5 +-
 .../Samba3-ByExample/SBE-DomainAppsSupport.xml     |    2 +-
 .../Samba3-ByExample/SBE-SecureOfficeServer.xml    |    4 +-
 docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml   |    4 +-
 docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml        |    6 +-
 docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml          |    4 +-
 docs-xml/manpages-3/vfs_fileid.8.xml               |  112 ++++++++++++++++++++
 docs-xml/smbdotconf/locking/sharemodes.xml         |   23 ++--
 packaging/RHEL-CTDB/samba.spec.tmpl                |    2 +
 source/include/ctdbd_conn.h                        |    4 +-
 source/include/libsmb_internal.h                   |   15 +--
 source/include/libsmbclient.h                      |   21 ++++
 source/lib/charcnv.c                               |    6 +
 source/lib/ctdbd_conn.c                            |   30 ++++--
 source/lib/dummysmbd.c                             |    7 +-
 source/lib/sendfile.c                              |    4 +-
 source/lib/socket_wrapper/socket_wrapper.c         |    4 +-
 source/lib/util.c                                  |   24 +++--
 source/lib/util_sock.c                             |    9 +-
 source/libads/ldap.c                               |   17 +++-
 source/libsmb/cliconnect.c                         |   51 ++++++---
 source/libsmb/libsmb_context.c                     |    1 +
 source/libsmb/libsmb_dir.c                         |    2 +-
 source/libsmb/libsmb_path.c                        |   10 +-
 source/libsmb/libsmb_server.c                      |   66 +++++++++++-
 source/libsmb/libsmb_setget.c                      |   26 +++++
 source/modules/vfs_fileid.c                        |    8 ++-
 source/nsswitch/pam_winbind.c                      |    2 +-
 source/param/loadparm.c                            |    2 +-
 source/passdb/pdb_smbpasswd.c                      |    2 +-
 source/smbd/reply.c                                |    4 +-
 source/smbd/server.c                               |    4 +-
 source/web/statuspage.c                            |    3 +-
 source/winbindd/winbindd_cm.c                      |    8 +-
 source/winbindd/winbindd_dual.c                    |   38 ++++++-
 35 files changed, 422 insertions(+), 108 deletions(-)
 create mode 100644 docs-xml/manpages-3/vfs_fileid.8.xml


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 9f28a3c..49d28cc 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,6 +1,6 @@
                    =============================
                    Release Notes for Samba 3.3.0
-			  January, 05 2009
+			  January, 27 2009
                    =============================
 
 This is the first stable release of Samba 3.3.0.
@@ -17,6 +17,8 @@ Major enhancements in Samba 3.3.0 include:
 
  File Serving:
  o Extended Cluster support.
+ o New experimental VFS modules "vfs_acl_xattr" and "vfs_acl_tdb"
+   to store NTFS ACLs on Samba file servers.
 
  Winbind:
  o Simplified idmap configuration.
@@ -192,6 +194,7 @@ smb.conf changes
     Parameter Name                      Description     Default
     --------------                      -----------     -------
     cups connection timeout		New		30
+    idmap config DOM:range		Removed
     idmap domains			Removed
     init logon delayed hosts		New		""
     init logon delay			New		100
diff --git a/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml b/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml
index 6d144ab..c9ccd43 100644
--- a/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml
+++ b/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml
@@ -477,7 +477,7 @@ Password for ADMINISTRATOR at LONDON.ABMAS.BIZ:
 <screen>
 &rootprompt; smbd -D
 &rootprompt; nmbd -D
-&rootprompt; winbindd -B
+&rootprompt; winbindd -D
 </screen>
 		</para></step>
 
diff --git a/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml b/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml
index e03c010..2e60b4a 100644
--- a/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml
+++ b/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml
@@ -1910,8 +1910,8 @@ Loaded services file OK.
 14290 ?        S      0:00 /usr/sbin/smbd -D
 
 $rootprompt; ps ax | grep winbind
-14293 ?        S     0:00 /usr/sbin/winbindd -B
-14295 ?        S     0:00 /usr/sbin/winbindd -B
+14293 ?        S     0:00 /usr/sbin/winbindd -D
+14295 ?        S     0:00 /usr/sbin/winbindd -D
 </screen>
 			The <command>winbindd</command> daemon is running in split mode (normal), so there are also
 			two instances<footnote><para>For more information regarding winbindd, see <emphasis>TOSHARG2</emphasis>, 
diff --git a/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml b/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml
index ca39af3..b178749 100644
--- a/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml
+++ b/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml
@@ -767,8 +767,8 @@ Ignoring unknown parameter "dogbert"
 14290 ?        S      0:00 /usr/sbin/smbd -D
 
 $rootprompt; ps ax | grep winbind
-14293 ?        S     0:00 /usr/sbin/winbindd -B
-14295 ?        S     0:00 /usr/sbin/winbindd -B
+14293 ?        S     0:00 /usr/sbin/winbindd -D
+14295 ?        S     0:00 /usr/sbin/winbindd -D
 </screen>
 			The <command>winbindd</command> daemon is running in split mode (normal), so there are also
 			two instances of it. For more information regarding <command>winbindd</command>, see
diff --git a/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml b/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
index 130da81..1f1f51c 100644
--- a/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
+++ b/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
@@ -492,9 +492,9 @@ netbios-ns dgram udp wait root /usr/local/samba/sbin/nmbd nmbd
 
 <para><programlisting>
 #!/bin/sh
-/usr/local/samba/sbin/smbd -D 
-/usr/local/samba/sbin/winbindd -B
-/usr/local/samba/sbin/nmbd -D 
+/usr/local/samba/sbin/smbd -D
+/usr/local/samba/sbin/winbindd -D
+/usr/local/samba/sbin/nmbd -D
 </programlisting></para>
 
 	<para>
diff --git a/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml b/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml
index 7731e4e..adb0ba2 100644
--- a/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml
+++ b/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml
@@ -1016,7 +1016,7 @@ start() {
 in the example above with:
 
 <programlisting>
-        daemon /usr/local/samba/sbin/winbindd -B
+        daemon /usr/local/samba/sbin/winbindd -D
 </programlisting>.
 </para>
 
@@ -1125,7 +1125,7 @@ Again, if you would like to run Samba in dual daemon mode, replace:
 </programlisting>
 in the script above with:
 <programlisting>
-/usr/local/samba/sbin/winbindd -B
+/usr/local/samba/sbin/winbindd -D
 </programlisting>
 </para>
 
diff --git a/docs-xml/manpages-3/vfs_fileid.8.xml b/docs-xml/manpages-3/vfs_fileid.8.xml
new file mode 100644
index 0000000..202d693
--- /dev/null
+++ b/docs-xml/manpages-3/vfs_fileid.8.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
+<refentry id="vfs_fileid.8">
+
+<refmeta>
+	<refentrytitle>vfs_fileid</refentrytitle>
+	<manvolnum>8</manvolnum>
+	<refmiscinfo class="source">Samba</refmiscinfo>
+	<refmiscinfo class="manual">System Administration tools</refmiscinfo>
+	<refmiscinfo class="version">3.2</refmiscinfo>
+</refmeta>
+
+
+<refnamediv>
+	<refname>vfs_fileid</refname>
+	<refpurpose>Generates file_id structs with unique device id values for
+	cluster setups</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+	<cmdsynopsis>
+		<command>vfs objects = fileid</command>
+	</cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1>
+	<title>DESCRIPTION</title>
+
+	<para>This VFS module is part of the
+	<citerefentry><refentrytitle>samba</refentrytitle>
+	<manvolnum>7</manvolnum></citerefentry>
+	suite.</para>
+
+	<para>Samba uses file_id structs to uniquely identify files
+	for locking purpose. By default the file_id contains the device
+	and inode number returned by the <command>stat()</command> system call.
+	As the file_id is a unique identifier of a file, it must be the same
+	on all nodes in a cluster setup. This module overloads the
+	<command>SMB_VFS_FILE_ID_CREATE()</command> operation and
+	generates the device number based on the configured algorithm
+	(see the "fileid:algorithm" option).
+	</para>
+</refsect1>
+
+
+<refsect1>
+	<title>OPTIONS</title>
+
+	<variablelist>
+
+		<varlistentry>
+		<term>fileid:algorithm = ALGORITHM</term>
+		<listitem>
+		<para>Available algorithms are <command>fsname</command>
+		and <command>fsid</command>. The default value is
+		<command>fsname</command>.
+		</para>
+		<para>The <command>fsname</command> algorithm generates
+		device id by hashing the kernel device name.
+		</para>
+		<para>The <command>fsid</command> algorithm generates
+		the device id from the <command>f_fsid</command> returned
+		from the <command>statfs()</command> syscall.
+		</para>
+		</listitem>
+		</varlistentry>
+
+		<varlistentry>
+		<term>fileid:mapping = ALGORITHM</term>
+		<listitem>
+		<para>This option is the legacy version of the
+		<command>fileid:algorithm</command> option, which was used in earlier
+		versions of fileid mapping feature in custom Samba 3.0 versions.
+		</para>
+		</listitem>
+		</varlistentry>
+
+	</variablelist>
+</refsect1>
+
+<refsect1>
+	<title>EXAMPLES</title>
+
+	<para>Usage of the <command>fileid</command> module with the
+	<command>fsid</command> algorithm:</para>
+
+<programlisting>
+        <smbconfsection name="[global]"/>
+	<smbconfoption name="vfs objects">fileid</smbconfoption>
+	<smbconfoption name="fileid:algorithm">fsid</smbconfoption>
+</programlisting>
+
+</refsect1>
+
+<refsect1>
+	<title>VERSION</title>
+
+	<para>This man page is correct for version 3.2 of the Samba suite.
+	</para>
+</refsect1>
+
+<refsect1>
+	<title>AUTHOR</title>
+
+	<para>The original Samba software and related utilities
+	were created by Andrew Tridgell. Samba is now developed
+	by the Samba Team as an Open Source project similar
+	to the way the Linux kernel is developed.</para>
+
+</refsect1>
+
+</refentry>
diff --git a/docs-xml/smbdotconf/locking/sharemodes.xml b/docs-xml/smbdotconf/locking/sharemodes.xml
index e8371a5..c529886 100644
--- a/docs-xml/smbdotconf/locking/sharemodes.xml
+++ b/docs-xml/smbdotconf/locking/sharemodes.xml
@@ -3,25 +3,26 @@
                  context="S"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
-	<para>This enables or disables the honoring of 
-	the <parameter moreinfo="none">share modes</parameter> during a file open. These 
-	modes are used by clients to gain exclusive read or write access 
+	<para>This enables or disables the honoring of
+	the <parameter moreinfo="none">share modes</parameter> during a file open. These
+	modes are used by clients to gain exclusive read or write access
 	to a file.</para>
 
+	<para>This is a deprecated option from old versions of
+	Samba, and will be removed in the next major release.
+	</para>
+
 	<para>These open modes are not directly supported by UNIX, so
-	they are simulated using shared memory, or lock files if your 
-	UNIX doesn't support shared memory (almost all do).</para>
+	they are simulated using shared memory.</para>
 
-	<para>The share modes that are enabled by this option are 
-	 <constant>DENY_DOS</constant>, <constant>DENY_ALL</constant>,
-	<constant>DENY_READ</constant>, <constant>DENY_WRITE</constant>,
-	<constant>DENY_NONE</constant> and <constant>DENY_FCB</constant>.
+	<para>The share modes that are enabled by this option are
+	the standard Windows share modes.
 	</para>
 
-	<para>This option gives full share compatibility and enabled 
+	<para>This option gives full share compatibility and is enabled
 	by default.</para>
 
-	<para>You should <emphasis>NEVER</emphasis> turn this parameter 
+	<para>You should <emphasis>NEVER</emphasis> turn this parameter
 	off as many Windows applications will break if you do so.</para>
 </description>
 <value type="default">yes</value>
diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl b/packaging/RHEL-CTDB/samba.spec.tmpl
index 4806d9f..c8f31f3 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -139,6 +139,8 @@ else
 	CC="gcc"
 fi
 
+export CC
+
 ## always run autogen.sh
 ./autogen.sh
 
diff --git a/source/include/ctdbd_conn.h b/source/include/ctdbd_conn.h
index 44c3516..d721235 100644
--- a/source/include/ctdbd_conn.h
+++ b/source/include/ctdbd_conn.h
@@ -57,8 +57,8 @@ NTSTATUS ctdbd_traverse(uint32 db_id,
 			void *private_data);
 
 NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
-			    const struct sockaddr *server,
-			    const struct sockaddr *client,
+			    const struct sockaddr_storage *server,
+			    const struct sockaddr_storage *client,
 			    void (*release_ip_handler)(const char *ip_addr,
 						       void *private_data),
 			    void *private_data);
diff --git a/source/include/libsmb_internal.h b/source/include/libsmb_internal.h
index b488116..67add07 100644
--- a/source/include/libsmb_internal.h
+++ b/source/include/libsmb_internal.h
@@ -176,6 +176,11 @@ struct SMBC_internal_data {
          */
         smbc_smb_encrypt_level                  smb_encryption_level;
 
+        /*
+         * Should we request case sensitivity of file names?
+         */
+        bool                                    case_sensitive;
+
         struct smbc_server_cache * server_cache;
 
         /* POSIX emulation functions */
@@ -397,16 +402,6 @@ SMBC_errno(SMBCCTX *context,
 
 /* Functions in libsmb_path.c */
 int
-SMBC_urldecode(char *dest,
-               char *src,
-               size_t max_dest_len);
-
-int
-SMBC_urlencode(char *dest,
-               char *src,
-               int max_dest_len);
-
-int
 SMBC_parse_path(TALLOC_CTX *ctx,
 		SMBCCTX *context,
                 const char *fname,
diff --git a/source/include/libsmbclient.h b/source/include/libsmbclient.h
index a8b27b7..b2d9483 100644
--- a/source/include/libsmbclient.h
+++ b/source/include/libsmbclient.h
@@ -551,6 +551,27 @@ void
 smbc_setOptionSmbEncryptionLevel(SMBCCTX *c, smbc_smb_encrypt_level level);
 
 /**
+ * Get whether to treat file names as case-sensitive if we can't determine
+ * when connecting to the remote share whether the file system is case
+ * sensitive. This defaults to FALSE since it's most likely that if we can't
+ * retrieve the file system attributes, it's a very old file system that does
+ * not support case sensitivity.
+ */
+smbc_bool
+smbc_getOptionCaseSensitive(SMBCCTX *c);
+
+/**
+ * Set whether to treat file names as case-sensitive if we can't determine
+ * when connecting to the remote share whether the file system is case
+ * sensitive. This defaults to FALSE since it's most likely that if we can't
+ * retrieve the file system attributes, it's a very old file system that does
+ * not support case sensitivity.
+ */
+void
+smbc_setOptionCaseSensitive(SMBCCTX *c, smbc_bool b);
+
+
+/**
  * Get from how many local master browsers should the list of workgroups be
  * retrieved.  It can take up to 12 minutes or longer after a server becomes a
  * local master browser, for it to have the entire browse list (the list of
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index 3ec3220..c3b3451 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -547,6 +547,12 @@ bool convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
 		return false;
 	}
 	if (srclen == 0) {
+		ob = ((ctx != NULL) ? talloc_strdup(ctx, "") : SMB_STRDUP(""));
+		if (ob == NULL) {
+			errno = ENOMEM;
+			return false;
+		}
+		*dest = ob;
 		*converted_size = 0;
 		return true;
 	}
diff --git a/source/lib/ctdbd_conn.c b/source/lib/ctdbd_conn.c
index 1b07fd4..c88622d 100644
--- a/source/lib/ctdbd_conn.c
+++ b/source/lib/ctdbd_conn.c
@@ -1174,13 +1174,22 @@ NTSTATUS ctdbd_traverse(uint32 db_id,
  */
 
 NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
-			    const struct sockaddr *server,
-			    const struct sockaddr *client,
+			    const struct sockaddr_storage *server,
+			    const struct sockaddr_storage *client,
 			    void (*release_ip_handler)(const char *ip_addr,
 						       void *private_data),
 			    void *private_data)
 {
-	struct ctdb_control_tcp_vnn p;
+	struct sockaddr *sock = (struct sockaddr *)client;
+	/*
+	 * we still use ctdb_control_tcp for ipv4
+	 * because we want to work against older ctdb
+	 * versions at runtime
+	 */
+	struct ctdb_control_tcp p4;
+#ifdef HAVE_IPV6
+	struct ctdb_control_tcp_addr p;
+#endif
 	TDB_DATA data;
 	NTSTATUS status;
 
@@ -1189,15 +1198,19 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
 	 */
 	SMB_ASSERT(conn->release_ip_handler == NULL);
 
-	switch (client->sa_family) {
+	switch (sock->sa_family) {
 	case AF_INET:
-		p.dest.ip = *(struct sockaddr_in *)server;
-		p.src.ip = *(struct sockaddr_in *)client;
+		p4.dest = *(struct sockaddr_in *)server;
+		p4.src = *(struct sockaddr_in *)client;
+		data.dptr = (uint8_t *)&p4;
+		data.dsize = sizeof(p4);
 		break;
 #ifdef HAVE_IPV6
 	case AF_INET6:
 		p.dest.ip6 = *(struct sockaddr_in6 *)server;
 		p.src.ip6 = *(struct sockaddr_in6 *)client;
+		data.dptr = (uint8_t *)&p;
+		data.dsize = sizeof(p);
 		break;
 #endif
 	default:
@@ -1220,11 +1233,8 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
 	 * can send an extra ack to trigger a reset for our client, so it
 	 * immediately reconnects
 	 */
-	data.dptr = (uint8_t *)&p;
-	data.dsize = sizeof(p);
-
 	return ctdbd_control(conn, CTDB_CURRENT_NODE, 
-			     CTDB_CONTROL_TCP_ADD, 0,
+			     CTDB_CONTROL_TCP_CLIENT, 0,
 			     CTDB_CTRL_FLAG_NOREPLY, data, NULL, NULL, NULL);
 }
 
diff --git a/source/lib/dummysmbd.c b/source/lib/dummysmbd.c
index 5c624bd..f0fd18c 100644
--- a/source/lib/dummysmbd.c
+++ b/source/lib/dummysmbd.c
@@ -59,7 +59,12 @@ bool change_to_root_user(void)
 
 struct event_context *smbd_event_context(void)
 {
-	return NULL;
+	static struct event_context *ev;
+
+	if (!ev) {
+		ev = event_context_init(NULL);
+	}
+	return ev;
 }
 
 struct messaging_context *smbd_messaging_context(void)
diff --git a/source/lib/sendfile.c b/source/lib/sendfile.c
index d1b1785..fb10cae 100644
--- a/source/lib/sendfile.c
+++ b/source/lib/sendfile.c
@@ -65,7 +65,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
 #endif
 		} while (nwritten == -1 && errno == EINTR);
 		if (nwritten == -1) {
-			if (errno == ENOSYS) {
+			if (errno == ENOSYS || errno == EINVAL) {
 				/* Ok - we're in a world of pain here. We just sent
 				 * the header, but the sendfile failed. We have to
 				 * emulate the sendfile at an upper layer before we
@@ -143,7 +143,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
 			nwritten = sendfile(tofd, fromfd, &small_offset, small_total);
 		} while (nwritten == -1 && errno == EINTR);
 		if (nwritten == -1) {
-			if (errno == ENOSYS) {
+			if (errno == ENOSYS || errno == EINVAL) {
 				/* Ok - we're in a world of pain here. We just sent
 				 * the header, but the sendfile failed. We have to
 				 * emulate the sendfile at an upper layer before we
diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c
index cee43c0..7b73061 100644
--- a/source/lib/socket_wrapper/socket_wrapper.c
+++ b/source/lib/socket_wrapper/socket_wrapper.c
@@ -901,7 +901,7 @@ static int swrap_get_pcap_fd(const char *fname)
 
 		if (write(fd, &file_hdr, sizeof(file_hdr)) != sizeof(file_hdr)) {
 			close(fd);
-			return -1;
+			fd = -1;
 		}
 		return fd;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list