[SCM] Samba Shared Repository - branch v3-6-stable updated

Karolin Seeger kseeger at samba.org
Tue Aug 9 05:55:24 MDT 2011


The branch, v3-6-stable has been updated
       via  b1d9ddf WHATSNEW: Update changes since rc3.
       via  eedcb96 s3:modules:nfs4_acls: improve fix for bug #8330
       via  d9401ce s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken
       via  7d63904 s3:lib/events: Fix a bug in run_poll_events().
       via  648d025 s3:smb2_server: make sure we grant credits on async read/write operations (bug #8357)
       via  d165fd1 s3/swat: use strlcat instead of strncat to fix build on old Linux distros
       via  b7003a1 s3:web/swat: use strtoll() instead of atoi/atol/atoll
       via  ff504e0 WHATSNEW: Update release notes.
       via  49ddc33 s3: Fix smb2 handling error returns from aio
       via  9278e09 Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
       via  ef4d9b0 Fix bug #8341 - libsmbclient segfault when feed the root of a mounted share via an uri
       via  1a5671e s3: dbwrap_ctdb.c: Fix bug #8303 #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue
       via  23ca80a Second part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id
       via  e513eec First part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id
       via  9471eff s3:loadparm: fix the reload of the configuration: also reload activated registry shares
       via  d78bb0c s3:loadparm: add reload_registry_shares() - reload only those shares already loaded (cherry picked from commit ec113a58a4dc4e4f3ea03f7818eb312325f69482) (cherry picked from commit cc3c8d10940ef5d5d0e636b0f9d46606d46b0dc7)
       via  40fc990 nbt: fix WinXP S3 domain join: alignment of nbt_netlogon_response_from_pdc
       via  1b9f624 Fix bug #8324 - smbclient cannot list directories from a big-endian machine.
       via  07a8bb7 s3:torture: remove a file accidentially committed with 3b2fe4728d6d916508b677e696ecad88f8b7b9fd
       via  0b90096 s3:idmap_tdb2: remove the undocumented option of the silly name "tdb:idmap2.tdb"
       via  7b0dcd3 s3:idmap_tdb2: remove a legacy comment (cherry picked from commit 67cd2f9d867fad1f7df2d6a6a5cdb723336ac495) (cherry picked from commit 55019ced08d235a3ba9ae27b06379fcb827f9b28)
       via  f99d96c s3:idmap_tdb2: remove legacy comment (cherry picked from commit 4b5ada3d27198b49771acb70ae979087235be783) (cherry picked from commit 4369aeb41c2fafd6a1e0baff5cbb05d223e869ab)
       via  966e0a8 s3:idmap_tdb2: remove superfluous initialization with bogus comment (cherry picked from commit 551185573899b6e608863f833633d40ae04458d8) (cherry picked from commit 5a5b069166d5f224526f6cae049fa14cf35c426a)
       via  5d051af s3:idmap_tdb2: fix a legacy comment that does not apply any more (cherry picked from commit 7d3dc2164b3929c642127659593e69fc865a6184) (cherry picked from commit 7f56b6269792300237193b69541f73fb32a986b3)
       via  84fbf75 s3:doc: add an example with idmap script to the idmap_tdb2 manpage (cherry picked from commit 86973eee43605a3680fb51470a81ea9ca7f1b515) (cherry picked from commit 2abe73e5eed10af4ee030449322ddbc4c7054c08)
       via  d520dcd s3:docs: remove legacy text from the example in the idmap_tdb2 manpage (cherry picked from commit 2f253c2791ccb2421f26f563e3983ee950da1d05) (cherry picked from commit 66216f6325f33c2a1d7c3e114754efc78d61aae2)
       via  48794f1 s3:doc: clarify the idmap script section in the idmap_tdb2 manpage (cherry picked from commit 4daab85ae60f2821a1d9d98f1edff6a318e8e3c1) (cherry picked from commit 29e39194aaa15c44178b16a4abc5583f5ff4688f)
       via  c3cef18 s3:docs:idmap_tdb2: update the documentation of idmap script
       via  7672230 s3:idmap_tdb2: deprecate the idmap:script parameter and use "idmap config * : script" instead
      from  e4428a5 WHATSNEW: Start release notes for 3.6.0.

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


- Log -----------------------------------------------------------------
commit b1d9ddf738c6e59e489bc9c339ce6de5988b689e
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Aug 9 13:15:02 2011 +0200

    WHATSNEW: Update changes since rc3.
    
    Karolin
    (cherry picked from commit 76022256cd23cd71354e21384e2350c761e9f373)

commit eedcb96f8879dbaa6b585eb21a9c64fbeaaa7867
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jul 28 09:49:34 2011 +0200

    s3:modules:nfs4_acls: improve fix for bug #8330
    
    simplify the check insmbacl4_find_equal_special()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit d1ab64cbc2d62744f541eea0d80d7b522416ac1c)

