[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-5-64-ga4f1d30

Karolin Seeger kseeger at samba.org
Tue Dec 9 10:21:42 GMT 2008


The branch, v3-2-stable has been updated
       via  a4f1d30bfe206b43883ed7af5ed1a8607318ce53 (commit)
       via  c3d6823bf6c9743c0c94cfde8676da78de6b41fe (commit)
       via  f8d212b50ca15a4f1bc6b67a5360799e581e1c13 (commit)
       via  f1d45aad7dd6b7a5011e4c895c87c53fd6d1ceb6 (commit)
       via  de78562537f50ef59b8c4b12b4d275128dabc18d (commit)
       via  a42bfbed2276c58eb749dbc53680ab0bd6b3d21a (commit)
       via  d0b811294c3054838a6d6a41c285f81c4ff008f3 (commit)
       via  eb0e0d7f269e03b5a817ee4a356f0dc212c92005 (commit)
       via  acb4f9dc585c849c0a6114edcaa4ce7ddbe1a50c (commit)
       via  375f099a2cdfe9e686b2e1edb23f2e33a47f5786 (commit)
       via  8869e3b627ac6ee0b4a5383dced2ae0ec590a04c (commit)
       via  cdc7213b35476957aea67c3d72d4d91d64e234c0 (commit)
       via  8f31fd94d786f42074b63e88b529f593d47b6ec0 (commit)
       via  68b817d5f63145eacb3ef4d67f8e66437b179a45 (commit)
       via  cdc814f491ec7dd39ec8feb8d26471289e9ec0f7 (commit)
       via  57f54df5826f98d262f56978ddd43cc29c26eaee (commit)
       via  6a0a99852112a2ff23b79887905a4c7ac7d3f989 (commit)
       via  f48c2cfb57ece0aaa9602b1b1e4d54b0d1e4f6da (commit)
       via  9f5f22dedcaa30a9be4f42b194dee14d5f884210 (commit)
       via  337f8909c51b8818d615d6d25bd6f722de146d50 (commit)
       via  755469bd4302eec667ac336bbec2110380ff3459 (commit)
       via  ee3d9d52bdba34dd0e9251bf3c13806a66afd1b2 (commit)
       via  73bcaf13ff0c83d9f88a70ae357655ea2bbce3db (commit)
       via  1bd6efe1ad0dba7014905612d33be024c07a264c (commit)
       via  43f509d2950d2198fb59437f8eb9fd06003b6e47 (commit)
       via  a551938b0baa75281e9dd192a1209512052e105b (commit)
       via  3533ecc9382e7b442f2b278edb0882033dfd1bad (commit)
       via  0f970430f8e5b13657b919dea088ef2adf5f4992 (commit)
       via  708a474be2e1814e9762ef7eee56fae2a95c0e63 (commit)
       via  1bf9ba9958e77c5f3661bb402d339d0c373ffca3 (commit)
       via  ab6816c9b95707dc87e95491f0d91c279cac6c9f (commit)
       via  2e874e8fe38ae35d03f5b6680640b19c37c4d3ff (commit)
       via  edd2d054449e962e8ecd36dc665b872a22a535e3 (commit)
       via  787387d34905ff1d1f309b01e6d1d625ae3e8f48 (commit)
       via  1b39cbe4af7b9f7d1de08875f8e888ea0d659eae (commit)
       via  9de125dd379038ef93f9d5a1d377e045eb8c632f (commit)
       via  c670f281f04209c801be87fb5aea06d2589db097 (commit)
       via  a24fe51831e5733992457a44d483c84db9989377 (commit)
       via  63f2ec5421eb7382c9c67cceacd8b1ca11aae229 (commit)
       via  db147e0301360e480fdbcb9b7895eba154aa27ad (commit)
       via  3bf495755142fb41a761408ac7d41d9c643c4139 (commit)
       via  0211c1c885c370c6e1a0c4843b75d9540210c35a (commit)
       via  b8808eb1fb8128104ee6fbea5b477419a83e1dc9 (commit)
       via  5d0b71c75833bdd81a050dc82ad74bf481db414e (commit)
       via  6c5b577ff392a1572a83a820bd9e73bde42213b2 (commit)
       via  6dc25010dd2d5cd6640a6bff1b07296a7354bf16 (commit)
       via  dd2aaafbf99ecd589d10fb3535288f31cd5bc17e (commit)
       via  7348e20f134a49ac968cff67c30d332e47d179d9 (commit)
       via  432f5e55bbdf3b027df27ce4cefb400f97cec52e (commit)
       via  18c9ae6ea83ba40a48bf932c2d714bdd33c7fd01 (commit)
       via  6151597c5055ebc0b66279fef15f766776cac7db (commit)
       via  08459e1a7325cb19a26049bec1614a5296c2fd42 (commit)
       via  51aaec5bd8b66336d711d7523da34d77f2a5bd76 (commit)
       via  012b401f33a66b95d1a9c9c05419aa0bcb568657 (commit)
       via  a01522a48c1b8197357c8b70107afd61e1dc3639 (commit)
       via  1049be1cb32e0d38eeffe519ba4bb58aaf5d2467 (commit)
       via  bd3d8c4e902c1497b48aa128d24c5746600bc771 (commit)
       via  4fe8da4bdf6444298ff7ad0cd417e662f7a87389 (commit)
       via  7bd44c9f37c02bab0318c2d57d40844668d94508 (commit)
       via  b05b71bd830008779abcb583c5a185fddf3069c5 (commit)
       via  09cc3601e8607961a648f07adca15fee0392eacb (commit)
       via  1a1574832abe47446752b55a3ff7e1a33affa126 (commit)
       via  1df64b6ceed9014f93b74db7ccee8f6f7bf0a249 (commit)
       via  759e253212ce389ecfe3dd08b34e1b1900aa817f (commit)
      from  6de5de4f5c23ff79074b68d7a7447d35af8e200d (commit)

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


- Log -----------------------------------------------------------------
commit a4f1d30bfe206b43883ed7af5ed1a8607318ce53
Author: Günther Deschner <gd at samba.org>
Date:   Wed Oct 22 23:16:19 2008 +0200

    s3-samr-server: fix access check in _samr_QuerySecurity().
    
    Guenther
    (cherry picked from commit 25cb282f7042e8192c0bc6d720df0646b74e9a47)
    (cherry picked from commit 96b35c32ae99d74608ad95d063629554fee77979)

commit c3d6823bf6c9743c0c94cfde8676da78de6b41fe
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Oct 20 16:53:05 2008 -0700

    Remove the requirement for ldap call made as root. Add in security
    checks for all SAMR calls.
    Jeremy.
    (cherry picked from commit b848f96d747fb41c074dd073f24f186539257d71)
    (cherry picked from commit b339f17132b18edad52b4c2f6b348e4b8d789bcb)

commit f8d212b50ca15a4f1bc6b67a5360799e581e1c13
Author: Günther Deschner <gd at samba.org>
Date:   Thu Oct 23 01:42:27 2008 +0200

    s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on success.
    
    Guenther
    (cherry picked from commit 8a0054c6d273049bea235803db25912f6cf03610)
    (cherry picked from commit 40a904ee021e4c9390235f1d476bc37b87ac9b70)
    (cherry picked from commit ae01a98d49be39c258e479d610fa2e58ea2b6c62)

commit f1d45aad7dd6b7a5011e4c895c87c53fd6d1ceb6
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 22 13:18:58 2008 -0700

    Fix net rpc vampire, based on an *amazing* piece of debugging work by "Cooper S. Blake" <the_analogkid at yahoo.com>.
    
    "I believe I have found two bugs in the 3.2 code and one bug that
    carried on to the 3.3 branch.  In the 3.2 code, everything is
    located in the utils/net_rpc_samsync.c file.  What I believe is the
    first problem is that fetch_database() is calling
    samsync_fix_delta_array() with rid_crypt set to true, which means
    the password hashes are unencrypted from the RID encryption.
    However, I believe this call is redundant, and the corresponding
    call for samdump has rid_crypt set to false.  So I think the
    rid_crypt param should be false in fetch_database().
    
    If you follow the code, it makes its way to sam_account_from_delta()
    where the password hashes are decrypted a second time by calling
    sam_pwd_hash().  I believe this is what is scrambling my passwords.
    
    These methods were refactored somewhere in the 3.3 branch.  Now the
    net_rpc_samsync.c class calls rpc_vampire_internals, which calls
    libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
    rid_crypt always set to false.  I think that's correct.  But the
    second bug has carried through in the sam_account_from_delta()
    function:
    
     208         if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
     209                 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0);
     210                 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
     211         }
     212
     213         if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
     214                 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0);
     215                 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);
    
    If you look closely you'll see that the nt hash is going into the
    lm_passwd variable and the decrypted value is being set in the lanman
    hash, and the lanman hash is being decrypted and put into the nt hash
    field.  So the LanMan and NT hashes look like they're being put in
    the opposite fields."
    
    Fix this by removing the rid_crypt parameter.
    Jeremy.
    (cherry picked from commit e38436f731ff09333588cc0751c79029a569f390)
    (cherry picked from commit 61046225de8a4cd77e94d8c5c4a8f510bc11b79e)