commit d9401ce77e07a7f9f52d2a7400ed3767f77bd74f
Author: Christian Ambach <ambi at samba.org>
Date:   Wed Jul 27 14:46:00 2011 +0200

    s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken
    
    we should not merge ACEs with different flags (e.g. CI/OI/I/)
    Otherwise ACLs get wrong entries and thus wrong semantics
    
    Example:
    ACL:BUILTIN\Users:ALLOWED/0x0/FULL
    ACL:BUILTIN\Users:ALLOWED/I/READ
    got merged to
    ACL:BUILTIN\Users:ALLOWED/I/FULL
    
    This is not the same and also leads to wrong displays
    in the Windows ACL dialog
    
    Autobuild-User: Christian Ambach <ambi at samba.org>
    Autobuild-Date: Wed Jul 27 16:03:51 CEST 2011 on sn-devel-104
    (cherry picked from commit 3c05013694c453411b78a1df884a80c8d48e7393)

commit 7d63904f1cc29501d3b5da435a13da543d4cd24f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Aug 8 18:49:06 2011 +0200

    s3:lib/events: Fix a bug in run_poll_events().
    
    Ignore fd events without EVENT_FD_READ or EVENT_FD_WRITE also in
    run_events_poll(). They are ignore when building the array
    for the syscall in event_add_to_poll_args(), so we need to
    ignore them run_events_poll() too.
    
    metze
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Tue Aug  9 10:11:54 CEST 2011 on sn-devel-104
    (cherry picked from commit 020032e114c0e966acf24f24e707942219d60cf3)
    
    Fix bug #8358 (smbd exits with NT_STATUS_INTERNAL_ERROR in run_poll_events()).
    (cherry picked from commit 6a587c926b7fdcb934b916a29bdd04bd0ef606b9)