commit de78562537f50ef59b8c4b12b4d275128dabc18d
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 22 14:26:05 2008 +0200

    Fix bug 5840: Segfault in "rpcclient lsaaddacctrights"
    (cherry picked from commit 79222e476edbccf81e70cf1c0d1f40db0b88e20b)
    (cherry picked from commit 369fecaeb2470a1f7e68417ccdddb61334e37d92)

commit a42bfbed2276c58eb749dbc53680ab0bd6b3d21a
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 21 17:06:53 2008 -0700

    Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
    Jeremy.
    (cherry picked from commit 82ec832f7edffe2fcfd1bb067e092c159bed2973)
    (cherry picked from commit 042e50f8709cfbe45d5b184cb3c4fe1b16bdc3b0)

commit d0b811294c3054838a6d6a41c285f81c4ff008f3
Author: Andreas Schneider <mail at cynapses.org>
Date:   Mon Oct 20 17:35:42 2008 +0200

    Delete the krb5 ccname variable from the PAM environment if set.
    
    If winbind sets the KRB5CCNAME variable it should unset it when
    the cache gets destroyed.
    (cherry picked from commit e7b0d1c984a37600a234c1f4c95b06e9b5898f30)
    (cherry picked from commit ddba89d7713923bfbf1c8492c5dc6c6d5b220f1e)

commit eb0e0d7f269e03b5a817ee4a356f0dc212c92005
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 20 20:16:03 2008 +0200

    s3-samr-server: be consistent when reporting we do password complexity.
    
    Guenther
    (cherry picked from commit 7c2831c5872ad26e1e0cd7df59d6c0b88d566760)
    (cherry picked from commit f8d4596ec2b8f35dd3cc05aa7ee356abb9c0920b)

commit acb4f9dc585c849c0a6114edcaa4ce7ddbe1a50c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 17 15:25:58 2008 -0700

    Unify access checks for lsa server functions.
    Jeremy.
    (cherry picked from commit ef15ff6abec34377ab7fa75201e2799c0bb72aeb)
    (cherry picked from commit afed4929f9c707fb72b0e8dd12b1a1e8dcab9a84)

commit 375f099a2cdfe9e686b2e1edb23f2e33a47f5786
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Oct 16 21:04:18 2008 -0700

    Cope with bad trans2mkdir requests from System i QNTC IBM SMB client.
    If total_data == 4 Windows doesn't care what values
    are placed in that field, it just ignores them.
    The System i QNTC IBM SMB client puts bad values here,
    so ignore them.
    Jeremy.
    (cherry picked from commit 5b1d8588d01d11251541829c5a3dff211fe925fd)
    (cherry picked from commit feb057d4503118e519b5dbd9d2c3ca2c1ee55380)

commit 8869e3b627ac6ee0b4a5383dced2ae0ec590a04c
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Oct 16 15:06:13 2008 -0700

    Unify the logic in pull_ascii_base_talloc() and pull_ucs2_base_talloc().
    Jeremy.
    (cherry picked from commit 5109bd33719a4bb1534cb0e012c92ec778fb26df)
    (cherry picked from commit 01fd94981e322da59ac2c00055220c89de135ebe)

commit cdc7213b35476957aea67c3d72d4d91d64e234c0
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Oct 16 11:57:51 2008 -0700

    Fix bug 5826 - Directory/Filenames get truncated when 3.2.0 client acesses old server.
    Karolin this is a show-stopper for 3.2.5.
    There was some code in pull_ucs2_base_talloc() to cope with this case which
    hadn't been added to pull_ascii_base_talloc(). The older Samba returns non
    unicode names which is why you are seeing this codepath being executed.
    Jeremy.
    (cherry picked from commit 09fa53d927436310ae3c17096d42e2fa4de1dd2e)
    (cherry picked from commit f3b0e219f1a7660ff275db701935eecbe053fa25)

commit 8f31fd94d786f42074b63e88b529f593d47b6ec0
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 15 18:08:07 2008 -0700

    Don't use debug level 1 to log a trivial message.
    Jeremy.
    (cherry picked from commit 7c53cde257515e7bfffc8f3c0b54b7c99554d240)
    (cherry picked from commit 520dcfffe78bb079bbdad6de5a4cdc392527f4b8)

commit 68b817d5f63145eacb3ef4d67f8e66437b179a45
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 14 16:05:00 2008 -0700

    Attempt to fix bug #5818 - "smbcacls: sorts ACEs improperly and loses inheritance", based on
    a patch from Paul Fertser <fercerpav at gmail.com>. I also added the ability to get/set hex
    and symbolic inheritance flag names on ACE flags. I'm still investigating the effects
    of setting the "SEC_DESC_DACL_AUTO_INHERIT_REQ" flag as I don't yet see what effects
    this is having on the ACE sent.
    Jeremy.
    (cherry picked from commit e59a21e945e6336f3d7622bf77cf5c2304936b70)
    (cherry picked from commit 5d2d94b46bd2ab03e2f83036b4d7fa3e401c3458)

commit cdc814f491ec7dd39ec8feb8d26471289e9ec0f7
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 14 15:40:44 2008 -0700

    Note url explaining this code.
    Jeremy.
    (cherry picked from commit 4f1cdfe0901f4c78dff56ae5c26d2801b97d50d5)
    (cherry picked from commit 9953885d0be6a2477f5fd29940f3f1d6a7136cf4)

commit 57f54df5826f98d262f56978ddd43cc29c26eaee
Author: Holger Hetterich <hhetter at novell.com>
Date:   Tue Oct 14 11:37:41 2008 -0700

    Fix the "Premature end of data in tag" error when buiding the manpage, fix a typo in the text, add an example for anonymization usage.
    (cherry picked from commit 1d202a8a7bccc65e47fc78b17d89b7e74a358487)
    (cherry picked from commit abfdb52b60e84980d22e6c6c3479e67e20311b12)

commit 6a0a99852112a2ff23b79887905a4c7ac7d3f989
Author: Holger Hetterich <hhetter at novell.com>
Date:   Mon Oct 13 14:18:54 2008 -0700

    Update the manpage for vfs_smb_traffic_analyzer to include the anonymize_prefix option
    (cherry picked from commit c67cf648331bf4b8268813cb005b7283dd65eb73)
    (cherry picked from commit 9222fde6505deb31324b507d73c96bcb6edb161d)

commit f48c2cfb57ece0aaa9602b1b1e4d54b0d1e4f6da
Author: Holger Hetterich <hhetter at novell.com>
Date:   Mon Oct 13 14:14:25 2008 -0700

    Enable optional anonymization of user names,
    if the configuration parameter anonymization_prefix is defined in
    smb.conf, and use the prefix given there.
    (cherry picked from commit 86a621a1a3e08bad8a0b276d8444f1f69a500385)
    (cherry picked from commit e9359e6e8f692c693aad95f9a241c41cc23aa02a)

commit 9f5f22dedcaa30a9be4f42b194dee14d5f884210
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Oct 7 21:24:25 2008 +0200

    Fix bug 5691: SIGBUS on Solaris
    (cherry picked from commit 0f3f34033a80e44fa18cae452a164e445392138a)
    (cherry picked from commit 41b2199fd87598076a1f45106b512c94042f7968)

commit 337f8909c51b8818d615d6d25bd6f722de146d50
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 12 10:41:29 2008 +0200

    Fix the build
    (cherry picked from commit 1ab2a5b958a900a078cadf98b83fba7fadbaedf9)
    (cherry picked from commit 916bb3a8dc1ab23e416508cc2ed7a5791540e622)

commit 755469bd4302eec667ac336bbec2110380ff3459
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 10 17:25:44 2008 -0700

    Now it's working, back port the aync fix for parsing large cups printer lists.
    Jeremy.
    (cherry picked from commit 48ee5a66d18b805d03f93c85e98a41374d82cfb9)
    (cherry picked from commit f5f7ed4041ef986a5ce208d59bbf39d34373ce71)

commit ee3d9d52bdba34dd0e9251bf3c13806a66afd1b2
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Oct 9 17:22:59 2008 +0200

    Make use of ZERO_STRUCT (the first memset was actually wrong)
    (cherry picked from commit e42477caece1a2e861aa0698d2e06847819f0b0d)
    (cherry picked from commit 69de2806465742ea6f1ea96d75d2cb3be6b84284)