commit 648d025b45e8800d6994a800945b8dee3862b643
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Aug 6 10:19:21 2011 +0200

    s3:smb2_server: make sure we grant credits on async read/write operations (bug #8357)
    
    Currently we skip, the "gone async" interim response on read and write,
    this caused the aio code path to grant 0 credits to the client
    in the read/write responses.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Sun Aug  7 22:23:57 CEST 2011 on sn-devel-104
    (cherry picked from commit 47bffb9b9243dc72d7305cd9ec3e63e176841bf5)
    (cherry picked from commit cbd408df89ec51fb06fbfb935458eb8425639bed)

commit d165fd17b59fe103639afa9b59ac133098b3f648
Author: Björn Jacke <bj at sernet.de>
Date:   Thu Aug 4 16:25:08 2011 +0200

    s3/swat: use strlcat instead of strncat to fix build on old Linux distros
    
    SLES 9's glibc for example had weird macros where the use of strncat resulted
    in the use of strcat which we don't allow.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User: Björn Jacke <bj at sernet.de>
    Autobuild-Date: Thu Aug  4 17:50:24 CEST 2011 on sn-devel-104
    (cherry picked from commit d3b4d75364210e2d2a4a1cd806f28b0021f22909)
    
    Fix bug #8362 (build issue on old glibc systems).
    (cherry picked from commit 87fa72a5202fe3780d4a61289bf755027cd078f4)

commit b7003a1d7ad9ef1890314c51636440a0cad949d2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 5 19:48:38 2011 +0200

    s3:web/swat: use strtoll() instead of atoi/atol/atoll
    
    This is more portable, as we have a strtoll replacement
    in lib/replace.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Sat Aug  6 11:55:45 CEST 2011 on sn-devel-104
    (cherry picked from commit a6be0820d09b3f3eabfbb5f4356add303aa8a494)
    
    Fix bug #8347 (CVE-2011-2522 regression for HP-UX, AIX and OSF).
    (cherry picked from commit be41d88e55237214e5a27f7bd8d8c15e27d31579)

commit ff504e00e5e20975d10d75de7c50623e434197e4
Author: Karolin Seeger <kseeger at samba.org>
Date:   Sun Aug 7 21:22:46 2011 +0200

    WHATSNEW: Update release notes.
    
    Karolin
    (cherry picked from commit d6f841bb3e465e7f05a886eafcb54f8d53b54327)

commit 49ddc335ac0510bee9076101b9b6f7fbc38b17ed
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 2 21:16:26 2011 +0200

    s3: Fix smb2 handling error returns from aio
    
    Found when reading with aio_fork beyond the end of file.
    
    Metze, Jeremy, please check!
    
    Without this we get
    
    [2011/08/02 21:02:54.082661,  0] lib/util.c:778(smb_panic_s3)
      PANIC (pid 2302): smbd/smb2_read.c:593: Type mismatch: name[NULL] expected[struct smbd_smb2_read_state]
    [2011/08/02 21:02:54.094316,  0] lib/util.c:882(log_stack_trace)
      BACKTRACE: 23 stack frames:
       #0 bin/smbd(log_stack_trace+0x2d) [0xb72873d8]
       #1 bin/smbd(smb_panic_s3+0x7c) [0xb7287529]
       #2 bin/smbd(smb_panic+0x2f) [0xb7277e1f]
       #3 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6bc48]
       #4 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6ec79]
       #5 /root/git/s3-work/source3/bin/libtalloc.so.2(_talloc_get_type_abort+0x34) [0xb6c6ecb3]
       #6 bin/smbd [0xb6fbc405]
       #7 bin/smbd(_tevent_req_notify_callback+0x4a) [0xb729a85a]
       #8 bin/smbd [0xb729a888]
       #9 bin/smbd(_tevent_req_done+0x19) [0xb729aa73]
       #10 bin/smbd [0xb6fae517]
       #11 bin/smbd [0xb6fad258]
       #12 bin/smbd(smbd_aio_complete_aio_ex+0xf5) [0xb6fad6e8]
       #13 /root/git/inst/modules/vfs/aio_fork.so [0xb66d4992]
       #14 bin/smbd(run_events_poll+0x400) [0xb7297df2]
       #15 bin/smbd(smbd_process+0xd75) [0xb6f9d3a7]
       #16 bin/smbd [0xb756f07b]
       #17 bin/smbd(run_events_poll+0x400) [0xb7297df2]
       #18 bin/smbd [0xb7298254]
       #19 bin/smbd(_tevent_loop_once+0x9e) [0xb72986ac]
       #20 bin/smbd(main+0x185c) [0xb7570e59]
       #21 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb6b08455]
       #22 bin/smbd [0xb6f14e01]
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Tue Aug  2 22:33:15 CEST 2011 on sn-devel-104
    (cherry picked from commit 5068a0d14df8cc6f1b4517c64f4356abc6606b58)
    
    Fix bug #8343 (SMB2 crash reading with aio_fork beyond the end of file).
    (cherry picked from commit ad75107a33ff7e70d9939b80b3e7e06265ee030e)

commit 9278e098eeb4f7d897d9c908719bcf16f2bdbbd4
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Aug 1 11:49:10 2011 -0700

    Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
    
    Make SA_RESETHAND conditional on its existance.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Mon Aug  1 22:03:45 CEST 2011 on sn-devel-104
    (cherry picked from commit 0c67efdd68b9808542c090b9fd9920e4e37d85d0)
    (cherry picked from commit 4b4155c7235d8ec0c93324a782bc815ef08a7ba3)

commit ef4d9b0c9946885f2375343a6f36b3dffe17b066
Author: Alban Browaeys <prahal at yahoo.com>
Date:   Mon Aug 1 16:40:22 2011 -0700

    Fix bug #8341 - libsmbclient segfault when feed the root of a mounted share via an uri
    
    Fix null deref.
    (cherry picked from commit cf0c36ab9a5129878b92a52d22aa814eaa737a4c)
    (cherry picked from commit ca293af1f06891dfd13171d418047e4fa8c4fc14)

commit 1a5671e3b7e34dbd38ad74d059f72cd9666e0a4c
Author: Björn Baumbach <bb at sernet.de>
Date:   Tue Jul 12 17:32:55 2011 +0200

    s3: dbwrap_ctdb.c: Fix bug #8303 #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue
    
    Check for HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL instead of
    CTDB_CONTROL_SCHEDULE_FOR_DELETION, which is an enum member and not a
    define.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Tue Jul 12 18:56:30 CEST 2011 on sn-devel-104
    (cherry picked from commit b807c58b655f1ffbf849f5de9eef66136bdb4a52)
    (cherry picked from commit 3932178dd3a54723484e833cddf58ff68e7c3417)

commit 23ca80a2b9b77e269855d13a6522dd9e5337e186
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jul 29 11:17:03 2011 -0700

    Second part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id
    
    Modify the credit granting algorithm to closer to what I believe
    Windows does.
    
    Split up max_credits into 1/16ths, and then scale
    the requested credits by how many 16ths have been
    currently granted. Less than 1/16th == grant all
    requested (100%), scale down as more have been
    granted. Never ask for less than 1 if the client
    asked for at least 1.
    (cherry picked from commit 3e854564315a7bdc5d9837526a813b2b858e0563)

commit e513eeccfbe05c2d0654e41e557750af6d062fd9
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jul 29 11:16:51 2011 -0700

    First part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id
    
    Set default max credits to 8192 now this has been documented in the
    SMB2 spec.
    (cherry picked from commit 9d579ed2398d7f88c9c02076e612eed877d1ec88)

commit 9471effac1158e048f1cd192776b42dea50f9245
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jul 22 10:11:52 2011 +0200

    s3:loadparm: fix the reload of the configuration: also reload activated registry shares
    
    Autobuild-User: Michael Adam <obnox at samba.org>
    Autobuild-Date: Fri Jul 22 16:53:49 CEST 2011 on sn-devel-104
    (cherry picked from commit efbe1602bd014eada4811f336bdccbf4692d3807)
    
    The last 2 patches address bug 8327 (config reload fails to reload shares from
    registry).
    (cherry picked from commit 254cc7ae23f2b0108bada37b6b59dd90ac198469)

commit d78bb0cd195611e88312deb2f7b7f8e8680f2717
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jul 22 10:10:43 2011 +0200

    s3:loadparm: add reload_registry_shares() - reload only those shares already loaded (cherry picked from commit ec113a58a4dc4e4f3ea03f7818eb312325f69482)
    (cherry picked from commit cc3c8d10940ef5d5d0e636b0f9d46606d46b0dc7)

commit 40fc990e9be34864c2c38461de771866eb4558cb
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jul 27 12:04:26 2011 +1000

    nbt: fix WinXP S3 domain join: alignment of nbt_netlogon_response_from_pdc
    
    This fixes WinXP joining a Samba3 domain, which was broken on hosts
    with an even number of characters in the host name.  The alignment
    requested in the structure was ignored because of the overall
    NDR_NOALIGN set on the packet.
    
    Andrew Bartlett
    
    Fix bug #8326 (WinXP cannot join a Samba3 domain with a 'even' hostname).
    (cherry picked from commit 24fe5fea8fb7839dcbcf39a346a31c9e90e7beb9)

commit 1b9f6242e54048b086d3262e2bb3980b216e446f
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jul 26 15:16:29 2011 -0700

    Fix bug #8324 - smbclient cannot list directories from a big-endian machine.
    
    Two uses of the setup array are not being correctly byte-swapped to little
    endian.
    (cherry picked from commit 146549d7250fefb365675154f0916c37e56faa5d)

commit 07a8bb7ccafdb067ef9d18a495f92028140b2fbd
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 17 14:30:13 2011 +0200

    s3:torture: remove a file accidentially committed with 3b2fe4728d6d916508b677e696ecad88f8b7b9fd
    
    Fix bug #8329 (a code file was accidentially commited).
    (cherry picked from commit 0f9a24b7dc9aaae6145ec409191fc16b07c601a8)

commit 0b90096dcd3f4704603535322bf9617a721bf69a
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 24 10:15:02 2011 +0200

    s3:idmap_tdb2: remove the undocumented option of the silly name "tdb:idmap2.tdb"
    
    In ancient times, when ctdb had not support for persistent databases and
    tdb2 was introduced as a two-layer solution and it was more important than
    today to be able to change the location of the permanent database file
    because it had to reside on shared storage.
    
    But these were times when idmap_tdb2 was not even officially released.
    Nowadays, with ctdb handling the persistent idmap2.tdb database, the path
    is stripped anyways, so this undocumented option has become unnecessary
    and is hence removed.
    
    Autobuild-User: Michael Adam <obnox at samba.org>
    Autobuild-Date: Wed Jul 27 05:37:57 CEST 2011 on sn-devel-104
    (cherry picked from commit 3276060da4e7d495bd5cf5cbf7237e64d948ee77)
    
    The last 10 patches address
    bug #8328 (final cleanup of idmap_tdb2 code and docs needed for release).
    (cherry picked from commit 742b8c3c14ec8708eb5bfe5e7960c1c93ec0096c)

commit 7b0dcd32ccfbc23fe7eea75ee1508771c84c87c8
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 9 13:36:54 2011 +0200

    s3:idmap_tdb2: remove a legacy comment (cherry picked from commit 67cd2f9d867fad1f7df2d6a6a5cdb723336ac495)
    (cherry picked from commit 55019ced08d235a3ba9ae27b06379fcb827f9b28)

commit f99d96cdfb7fd8c0f9b9daa67d6f01f4b8011dfb
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 9 13:35:21 2011 +0200

    s3:idmap_tdb2: remove legacy comment (cherry picked from commit 4b5ada3d27198b49771acb70ae979087235be783)
    (cherry picked from commit 4369aeb41c2fafd6a1e0baff5cbb05d223e869ab)

commit 966e0a8a7805aa99825dfea3b0ad85977967b732
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 9 13:34:04 2011 +0200

    s3:idmap_tdb2: remove superfluous initialization with bogus comment (cherry picked from commit 551185573899b6e608863f833633d40ae04458d8)
    (cherry picked from commit 5a5b069166d5f224526f6cae049fa14cf35c426a)

commit 5d051af4bc51df825435e442005935bd0cd6ff83
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 9 13:07:54 2011 +0200

    s3:idmap_tdb2: fix a legacy comment that does not apply any more (cherry picked from commit 7d3dc2164b3929c642127659593e69fc865a6184)
    (cherry picked from commit 7f56b6269792300237193b69541f73fb32a986b3)

commit 84fbf750192edf0ac79efa563e4e0cc30bc28cb2
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 24 11:38:05 2011 +0200

    s3:doc: add an example with idmap script to the idmap_tdb2 manpage (cherry picked from commit 86973eee43605a3680fb51470a81ea9ca7f1b515)
    (cherry picked from commit 2abe73e5eed10af4ee030449322ddbc4c7054c08)

commit d520dcd7cd8af428ad841ff7a89b732d1f17594a
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 24 11:36:33 2011 +0200

    s3:docs: remove legacy text from the example in the idmap_tdb2 manpage (cherry picked from commit 2f253c2791ccb2421f26f563e3983ee950da1d05)
    (cherry picked from commit 66216f6325f33c2a1d7c3e114754efc78d61aae2)

commit 48794f14e0fe97d418718ae162b6e32319c83e87
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 24 11:35:51 2011 +0200

    s3:doc: clarify the idmap script section in the idmap_tdb2 manpage (cherry picked from commit 4daab85ae60f2821a1d9d98f1edff6a318e8e3c1)
    (cherry picked from commit 29e39194aaa15c44178b16a4abc5583f5ff4688f)

commit c3cef188f84f3b2a97d76c78d294bc61c38da91a
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 24 10:59:04 2011 +0200

    s3:docs:idmap_tdb2: update the documentation of idmap script
    
    to reflect the new variant "idmap config * : script" of configuring the idmap script
    (cherry picked from commit 2aa19b4aeb9de43a0e2b94ad1202f2068b29c710)
    (cherry picked from commit 22b9dc3f66c6786a962d7cb462b372fb955a199e)

commit 76722304182a07ef6dae5ee873999456063b68ed
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 7 18:00:36 2011 +0200

    s3:idmap_tdb2: deprecate the idmap:script parameter and use "idmap config * : script" instead
    
    With this patch, "idmap config * : script" will override "idmap : script".
    If "idmap : script" is present, a deprecation warning will be printed in any
    case. If "idmap config * : script" is not set, then the value of "idmap :script"
    will be used for backwards compatibility.
    (cherry picked from commit b6c82f18f17cdded771d285930566c1d104686aa)
    (cherry picked from commit 7812ce547973a0ad5a69c64e8e708e1b9f3a8687)

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

Summary of changes:
 WHATSNEW.txt                                    |   43 ++++-
 docs-xml/manpages-3/idmap_tdb2.8.xml            |   48 +++-
 docs-xml/smbdotconf/protocol/smb2maxcredits.xml |    2 +-
 lib/replace/system/wait.h                       |    4 -
 lib/tevent/testsuite.c                          |    2 +
 lib/tevent/tevent_signal.c                      |    4 +
 librpc/idl/nbt.idl                              |    2 +-
 source3/include/local.h                         |    2 +-
 source3/lib/dbwrap_ctdb.c                       |    4 +-
 source3/lib/events.c                            |    4 +
 source3/libsmb/clifsinfo.c                      |    3 +-
 source3/libsmb/clilist.c                        |    4 +-
 source3/modules/nfs4_acls.c                     |    7 +-
 source3/param/loadparm.c                        |   37 +++-
 source3/smbd/aio.c                              |    2 +
 source3/smbd/smb2_server.c                      |   48 +++-
 source3/torture/test_notify_online.c            |  294 -----------------------
 source3/web/swat.c                              |   27 ++-
 source3/winbindd/idmap_tdb2.c                   |   52 ++---
 19 files changed, 218 insertions(+), 371 deletions(-)
 delete mode 100644 source3/torture/test_notify_online.c


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 6aa0daf..4c147be 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,6 +1,6 @@
                    =============================
                    Release Notes for Samba 3.6.0
-                             , 2011
+                          August 9, 2011
                    =============================
 
 
@@ -252,6 +252,47 @@ o   Andreas Schneider <asn at samba.org>
 Changes since 3.6.0rc3
 ----------------------
 
+o   Michael Adam <obnox at samba.org>
+    * BUG 8327: Fix the reload of the configuration, also reload activated
+      registry shares.
+    * BUG 8328: Cleanup of idmap_tdb2 code.
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 7462: Make SA_RESETHAND conditional on its existance.
+    * BUG 8324: smbclient cannot list directories from a big-endian machine.
+    * BUG 8335: File copy aborts with smb2_validate_message_id: bad message_id.
+
+
+o   Christian Ambach <ambi at samba.org>
+    * BUG 8330: Fix NFSv4 ACL merging logic.
+
+
+o   Andrew Bartlett <abartlet at samba.org>
+    * BUG 8326: WinXP cannot join a Samba3 domain with a 'even' hostname.
+
+
+o   Björn Baumbach <bb at sernet.de>
+    * BUG 8303: db_ctdb_send_schedule_for_deletion() is not defined.
+
+
+o   Alban Browaeys <prahal at yahoo.com>
+    * BUG 8341: Fix segfault in libsmbclient.
+
+
+o   Björn Jacke <bj at sernet.de>
+    * BUG 8362: Fix build issue on old glibc systems.
+
+
+o   Volker Lendecke <vlendec at samba.org>
+    * BUG 8343: Fix SMB2 crash reading with aio_fork beyond the end of file.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 8347: Fix regression for HP-UX, AIX and OSF.
+    * BUG 8357: Make sure we grant credits on async read/write operations.
+    * BUG 8358: Fix a bug in run_poll_events().
+
 
 Changes since 3.6.0rc2
 ----------------------
diff --git a/docs-xml/manpages-3/idmap_tdb2.8.xml b/docs-xml/manpages-3/idmap_tdb2.8.xml
index 980ffe6..1faf590 100644
--- a/docs-xml/manpages-3/idmap_tdb2.8.xml
+++ b/docs-xml/manpages-3/idmap_tdb2.8.xml
@@ -43,6 +43,16 @@
 			backend is authoritative.
 		</para></listitem>
 		</varlistentry>
+
+		<varlistentry>
+		<term>script</term>
+		<listitem><para>
+			This option can be used to configure an external program
+			for performing id mappings instead of using the tdb
+			counter. The mappings are then stored int tdb2 idmap
+			database. For details see the section on IDMAP SCRIPT below.
+		</para></listitem>
+		</varlistentry>
 	</variablelist>
 </refsect1>
 
@@ -50,8 +60,21 @@
 	<title>IDMAP SCRIPT</title>
 
 	<para>
-	The tdb2 idmap backend supports a script for performing id mappings
-	through the smb.conf option <parameter>idmap : script</parameter>.
+	The tdb2 idmap backend supports an external program for performing id mappings
+	through the smb.conf option <parameter>idmap config * : script</parameter> or
+	its deprecated legacy form <parameter>idmap : script</parameter>.
+	</para>
+
+	<para>
+	The mappings obtained by the script are then stored in the idmap tdb2
+	database instead of mappings created by the incrementing id counters.
+	It is therefore important that the script covers the complete range of
+	SIDs that can be passed in for SID to Unix ID mapping, since otherwise
+	SIDs unmapped by the script might get mapped to IDs that had
+	previously been mapped by the script.
+	</para>
+
+	<para>
 	The script should accept the following command line options.
 	</para>
 
@@ -72,13 +95,6 @@
 	SID:yyyy
 	ERR:yyyy
 	</programlisting>
-
-	<para>
-	Note that the script should cover the complete range of SIDs
-	that can be passed in for SID to Unix ID mapping, since otherwise
-	SIDs unmapped by the script might get mapped to IDs that had
-	previously been mapped by the script.
-	</para>
 </refsect1>
 
 <refsect1>
@@ -86,8 +102,6 @@
 
 	<para>
 	This example shows how tdb2 is used as a the default idmap backend.
-	It configures the idmap range through the global options for all
-	domains encountered.
 	</para>
 
 	<programlisting>
@@ -95,6 +109,18 @@
 	idmap config * : backend = tdb2
 	idmap config * : range = 1000000-2000000
 	</programlisting>
+
+	<para>
+	This example shows how tdb2 is used as a the default idmap backend
+	using an external program via the script parameter:
+	</para>
+
+	<programlisting>
+	[global]
+	idmap config * : backend = tdb2
+	idmap config * : range = 1000000-2000000
+	idmap config * : script = /usr/local/samba/bin/idmap_script.sh
+	</programlisting>
 </refsect1>
 
 <refsect1>
diff --git a/docs-xml/smbdotconf/protocol/smb2maxcredits.xml b/docs-xml/smbdotconf/protocol/smb2maxcredits.xml
index 69d04f7..310b898 100644
--- a/docs-xml/smbdotconf/protocol/smb2maxcredits.xml
+++ b/docs-xml/smbdotconf/protocol/smb2maxcredits.xml
@@ -8,7 +8,7 @@
 that Samba tells the client it will allow. This is similar to the <smbconfoption name="max mux"/>
 parameter for SMB1. You should never need to set this parameter.
 </para>
-<para>The default is 128 credits, which is the same as a Windows SMB2 server.</para>
+<para>The default is 8192 credits, which is the same as a Windows 2008R2 SMB2 server.</para>
 </description>
 
 <value type="default">128</value>
diff --git a/lib/replace/system/wait.h b/lib/replace/system/wait.h
index 41db180..f0c3bdc 100644
--- a/lib/replace/system/wait.h
+++ b/lib/replace/system/wait.h
@@ -40,10 +40,6 @@
 #include <setjmp.h>
 #endif
 
-#ifndef SA_RESETHAND
-#define SA_RESETHAND SA_ONESHOT
-#endif
-
 #if !defined(HAVE_SIG_ATOMIC_T_TYPE)
 typedef int sig_atomic_t;
 #endif
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
index 991e161..1e2f25a 100644
--- a/lib/tevent/testsuite.c
+++ b/lib/tevent/testsuite.c
@@ -101,7 +101,9 @@ static bool test_event_context(struct torture_context *test,
 #ifdef SA_RESTART
 	se1 = event_add_signal(ev_ctx, ev_ctx, SIGALRM, SA_RESTART, count_handler, &alarm_count);
 #endif
+#ifdef SA_RESETHAND
 	se2 = event_add_signal(ev_ctx, ev_ctx, SIGALRM, SA_RESETHAND, count_handler, &alarm_count);
+#endif
 #ifdef SA_SIGINFO
 	se3 = event_add_signal(ev_ctx, ev_ctx, SIGUSR1, SA_SIGINFO, count_handler, &info_count);
 #endif
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index dbab8a8..b790859 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -355,16 +355,20 @@ int tevent_common_check_signal(struct tevent_context *ev)
 						    (void*)&sig_state->sig_info[i][ofs], 
 						    se->private_data);
 				}
+#ifdef SA_RESETHAND
 				if (se->sa_flags & SA_RESETHAND) {
 					talloc_free(se);
 				}
+#endif
 				continue;
 			}
 #endif
 			se->handler(ev, se, i, count, NULL, se->private_data);
+#ifdef SA_RESETHAND
 			if (se->sa_flags & SA_RESETHAND) {
 				talloc_free(se);
 			}
+#endif
 		}
 
 #ifdef SA_SIGINFO
diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl
index cbfa966..ee9a64e 100644
--- a/librpc/idl/nbt.idl
+++ b/librpc/idl/nbt.idl
@@ -494,7 +494,7 @@ interface nbt
 	} nbt_netlogon_query_for_pdc;
 
 	/* response from pdc */
-	typedef [flag(NDR_NOALIGN),public] struct {
+	typedef [public] struct {
 		netlogon_command command;
 		astring pdc_name;
 		[flag(NDR_ALIGN2)]   DATA_BLOB _pad;
diff --git a/source3/include/local.h b/source3/include/local.h
index 680631c..807d3c9 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -264,7 +264,7 @@
 #define DEFAULT_SMB2_MAX_READ (1024*1024)
 #define DEFAULT_SMB2_MAX_WRITE (1024*1024)
 #define DEFAULT_SMB2_MAX_TRANSACT (1024*1024)
-#define DEFAULT_SMB2_MAX_CREDITS 128
+#define DEFAULT_SMB2_MAX_CREDITS 8192
 #define DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR 2
 
 #endif
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index 298f4c1..468a74f 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -911,7 +911,7 @@ static NTSTATUS db_ctdb_store(struct db_record *rec, TDB_DATA data, int flag)
 
 
 
-#ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION
+#ifdef HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL
 static NTSTATUS db_ctdb_send_schedule_for_deletion(struct db_record *rec)
 {
 	NTSTATUS status;
@@ -974,7 +974,7 @@ static NTSTATUS db_ctdb_delete(struct db_record *rec)
 		return status;
 	}
 
-#ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION
+#ifdef HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL
 	status = db_ctdb_send_schedule_for_deletion(rec);
 #endif
 
diff --git a/source3/lib/events.c b/source3/lib/events.c
index fbe3db9..5631436 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -243,6 +243,10 @@ bool run_events_poll(struct tevent_context *ev, int pollrtn,
 		struct pollfd *pfd;
 		uint16 flags = 0;
 
+		if ((fde->flags & (EVENT_FD_READ|EVENT_FD_WRITE)) == 0) {
+			continue;
+		}
+
 		if (pollfd_idx[fde->fd] >= num_pfds) {
 			DEBUG(1, ("internal error: pollfd_idx[fde->fd] (%d) "
 				  ">= num_pfds (%d)\n", pollfd_idx[fde->fd],
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index 94568c9..95973bb 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -472,6 +472,7 @@ NTSTATUS cli_get_posix_fs_info(struct cli_state *cli,
 	uint16 setup[1];
 	uint8_t param[2];
 	uint8_t *rdata = NULL;
+	uint32_t rdata_count;
 	NTSTATUS status;
 
 	SSVAL(setup, 0, TRANSACT2_QFSINFO);
@@ -484,7 +485,7 @@ NTSTATUS cli_get_posix_fs_info(struct cli_state *cli,
 			   NULL,
 			   NULL, 0, NULL, /* rsetup */
 			   NULL, 0, NULL, /* rparam */
-			   &rdata, 56, NULL);
+			   &rdata, 56, &rdata_count);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index d74d3d8..59d01b7 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -573,7 +573,7 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx,
 
 	state->max_matches = 1366; /* Match W2k */
 
-	state->setup[0] = TRANSACT2_FINDFIRST;
+	SSVAL(&state->setup[0], 0, TRANSACT2_FINDFIRST);
 
 	nlen = 2*(strlen(mask)+1);
 	state->param = TALLOC_ARRAY(state, uint8_t, 12+nlen+2);
@@ -735,7 +735,7 @@ static void cli_list_trans_done(struct tevent_req *subreq)
 		return;
 	}
 
-	state->setup[0] = TRANSACT2_FINDNEXT;
+	SSVAL(&state->setup[0], 0, TRANSACT2_FINDNEXT);
 
 	nlen = 2*(strlen(state->mask) + 1);
 
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index be8a505..c9d795d 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -516,11 +516,8 @@ static SMB_ACE4PROP_T *smbacl4_find_equal_special(
 
 		if (ace->flags == aceNew->flags &&
 			ace->aceType==aceNew->aceType &&
-			((ace->aceFlags&SMB_ACE4_INHERIT_ONLY_ACE)==
-			 (aceNew->aceFlags&SMB_ACE4_INHERIT_ONLY_ACE)) &&
-			(ace->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)==
-			(aceNew->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)
-		) {
+			ace->aceFlags==aceNew->aceFlags)
+		{
 			/* keep type safety; e.g. gid is an u.short */
 			if (ace->flags & SMB_ACE4_ID_SPECIAL)
 			{
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 0a1a4b0..bec525e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7351,6 +7351,35 @@ done:
 	return ret;
 }
 
+/**
+ * reload those shares from registry that are already
+ * activated in the services array.
+ */
+static bool reload_registry_shares(void)
+{
+	int i;
+	bool ret = true;
+
+	for (i = 0; i < iNumServices; i++) {
+		if (!VALID(i)) {
+			continue;
+		}
+
+		if (ServicePtrs[i]->usershare == USERSHARE_VALID) {
+			continue;
+		}
+
+		ret = process_registry_service(ServicePtrs[i]->szService);
+		if (!ret) {
+			goto done;
+		}
+	}
+
+done:
+	return ret;
+}
+
+
 #define MAX_INCLUDE_DEPTH 100
 
 static uint8_t include_depth;
@@ -9599,8 +9628,12 @@ static bool lp_load_ex(const char *pszFname,
 		bRetval = false;
 	}
 
-	if (bRetval && lp_registry_shares() && allow_registry_shares) {
-		bRetval = process_registry_shares();
+	if (bRetval && lp_registry_shares()) {
+		if (allow_registry_shares) {
+			bRetval = process_registry_shares();
+		} else {
+			bRetval = reload_registry_shares();
+		}
 	}
 
 	lp_add_auto_services(lp_auto_services());
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 0cb94ac..e9d49ce 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -779,6 +779,7 @@ static int handle_aio_smb2_read_complete(struct aio_extra *aio_ex, int errcode)
 
 	if (!NT_STATUS_IS_OK(status)) {
 		tevent_req_nterror(subreq, status);
+		return errcode;
 	}
 
 	tevent_req_done(subreq);
@@ -812,6 +813,7 @@ static int handle_aio_smb2_write_complete(struct aio_extra *aio_ex, int errcode)
 
 	if (!NT_STATUS_IS_OK(status)) {
 		tevent_req_nterror(subreq, status);
+		return errcode;
 	}
 
 	tevent_req_done(subreq);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index c5c7a8e..0cc80ed 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -441,20 +441,50 @@ static void smb2_set_operation_credit(struct smbd_server_connection *sconn,
 			const struct iovec *in_vector,
 			struct iovec *out_vector)
 {
+	const uint8_t *inhdr = (const uint8_t *)in_vector->iov_base;
 	uint8_t *outhdr = (uint8_t *)out_vector->iov_base;
-	uint16_t credits_requested = 0;
+	uint16_t credits_requested;
+	uint32_t out_flags;
 	uint16_t credits_granted = 0;
 
-	if (in_vector != NULL) {
-		const uint8_t *inhdr = (const uint8_t *)in_vector->iov_base;
-		credits_requested = SVAL(inhdr, SMB2_HDR_CREDIT);
-	}
+	credits_requested = SVAL(inhdr, SMB2_HDR_CREDIT);
+	out_flags = IVAL(outhdr, SMB2_HDR_FLAGS);
 
 	SMB_ASSERT(sconn->smb2.max_credits >= sconn->smb2.credits_granted);
 
-	/* Remember what we gave out. */
-	credits_granted = MIN(credits_requested, (sconn->smb2.max_credits -
-		sconn->smb2.credits_granted));
+	if (out_flags & SMB2_HDR_FLAG_ASYNC) {
+		/*
+		 * In case we already send an async interim
+		 * response, we should not grant
+		 * credits on the final response.
+		 */
+		credits_requested = 0;
+	}
+
+	if (credits_requested) {
+		uint16_t modified_credits_requested;
+		uint32_t multiplier;
+
+		/*
+		 * Split up max_credits into 1/16ths, and then scale
+		 * the requested credits by how many 16ths have been
+		 * currently granted. Less than 1/16th == grant all
+		 * requested (100%), scale down as more have been
+		 * granted. Never ask for less than 1 as the client
+		 * asked for at least 1. JRA.
+		 */
+
+		multiplier = 16 - (((sconn->smb2.credits_granted * 16) / sconn->smb2.max_credits) % 16);
+
+		modified_credits_requested = (multiplier * credits_requested) / 16;
+		if (modified_credits_requested == 0) {
+			modified_credits_requested = 1;
+		}
+
+		/* Remember what we gave out. */
+		credits_granted = MIN(modified_credits_requested,
+					(sconn->smb2.max_credits - sconn->smb2.credits_granted));
+	}
 
 	if (credits_granted == 0 && sconn->smb2.credits_granted == 0) {
 		/* First negprot packet, or ensure the client credits can
@@ -1596,7 +1626,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
 	/* Set credit for this operation (zero credits if this
 	   is a final reply for an async operation). */
 	smb2_set_operation_credit(req->sconn,
-			req->async ? NULL : &req->in.vector[i],
+			&req->in.vector[i],
 			&req->out.vector[i]);
 
 	if (req->do_signing) {
diff --git a/source3/torture/test_notify_online.c b/source3/torture/test_notify_online.c
deleted file mode 100644
index b9ebc00..0000000
--- a/source3/torture/test_notify_online.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-   Make sure that for offline files pread and pwrite trigger a notify
-   Copyright (C) Volker Lendecke 2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.


-- 
Samba Shared Repository


More information about the samba-cvs mailing list