commit 73bcaf13ff0c83d9f88a70ae357655ea2bbce3db
Author: Jeff Layton <jlayton at redhat.com>
Date:   Thu Oct 9 10:44:37 2008 -0400

    mount.cifs: make return codes match the return codes for /bin/mount (try #3)
    
    The manpage for /bin/mount specifies that the return code should be a
    positive integer (actually, it's a bitfield). Clean up the return
    codes from mount.cifs to make them match the expected return values
    from /bin/mount. This necessary for proper integration with autofs.
    
    This is the third attempt at this patch. The changes here are minor,
    just changing some return's from main() into exit() calls for
    consistency's sake.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit 2374799c8114ae3ed422d1cbe4ca12c4fd075274)
    (cherry picked from commit 98bcd52a568c274707cc6ccb9071d07a8bfca1ca)

commit 1bd6efe1ad0dba7014905612d33be024c07a264c
Author: Jeff Layton <jlayton at redhat.com>
Date:   Thu Oct 9 10:42:28 2008 -0400

    mount.cifs: have uppercase_string return success on NULL pointer
    
    We currently don't attempt to uppercase the device portion of the mount
    string if there isn't a prefixpath. Fix that by making uppercase_string
    return success without doing anything on a NULL pointer.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit 34b5cfe8a0cb8674da0c5ac7d81b6e64160ccaa2)
    (cherry picked from commit 3f4cdabc965f824b70891f6a6bcb29e5f9b579e5)

commit 43f509d2950d2198fb59437f8eb9fd06003b6e47
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 8 11:40:16 2008 -0700

    Fix bug #5814 - Winbindd dumping core in a strange manner while doing "rescan_trusted_domain".
    From analysis by hargagan <shargagan at novell.com> :
    "The winbindd_child_died() is also getting called from process_loop() in case of
    SIGCHLD signal. In this case it doesn't make the timeout_handler to NULL for
    the first request. It then initiate a new request using
    schedule_async_request() which installs a new timeout handler for the same
    request. In such a case, for a badly unresponsive system both the timeout
    handler can be called. For the first call the "private_data" will be cleared
    and for another call the timeout handler will be detecting the double free. So,
    for such a case as well, the winbindd_child_died() should make the
    timeout_handler to NULL."
    Jeremy.
    (cherry picked from commit ce8de496ec139b7a56db20c5ffbcbdc2f4db0a51)
    (cherry picked from commit 15b2f1d8744d157b131a0441e8738d8519de37c7)

commit a551938b0baa75281e9dd192a1209512052e105b
Author: Tim Prouty <tim.prouty at isilon.com>
Date:   Tue Oct 7 10:30:22 2008 -0700

    Fixed build warning "passing arg from incompatible pointer type"
    
    The fix explicitly makes the conversion from timeval to time_t using the
    existing time utility functions.
    
    Compiling modules/vfs_smb_traffic_analyzer.c
    modules/vfs_smb_traffic_analyzer.c: In function `smb_traffic_analyzer_send_data':
    modules/vfs_smb_traffic_analyzer.c:173: warning: passing arg 1 of `localtime' from incompatible pointer type
    (cherry picked from commit 22852666ddf3e77404373042ceecb19747ae25cd)
    (cherry picked from commit ed955214133c264865d2f6ca532349f0c1ea8d4b)

commit 3533ecc9382e7b442f2b278edb0882033dfd1bad
Author: Tim Prouty <tim.prouty at isilon.com>
Date:   Tue Oct 7 10:13:51 2008 -0700

    Fixed "declaration shadows global declaration" warnings.
    
    The patch simply uses a more descriptive variable name for tcp_seq.
    
    lib/socket_wrapper/socket_wrapper.c:753: warning: declaration of 'tcp_seq' shadows a global declaration
    /usr/include/netinet/tcp.h:40: warning: shadowed declaration is here
    lib/socket_wrapper/socket_wrapper.c: In function `swrap_marshall_packet':
    lib/socket_wrapper/socket_wrapper.c:919: warning: declaration of 'tcp_seq' shadows a global declaration
    /usr/include/netinet/tcp.h:40: warning: shadowed declaration is here
    (cherry picked from commit 03cbea1d653c716b16347c831aa56dca0eb297ab)
    (cherry picked from commit fa3096b975de2c7fd747ca9f344e36c911e27a9c)

commit 0f970430f8e5b13657b919dea088ef2adf5f4992
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 6 14:10:23 2008 -0700

    If name_to_fqdn fails, retry with the dns domain the DC gave us
    
    This is a workaround for the cases where you want to join under a netbios name
    that is different from your hostname, i.e. a name that can not be found in
    /etc/hosts or dns. In these cases, name_to_fqdn fails or gives invalid results.
    (cherry picked from commit 84951b54bc1473aa9275c02cc37a9f0d7d4150e2)
    (cherry picked from commit 82a086fb6f70dd6b725e4976293bc377a6a90f3a)

commit 708a474be2e1814e9762ef7eee56fae2a95c0e63
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 6 14:10:10 2008 -0700

    Log in the parent winbind log where a request is going
    (cherry picked from commit f63bac521f0595ccbcf687678e325649f3e0e5e3)
    (cherry picked from commit b1bcaf45ce14108b7e2b429b96908e30bf6eb90d)

commit 1bf9ba9958e77c5f3661bb402d339d0c373ffca3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Sep 21 20:39:17 2008 +0200

    Attempt to fix bug 5778
    
    Jeff, Steve, please check!
    (cherry picked from commit 110756cc7bcaed5a9d6aa58f3b3fe4481f8d1f31)
    (cherry picked from commit 46b050e525b339fbac68329f668e47ebd11b3e08)
    (cherry picked from commit ecc67001315111493738e893917c4550be7828a1)

commit ab6816c9b95707dc87e95491f0d91c279cac6c9f
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 5 14:34:58 2008 -0700

    Remove an unused variable
    (cherry picked from commit 41aed9f2f3c6d53e1b8b6d72467bc5d5a0689dce)
    (cherry picked from commit 7cb9d82244a8e93261d12a3800334d8152a2431e)

commit 2e874e8fe38ae35d03f5b6680640b19c37c4d3ff
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 5 14:34:01 2008 -0700

    Fix some missing error handlings
    (cherry picked from commit 1709a099c82e9b06771b3aa562c5488a71f10c62)
    (cherry picked from commit 4ac937db865d9fc56cb49838a361dd697d06efc7)

commit edd2d054449e962e8ecd36dc665b872a22a535e3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 5 14:29:50 2008 -0700

    OS/X does not have rl_done in readline.h
    (cherry picked from commit af055bb8d89a14ed572f76b5f8fe492e0ed98e12)
    (cherry picked from commit 829e29c95ad6c1b5744dcffb4586ff7c875e3831)

commit 787387d34905ff1d1f309b01e6d1d625ae3e8f48
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 5 14:28:33 2008 -0700

    Fix an uninitialized variable warning
    
    Not sure if we can ever not get domain and dns_domain, but gcc complained
    (cherry picked from commit e56b0b947a5c357c4e84b330c38d7a7f569be201)
    (cherry picked from commit 2e65d8bce755ddfa35bae5ad4c5107db7e18515a)

commit 1b39cbe4af7b9f7d1de08875f8e888ea0d659eae
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Oct 4 19:39:39 2008 -0700

    Fix an unlikely memleak found by the IBM checker
    (cherry picked from commit 52365077e74e80959a42aa82cf9a6c959e2fcda5)
    (cherry picked from commit a0ee34c3c55a64ac2b73fdbaa32233d01ee131c6)

commit 9de125dd379038ef93f9d5a1d377e045eb8c632f
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Oct 4 19:38:42 2008 -0700

    Fix an uninitialized variable found by the IBM Checker
    (cherry picked from commit 65169e4b5f182f1614e102bb0e09326a26bd5b5d)
    (cherry picked from commit 2ed66bc2b6e22aeb0dcc1aba68bac3791ee0647f)

commit c670f281f04209c801be87fb5aea06d2589db097
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Oct 4 19:38:04 2008 -0700

    Fix a potential NULL deref in line 258 found by the IBM checker
    (cherry picked from commit de581efedbc53a783a680ff366d37aeccd14ee23)
    (cherry picked from commit 589fe1c879ef23ee9e45f5f877f2696142d57e70)

commit a24fe51831e5733992457a44d483c84db9989377
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 3 14:56:30 2008 -0700

    Correctly fix smbclient to terminate on eof from server.
    Jeremy.
    (cherry picked from commit 4dc2eb7f42bad6812d21bf4577e2901b04a5ca83)
    (cherry picked from commit 28fa519a80bfcd30737a51ad157d134322c1fed9)

commit 63f2ec5421eb7382c9c67cceacd8b1ca11aae229
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Fri Oct 3 10:51:54 2008 -0500

    net_dns: Make "lwinet ads dns register" honor the "interfaces" parameter.
    
    This is helpful on multihomed hosts that only require a subset
    of IP addresses be registered with DNS.
    (cherry picked from commit 17c9f8810598d8117befc896d12a597a52b0ac3b)
    (cherry picked from commit 2fb742e127f725b56f308538852d7b10b86f29c1)
    (cherry picked from commit d2242f9776cfed2dfff44db180dbf34fbbba2e5e)

commit db147e0301360e480fdbcb9b7895eba154aa27ad
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Fri Oct 3 10:51:21 2008 -0500

    libaddns: Use the same prerequisite for DDNS update as Windows XP.
    
       Hostname, TYPE: CNAME, CLASS: NONE
    
    This has to have been broken for ages.  I cannot see
    how it would have worked in any environment.
    (cherry picked from commit 6b6402bce318a48b0890ed6fc23ed5b30440927b)
    (cherry picked from commit adde53eddb85e9af391c3f77425a3376c5c60dbf)
    (cherry picked from commit 35130846b4595cc3a937e10a113d2805a5b2c096)

commit 3bf495755142fb41a761408ac7d41d9c643c4139
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Oct 2 14:02:20 2008 -0700

    Fix bug #5080. Access to cups-printers via samba broken with cups 1.3.4, Unsupported character set.
    Cups 1.3.4 expects utf8 to be used in all messages to/from the server. We may be using a
    different character set so we need to use talloc utf8 push/pull functions in all communication.
    Contains the !server fix already applied to 3.3.
    Jeremy.
    (cherry picked from commit a1323951a3264f81be07276f021201bee0d8d0f5)
    (cherry picked from commit 47161923108222c41db4572b5f44cdb2b6d84a51)

commit 0211c1c885c370c6e1a0c4843b75d9540210c35a
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Thu Oct 2 09:17:49 2008 -0400

    Fix bug 5805: don't close stdout
    
    - When calling setup_logging multiple times, the code was closing the debug
      file descriptor before opening or assigning the new one.  We don't, however,
      want to close the debug file descriptor if it is stdout.
    
    Derrell
    (cherry picked from commit 7142872d2c6e0be42307671afa31016f6940007d)
    (cherry picked from commit a937de4a626a8084e852bf7d345441bab15963cd)

commit b8808eb1fb8128104ee6fbea5b477419a83e1dc9
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 1 15:00:35 2008 -0700

    Whitespace cleanup.
    Jeremy.
    (cherry picked from commit d596f78517f33f5a4c4849be3162d4f3031f045f)
    (cherry picked from commit a2f298883f21c3e9afe686ee393410f2bcb28370)

commit 5d0b71c75833bdd81a050dc82ad74bf481db414e
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 1 13:22:02 2008 -0700

    Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv at gmail.com>.
    This API is unusual in that if used to remove a non-list head it nulls out
    the next and prev pointers. This is what you want for debugging (don't want
    an entry removed from the list to be still virtually linked into it) but
    means there is no consistent idiom for use as the next and prev pointers
    get trashed on removal from the list, meaning you must save them yourself.
    You can use it one way when deleting everything via the head pointer, as
    this preserves the next pointer, but you *must* use it another way when not
    deleting everything via the head pointer. Fix all known uses of this (the main
    one is in conn_free_internal() and would not free all the private data entries
    for vfs modules. The other changes in web/statuspage.c and winbindd_util.c
    are not strictly neccessary, as the head pointer is being used, but I've done
    them for consistency. Long term we must revisit this as this API is too hard
    to use correctly.
    Jeremy.
    (cherry picked from commit 347fc4ed725083f2c520afc39f7c81db0dd60324)
    (cherry picked from commit 8443b4859f64aa5459976ce37ca96a90daae889a)

commit 6c5b577ff392a1572a83a820bd9e73bde42213b2
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 1 12:30:12 2008 -0700

    Turn the socket connections into a refcounted list - in the common case there'll now only be one socket per smbd.
    Changed the format of the wire data to (a) include a version number (V1) as the first element. (b) removed the
    ";)" at the end an replaced it with a "\n". Receiver can change back if needed, and now receiver can just log
    "as-is" to a text file (making testing easier). Added my (C). Sorry Holger, but I've changed quite a bit now.
    Jeremy.
    (cherry picked from commit 7ea95c19305a2fb6efc95acc4e96f083e31f6c6f)
    (cherry picked from commit 63603373628901fcb6a816d9ac9b5340dd8d8662)

commit 6dc25010dd2d5cd6640a6bff1b07296a7354bf16
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 30 16:20:29 2008 -0700

    Convert to allocated strings. Use write_data(), not send as this doesn't correctly
    deal with EINTR. Jim and Holger please check this still works.
    Jeremy.
    (cherry picked from commit dc1ff1a9c07edf7e3e649b256667704ad59aafbd)
    (cherry picked from commit 747f7a5647851290f6a3968477a8749e1134777c)

commit dd2aaafbf99ecd589d10fb3535288f31cd5bc17e
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 30 15:09:49 2008 -0700

    Restructure the module so it connects to the remote data sink
    on connect, and closes the socket on client disconnect. This should
    make it much more efficient. Store the remote fd in a private data
    pointer off the handle. Finally we need to remove the fstrings and
    convert to allocated buffer storage.
    Jeremy.
    (cherry picked from commit 2f7884babcefcb04d1f9a877dde41e11b0f7b825)
    (cherry picked from commit 1bf75ac9781c60be5a7b5899bc42aa1d198091d9)

commit 7348e20f134a49ac968cff67c30d332e47d179d9
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 30 13:21:27 2008 -0700

    Fix the make test problem Karolin reported. Now rename_open_files actually works correctly we must emit the change notify before we change the name, not before.
    Jeremy.
    (cherry picked from commit 10ae99d86c0c90bee9a0538854f6f96fc7cbbc23)
    (cherry picked from commit ac2046979cacf96f8d4df7c5ece06e55d51758c8)

commit 432f5e55bbdf3b027df27ce4cefb400f97cec52e
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 29 16:04:23 2008 -0700

    re-added "winbind:ignore domains" patch
    
    This option really is essential, as we discover again and again at
    customer sites. Due to bugs in winbind some domains are toxic. When
    you are installing at a site and a particular domain in a complex
    setup causes winbind to segfault or hang then you need a way to
    disable that domain and continue.
    
    In an ideal world winbind could handle arbitrarily complex ADS
    domains, but we are nowhere near that yet. If we ever get to that
    stage then we won't need this option.
    (cherry picked from commit 41898a42c1ad7d382088799a6e3f712583808d20)
    (cherry picked from commit 37d4e792bfd72e4b12811e0fbdb75cec2eda8f2a)

commit 18c9ae6ea83ba40a48bf932c2d714bdd33c7fd01
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Sep 29 11:24:00 2008 -0700

    fixed segv on startup with trusted domains
    
    With some setups, idmap_tdb2_allocate_id can be called before the
    allocate backend is initialised, leading to a segv. This change
    ensures that the db is opened in all paths that use it
    (cherry picked from commit 3a2a70996919a7ee08fea40b8e5f1cf2e3bd7caf)
    (cherry picked from commit 8b41be0c7080edaf9fb33e583c66f2ef50a91643)

commit 6151597c5055ebc0b66279fef15f766776cac7db
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Sep 29 10:57:32 2008 -0700

    Ensure we null out fsp after a close in all paths.
    Jeremy.
    (cherry picked from commit 3cba8305bd32c7a83fd9c39eaea953b8a0199b22)
    (cherry picked from commit a48d591ef5d839159f600a8c7e2966211450c00b)

commit 08459e1a7325cb19a26049bec1614a5296c2fd42
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Sep 29 10:53:36 2008 -0700

    Avoid freeing fsp twice when opening new_file fails. (Debian #431696)
    If opening new_file fails, fsp would still be set to the files_struct of
    old_file.
    (cherry picked from commit f75b53f85cbccc4b37db4c9adc0df81a06898d38)
    (cherry picked from commit 7c9a7cb8682156ffb39382a44e3abf40408bff63)

commit 51aaec5bd8b66336d711d7523da34d77f2a5bd76
Author: Holger Hetterich <hhetter at novell.com>
Date:   Mon Sep 29 14:34:36 2008 +0200

    Add an initial version of a manpage for the vfs_smb_traffic_analyzer module.
    (cherry picked from commit 503d1c0226fb38c21b14fe1deac11b0ec461b4d0)
    (cherry picked from commit 1394827cfda4eeff5b4239b6ed5c93fcaaed0e2e)

commit 012b401f33a66b95d1a9c9c05419aa0bcb568657
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 26 18:37:33 2008 -0700

    Second part of the fix for bug #5790 - samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call.
    This was my fault. I use a singleton cache (positive and negative) to speed up pathname based qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the cache was set. Doh !
    Jeremy.
    (cherry picked from commit a7fd59a26bfc4a98b6936dc3ac8e67e1a7cb3733)
    (cherry picked from commit e73c090b5ff624f71ce827c494cd71ca73144ba9)

commit a01522a48c1b8197357c8b70107afd61e1dc3639
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 26 15:18:18 2008 -0700

    Fix bug #5797 - Moving readonly files fails. Reported by infomail at lordb.de.
    We don't need to deny a DELETE open on a readonly file (I'm also adding a s4
    torture test for this), the set_file_disposition call will return
    NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set
    on a readonly file (and we already do this).
    Jeremy.
    (cherry picked from commit dd43302066b2d3f5270d3ee25a1e2c85d8ce2b85)
    (cherry picked from commit 7292c322ca70e9df82e020f45f1510e9ca02efbc)

commit 1049be1cb32e0d38eeffe519ba4bb58aaf5d2467
Author: Günther Deschner <gd at samba.org>
Date:   Fri Sep 26 01:32:16 2008 +0200

    s3-srvsvc: fix _srvsvc_NetShareAdd segfault.
    
    parm_err is not a ref pointer.
    
    Guenther
    (cherry picked from commit 29942b7043c1a31ad4fb76d01ab19fd3dbf26f0a)
    (cherry picked from commit 6debf35c1575a25f98f927726742a7f34b3a55a9)
    (cherry picked from commit aa9a74f33f1a1862836569565d64861706de5429)

commit bd3d8c4e902c1497b48aa128d24c5746600bc771
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Sep 25 11:56:10 2008 -0700

    Use IPv4/v6 independent calls. Change safe_strcpy/cat to strlcpy/cat (this
    needs changing to talloc_sprintf) and fix file descriptor resource leaks
    in error paths. Jim and Holger please check !
    Jeremy.
    (cherry picked from commit d55becbe492cf3c95ef45ebb2c123067a9297b4f)
    (cherry picked from commit caa0f1131872f82c1a346f701830544b372e4317)

commit 4fe8da4bdf6444298ff7ad0cd417e662f7a87389
Author: Jim McDonough <jmcd at samba.org>
Date:   Wed Sep 24 20:47:03 2008 -0400

    Fix the new vfs_smb_traffic_analyzer build for static links
    (cherry picked from commit d36039acd8f1722ba76b5999d7fea4f046735817)
    (cherry picked from commit f64bcae4ff2bb1a9db603c1f38e1e4fa2e5148bc)

commit 7bd44c9f37c02bab0318c2d57d40844668d94508
Author: Holger Hetterich <hhetter at novell.com>
Date:   Wed Sep 24 19:01:00 2008 -0400

    SMB traffic analyzer vfs module from Holger Hetterich <hhetter at novell.com>
    
    Used to gather data to feed to a database for live and historical
    analysis of usage per user, per share, etc.
    
    Helper apps to read the data still to come.  This one still needs to be
    made ipv6 enabled (connection is made to the helper app).
    (cherry picked from commit baf49e5fcabd3682927fe19974c97bbae4be7379)
    (cherry picked from commit aeabc475d8abf9a820b4846a30cf92cc253bc939)

commit b05b71bd830008779abcb583c5a185fddf3069c5
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Sep 24 14:26:06 2008 -0700

    Fix bug #5790 samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition.
    We were checking that fd != -1 in file_find_di_XXX calls which is no longer
    needed due to a change in internal semantics.
    Jeremy.
    (cherry picked from commit bd7acd6344022e87495edc124e262eb50ba5ebd8)
    (cherry picked from commit 24348e2e028f8f63c7acad33f2f9a362a3d3fdc0)

commit 09cc3601e8607961a648f07adca15fee0392eacb
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 23 16:38:04 2008 -0700

    Fix winbindd crash in an unusual failure mode. Bug #5737. Based on original patch from shargagan at novell.com
    Jeremy.
    (cherry picked from commit 0a0426650e596453b4b8aa6536f4fe8b1d890451)
    (cherry picked from commit 9a38a8454cfbd0011d804b3ab88c16e5d4f1c4bd)

commit 1a1574832abe47446752b55a3ff7e1a33affa126
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Sep 23 15:04:18 2008 -0700

    Fix bug #5783 FindFirst fails where search pattern == mangled filename.
    That was an old and subtle bug.
    Jeremy.
    (cherry picked from commit c412888f916563c44c4c753884df23c1951f6e27)
    (cherry picked from commit fc9247572e0ace4956845e279c63c9d00fa667bd)

commit 1df64b6ceed9014f93b74db7ccee8f6f7bf0a249
Author: Günther Deschner <gd at samba.org>
Date:   Fri Sep 5 14:01:45 2008 +0200

    build: don't install the cifs.upcall binary twice.
    
    Guenther
    (cherry picked from commit 1f44b4aaa5f700827ee2ab272ae4b59e559b094b)
    (cherry picked from commit 020c03bff844ef976dd786a755c4d682bf161a3d)
    (cherry picked from commit 5a9a190a5588b0cf938bc5c9659b7704d18cd4a3)
    (cherry picked from commit c83295d3b575be80a432c4716be62cd63eb3bdef)
    (cherry picked from commit cfc8dc236dda869dbe4141bef80f6965ce76188d)

commit 759e253212ce389ecfe3dd08b34e1b1900aa817f
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Sep 18 15:52:06 2008 +0200

    build-docs: Add 'make clean'.
    
    Karolin
    (cherry picked from commit cf40fb97239ed9a11e5750fde6e078233e567bba)
    (cherry picked from commit 6e1d92e3b324a0759486f914a0e4b32be1142aee)
    (cherry picked from commit 656189740d701246a8689e3348510715122bf148)
    (cherry picked from commit 4f9f592ab792e36e870bbeba96a1fb8f0ee9efda)

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

Summary of changes:
 docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml |  176 ++++++
 release-scripts/build-docs                         |    3 +
 source/Makefile.in                                 |    6 +-
 source/client/client.c                             |   13 +-
 source/client/mount.cifs.c                         |   96 ++--
 source/configure.in                                |    3 +-
 source/include/rpc_lsa.h                           |    1 +
 source/include/smb.h                               |    1 +
 source/lib/charcnv.c                               |   50 ++-
 source/lib/debug.c                                 |    4 +-
 source/lib/dummysmbd.c                             |   10 +
 source/lib/netapi/getdc.c                          |    5 +
 source/lib/readline.c                              |   21 +-
 source/lib/smbldap.c                               |    7 -
 source/lib/socket_wrapper/socket_wrapper.c         |   38 +-
 source/lib/util_sid.c                              |   11 +
 source/libaddns/dnsmarshall.c                      |    1 +
 source/libaddns/dnsrecord.c                        |    4 +-
 source/libads/ldap.c                               |    1 +
 source/libads/util.c                               |    2 +
 source/libnet/libnet_join.c                        |   11 +-
 source/libnet/libnet_samsync.c                     |   48 +-
 source/libsmb/dsgetdcname.c                        |    2 +
 source/modules/vfs_gpfs.c                          |    6 +-
 source/modules/vfs_smb_traffic_analyzer.c          |  426 ++++++++++++++
 source/nsswitch/pam_winbind.c                      |    7 +
 source/param/loadparm.c                            |    2 +-
 source/printing/load.c                             |    2 +-
 source/printing/nt_printing.c                      |    2 +
 source/printing/pcap.c                             |   77 ++-
 source/printing/print_cups.c                       |  578 ++++++++++++++++----
 source/rpc_client/cli_pipe.c                       |    2 +-
 source/rpc_server/srv_lsa_nt.c                     |   21 +-
 source/rpc_server/srv_samr_nt.c                    |  137 +++++-
 source/rpc_server/srv_srvsvc_nt.c                  |    4 +-
 source/rpcclient/cmd_lsarpc.c                      |    2 +-
 source/smbd/conn.c                                 |    2 +-
 source/smbd/filename.c                             |    3 +-
 source/smbd/files.c                                |   16 +-
 source/smbd/open.c                                 |    4 +-
 source/smbd/posix_acls.c                           |    4 +
 source/smbd/reply.c                                |    4 +-
 source/smbd/session.c                              |    5 +-
 source/smbd/trans2.c                               |   20 +-
 source/utils/net_dns.c                             |   26 +-
 source/utils/net_rpc.c                             |   11 -
 source/utils/net_rpc_samsync.c                     |   39 +-
 source/utils/smbcacls.c                            |  183 ++++++-
 source/web/statuspage.c                            |    5 +-
 source/winbindd/idmap_tdb2.c                       |   22 +-
 source/winbindd/winbindd_dual.c                    |   41 ++-
 source/winbindd/winbindd_util.c                    |   27 +-
 52 files changed, 1831 insertions(+), 361 deletions(-)
 create mode 100644 docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
 create mode 100644 source/modules/vfs_smb_traffic_analyzer.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
new file mode 100644
index 0000000..a12f44b
--- /dev/null
+++ b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
@@ -0,0 +1,176 @@
+<?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_smb_traffic_analyzer.8">
+
+<refmeta>
+	<refentrytitle>smb_traffic_analyzer</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_smb_traffic_analyzer</refname>
+	<refpurpose>log Samba VFS read and write operations through a socket
+	to a helper application</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+	<cmdsynopsis>
+		<command>vfs objects = smb_traffic_analyzer</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>The <command>vfs_smb_traffic_analyzer</command> VFS module logs
+	client write and read operations on a Samba server and sends this data
+	over a socket to a helper program, which feeds a SQL database. More
+	information on the helper programs can be obtained from the
+	homepage of the project at:
+	http://holger123.wordpress.com/smb-traffic-analyzer/
+	</para>
+	<para><command>vfs_smb_traffic_analyzer</command> currently is aware
+	of the following VFS operations:</para>
+
+	<simplelist>
+        <member>write</member>
+        <member>pwrite</member>
+	<member>read</member>
+	<member>pread</member>
+	</simplelist>
+
+	<para><command>vfs_smb_traffic_analyzer</command> sends the following data
+	in a fixed format seperated by a comma through either an internet or a
+	unix domain socket:</para>
+	<programlisting>
+	BYTES|USER|DOMAIN|READ/WRITE|SHARE|FILENAME|TIMESTAMP
+	</programlisting>
+
+	<para>Description of the records:
+
+	<itemizedlist>
+	<listitem><para><command>BYTES</command> - the length in bytes of the VFS operation</para></listitem>
+	<listitem><para><command>USER</command> - the user who initiated the operation</para></listitem>
+	<listitem><para><command>DOMAIN</command> - the domain of the user</para></listitem>
+	<listitem><para><command>READ/WRITE</command> - either "W" for a write operation or "R" for read</para></listitem>
+	<listitem><para><command>SHARE</command> - the name of the share on which the VFS operation occured</para></listitem>
+	<listitem><para><command>FILENAME</command> - the name of the file that was used by the VFS operation</para></listitem>
+	<listitem><para><command>TIMESTAMP</command> - a timestamp, formatted as "yyyy-mm-dd hh-mm-ss.ms" indicating when the VFS operation occured</para></listitem>
+	</itemizedlist>
+
+	</para>
+
+	<para>This module is stackable.</para>
+
+</refsect1>
+
+
+<refsect1>
+	<title>OPTIONS</title>
+
+	<variablelist>
+
+		<varlistentry>
+                <term>smb_traffic_analyzer:mode = STRING</term>
+                <listitem>
+                <para>If STRING matches to "unix_domain_socket", the module will
+		use a unix domain socket located at /var/tmp/stadsocket, if
+		STRING contains an different string or is not defined, the module will
+		use an internet domain socket for data transfer.</para>
+
+                </listitem>
+                </varlistentry>
+
+
+		<varlistentry>
+		<term>smb_traffic_analyzer:host = STRING</term>
+		<listitem>
+		<para>The module will send the data to the system named with
+		the hostname STRING.</para>
+
+		</listitem>
+		</varlistentry>
+
+		<varlistentry>
+		<term>smb_traffic_analyzer:port = STRING</term>
+		<listitem>
+		<para>The module will send the data using the TCP port given
+		in STRING.
+		</para>
+		</listitem>
+		</varlistentry>
+		<varlistentry>
+		<term>smb_traffic_analyzer:anonymize_prefix = STRING</term>
+		<listitem>
+		<para>The module will replace the user names with a prefix
+		given by STRING and a simple hash number.
+		</para>
+
+		</listitem>
+		</varlistentry>
+
+
+	</variablelist>
+</refsect1>
+
+<refsect1>
+	<title>EXAMPLES</title>
+
+	<para>The module running on share "example_share", using a unix domain socket</para>
+	<programlisting>
+	<smbconfsection name="[example_share]"/>
+	<smbconfoption name="path">/data/example</smbconfoption>
+	<smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:mode">unix_domain_socket</smbconfoption>
+	</programlisting>
+
+	<para>The module running on share "example_share", using an internet socket,
+	connecting to host "examplehost" on port 3491.</para>
+	<programlisting>
+	<smbconfsection name="[example_share]"/>
+	<smbconfoption name="path">/data/example</smbconfoption>
+	<smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
+	</programlisting>
+
+	<para>The module running on share "example_share", using an internet socket,
+	connecting to host "examplehost" on port 3491, anonymizing user names with
+	the prefix "User".</para>
+	<programlisting>
+	<smbconfsection name="[example_share]"/>
+	<smbconfoption name="path">/data/example</smbconfoption>
+	<smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:anonymize_prefix">User</smbconfoption>
+	</programlisting>
+</refsect1>
+
+<refsect1>
+	<title>VERSION</title>
+	<para>This man page is correct for version 3.2.0 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>
+
+	<para>The original version of the VFS module and the
+	helper tools were created by Holger Hetterich.</para>
+</refsect1>
+
+</refentry>
diff --git a/release-scripts/build-docs b/release-scripts/build-docs
index fa38d8d..53500d7 100755
--- a/release-scripts/build-docs
+++ b/release-scripts/build-docs
@@ -25,4 +25,7 @@ cd ../docs || exit 1
 mv manpages-3 manpages
 mv htmldocs/manpages-3 htmldocs/manpages
 
+cd $DOCSRCDIR || exit 1
+make clean
+
 exit
diff --git a/source/Makefile.in b/source/Makefile.in
index 12c62e1..3573ead 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -175,7 +175,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
 
 # Note that all executable programs now provide for an optional executable suffix.
 
-SBIN_PROGS = bin/smbd at EXEEXT@ bin/nmbd at EXEEXT@ @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@ @CIFSUPCALL_PROGS@
+SBIN_PROGS = bin/smbd at EXEEXT@ bin/nmbd at EXEEXT@ @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@
 
 ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
 
@@ -601,6 +601,7 @@ VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
 VFS_FILEID_OBJ = modules/vfs_fileid.o
 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
+VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
 
 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
 
@@ -2345,6 +2346,9 @@ bin/aio_fork. at SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
 	@echo "Building plugin $@"
 	@$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
 
+bin/smb_traffic_analyzer. at SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
+	@echo "Building plugin $@"
+	@$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
 #########################################################
 ## IdMap NSS plugins
 
diff --git a/source/client/client.c b/source/client/client.c
index d794f8f..dc5e0f5 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -4342,6 +4342,8 @@ cleanup:
 	}
 }
 
+static bool finished;
+
 /****************************************************************************
  Make sure we swallow keepalives during idle time.
 ****************************************************************************/
@@ -4388,6 +4390,8 @@ static void readline_callback(void)
 			DEBUG(0, ("Read from server failed, maybe it closed "
 				  "the connection\n"));
 
+			finished = true;
+			smb_readline_done();
 			if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) {
 				set_smb_read_error(&cli->smb_rw_error,
 						   SMB_READ_EOF);
@@ -4416,7 +4420,12 @@ static void readline_callback(void)
 	{
 		unsigned char garbage[16];
 		memset(garbage, 0xf0, sizeof(garbage));
-		cli_echo(cli, 1, garbage, sizeof(garbage));
+		if (!cli_echo(cli, 1, garbage, sizeof(garbage))) {
+			DEBUG(0, ("SMBecho failed. Maybe server has closed "
+				  "the connection\n"));
+			smb_readline_done();
+			finished = true;
+		}
 	}
 }
 
@@ -4428,7 +4437,7 @@ static int process_stdin(void)
 {
 	int rc = 0;
 
-	while (1) {
+	while (!finished) {
 		TALLOC_CTX *frame = talloc_stackframe();
 		char *tok = NULL;
 		char *the_prompt = NULL;
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 8fb652b..9278295 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -56,6 +56,10 @@
  #endif /* _SAMBA_BUILD_ */
 #endif /* MOUNT_CIFS_VENDOR_SUFFIX */
 
+#ifdef _SAMBA_BUILD_
+#include "include/config.h"
+#endif
+
 #ifndef MS_MOVE 
 #define MS_MOVE 8192 
 #endif 
@@ -75,6 +79,15 @@
 #define MOUNT_PASSWD_SIZE 64
 #define DOMAIN_SIZE 64
 
+/* exit status - bits below are ORed */
+#define EX_USAGE        1       /* incorrect invocation or permission */
+#define EX_SYSERR       2       /* out of memory, cannot fork, ... */
+#define EX_SOFTWARE     4       /* internal mount bug or wrong version */
+#define EX_USER         8       /* user interrupt */
+#define EX_FILEIO      16       /* problems writing, locking, ... mtab/fstab */
+#define EX_FAIL        32       /* mount failure */
+#define EX_SOMEOK      64       /* some mount succeeded */
+
 const char *thisprogram;
 int verboseflag = 0;
 static int got_password = 0;
@@ -94,6 +107,8 @@ char * prefixpath = NULL;
 
 /* like strncpy but does not 0 fill the buffer and always null
  *    terminates. bufsize is the size of the destination buffer */
+
+#ifndef HAVE_STRLCPY
 static size_t strlcpy(char *d, const char *s, size_t bufsize)
 {
 	size_t len = strlen(s);
@@ -104,10 +119,13 @@ static size_t strlcpy(char *d, const char *s, size_t bufsize)
 	d[len] = 0;
 	return ret;
 }
+#endif
 
 /* like strncat but does not 0 fill the buffer and always null
  *    terminates. bufsize is the length of the buffer, which should
  *       be one more than the maximum resulting string length */
+
+#ifndef HAVE_STRLCAT
 static size_t strlcat(char *d, const char *s, size_t bufsize)
 {
 	size_t len1 = strlen(d);
@@ -126,6 +144,7 @@ static size_t strlcat(char *d, const char *s, size_t bufsize)
 	}
 	return ret;
 }
+#endif
 
 /* BB finish BB
 
@@ -164,7 +183,7 @@ static void mount_cifs_usage(void)
 	printf("\n\t%s -V\n",thisprogram);
 
 	SAFE_FREE(mountpassword);
-	exit(1);
+	exit(EX_USAGE);
 }
 
 /* caller frees username if necessary */
@@ -223,7 +242,7 @@ static int open_cred_file(char * file_name)
 				if(length > 4086) {
 					printf("mount.cifs failed due to malformed username in credentials file");
 					memset(line_buf,0,4096);
-					exit(1);
+					exit(EX_USAGE);
 				} else {
 					got_user = 1;
 					user_name = (char *)calloc(1 + length,1);
@@ -247,7 +266,7 @@ static int open_cred_file(char * file_name)
 				if(length > MOUNT_PASSWD_SIZE) {
 					printf("mount.cifs failed: password in credentials file too long\n");
 					memset(line_buf,0, 4096);
-					exit(1);
+					exit(EX_USAGE);
 				} else {
 					if(mountpassword == NULL) {
 						mountpassword = (char *)calloc(MOUNT_PASSWD_SIZE+1,1);
@@ -275,7 +294,7 @@ static int open_cred_file(char * file_name)
                                 }
                                 if(length > DOMAIN_SIZE) {
                                         printf("mount.cifs failed: domain in credentials file too long\n");
-                                        exit(1);
+                                        exit(EX_USAGE);
                                 } else {
                                         if(domain_name == NULL) {
                                                 domain_name = (char *)calloc(DOMAIN_SIZE+1,1);
@@ -308,7 +327,7 @@ static int get_password_from_file(int file_descript, char * filename)
 
 	if (mountpassword == NULL) {
 		printf("malloc failed\n");
-		exit(1);
+		exit(EX_SYSERR);
 	}
 
 	if(filename != NULL) {
@@ -316,7 +335,7 @@ static int get_password_from_file(int file_descript, char * filename)
 		if(file_descript < 0) {
 			printf("mount.cifs failed. %s attempting to open password file %s\n",
 				   strerror(errno),filename);
-			exit(1);
+			exit(EX_SYSERR);
 		}
 	}
 	/* else file already open and fd provided */
@@ -327,7 +346,7 @@ static int get_password_from_file(int file_descript, char * filename)
 			printf("mount.cifs failed. Error %s reading password file\n",strerror(errno));
 			if(filename != NULL)
 				close(file_descript);
-			exit(1);
+			exit(EX_SYSERR);
 		} else if(rc == 0) {
 			if(mountpassword[0] == 0) {
 				if(verboseflag)
@@ -549,7 +568,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 
 					if (!(pw = getpwnam(value))) {
 						printf("bad user name \"%s\"\n", value);
-						exit(1);
+						exit(EX_USAGE);
 					}
 					snprintf(user, sizeof(user), "%u", pw->pw_uid);
 				} else {
@@ -565,7 +584,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 
 					if (!(gr = getgrnam(value))) {
 						printf("bad group name \"%s\"\n", value);
-						exit(1);
+						exit(EX_USAGE);
 					}
 					snprintf(group, sizeof(group), "%u", gr->gr_gid);
 				} else {
@@ -660,7 +679,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 		out = (char *)realloc(out, out_len + word_len + 2);
 		if (out == NULL) {
 			perror("malloc");
-			exit(1);
+			exit(EX_SYSERR);
 		}
 
 		if (out_len) {
@@ -685,7 +704,7 @@ nocopy:
 		out = (char *)realloc(out, out_len + word_len + 6);
 		if (out == NULL) {
 			perror("malloc");
-			exit(1);
+			exit(EX_SYSERR);
 		}
 
 		if (out_len) {
@@ -701,7 +720,7 @@ nocopy:
 		out = (char *)realloc(out, out_len + 1 + word_len + 6);
 		if (out == NULL) {
 		perror("malloc");
-			exit(1);
+			exit(EX_SYSERR);
 		}
 
 		if (out_len) {
@@ -982,12 +1001,12 @@ static struct option longopts[] = {
 };
 
 /* convert a string to uppercase. return false if the string
- * wasn't ASCII or was a NULL ptr */
+ * wasn't ASCII. Return success on a NULL ptr */
 static int
 uppercase_string(char *string)
 {
 	if (!string)
-		return 0;
+		return 1;
 
 	while (*string) {
 		/* check for unicode */
@@ -1036,7 +1055,7 @@ int main(int argc, char ** argv)
 		thisprogram = argv[0];
 	} else {
 		mount_cifs_usage();
-		exit(1);
+		exit(EX_USAGE);
 	}
 
 	if(thisprogram == NULL)
@@ -1053,12 +1072,12 @@ int main(int argc, char ** argv)
 		share_name = strndup(argv[1], MAX_UNC_LEN);
 		if (share_name == NULL) {
 			fprintf(stderr, "%s: %s", argv[0], strerror(ENOMEM));
-			exit(1);
+			exit(EX_SYSERR);
 		}
 		mountpoint = argv[2];
 	} else {
 		mount_cifs_usage();
-		exit(1);
+		exit(EX_USAGE);
 	}
 
 	/* add sharename in opts string as unc= parm */
@@ -1080,7 +1099,7 @@ int main(int argc, char ** argv)
 		case '?':
 		case 'h':	 /* help */
 			mount_cifs_usage ();
-			exit(1);
+			exit(EX_USAGE);
 		case 'n':
 		    ++nomtab;
 		    break;
@@ -1134,14 +1153,14 @@ int main(int argc, char ** argv)
 				uid = strtoul(optarg, &ep, 10);
 				if (*ep) {
 					printf("bad uid value \"%s\"\n", optarg);
-					exit(1);
+					exit(EX_USAGE);
 				}
 			} else {
 				struct passwd *pw;
 
 				if (!(pw = getpwnam(optarg))) {
 					printf("bad user name \"%s\"\n", optarg);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list