[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Mon Jan 13 04:14:06 MST 2014


The branch, v4-0-test has been updated
       via  0ce1612 shadow_copy2: add a comment explaining why we don't talloc_zero_array().
       via  d06f278 shadow_copy2: revert expensive and unnecessary zero-initialization
       via  4982328 docs: Fix typos in vfs_shadow_copy2.8.xml.
       via  6c445a9 docs: update the manpage of vfs_shadow_copy2
       via  cc04429 s3:modules:shadow_copy2: remove redundant documentation comment block
       via  aca395e s3:modules:shadow_copy2: improve headline comment
       via  c949684 s3:module:shadow_copy2: add my (C)
       via  4f0111f shadow_copy2: use stored mount_point instead of recalculating.
       via  497aff7 shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere mode
       via  a8378b0 shadow_copy2: fix shadow_copy2_convert() in the classical case.
       via  39e8999 shadow_copy2: add some blank lines for visual separation to shadow_copy2_convert()
       via  eb31ad9 shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()
       via  4693fb1 shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical case
       via  cbebc8f shadow_copy2: add some debug to shadow_copy2_strip_snapshot()
       via  151774e shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()
       via  9ca7ac7 shadow_copy2: introduce shadow_copy2_snapshot_path()
       via  bcbfdf9 shadow_copy2: factor shadow_copy2_posix_gmt_string() out of shadow_copy2_insert_string()
       via  b4d54ac shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute mode
       via  7c14f34 shadow_copy2: make shadow_copy2_find_snapdir() return const char *
       via  1ca532a shadow_copy2: in the classical case, use configured path in shadow_copy2_find_snapdir()
       via  8422130 shadow_copy2: implement disk_free
       via  c4b12f3 shadow_copy2: log resulting config at the end of shadow_copy2_connect()
       via  be89e66 shadow_copy2: add snapshot_basepath to the config.
       via  ce9a972 shadow_copy2: add rel_connectpath to config.
       via  36333db shadow_copy2: introduce "shadow:mountpoint" option
       via  799c1d5 shadow_copy2: re-add the basedir option.
       via  315f913 shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.
       via  47416db shadow_copy2: introduce the bool "snapdir_absolute" in the config.
       via  9e288fa shadow_copy2: introduce config struct and function shadow_copy2_connect()
       via  09aa316 shadow_copy2: add comment explaining the SMB level GMT format pattern
       via  df3ff47 shadow_copy2: add comment block explaining shadow_copy2_convert()
       via  9adcb5b shadow_copy2: add comment block explaining shadow_copy2_insert_string()
       via  f8fd361 shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()
       via  b338605 shadow_copy2: add header comment explaining have_snapdir()
       via  4135afc shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()
       via  6fe4ae3 shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()
      from  a70f5d3 s3: winbindd: Move calling setup_domain_child() into add_trusted_domain().

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


- Log -----------------------------------------------------------------
commit 0ce1612f02a9e348e234dcdb20858fb6db11c785
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 11 09:41:38 2013 +0100

    shadow_copy2: add a comment explaining why we don't talloc_zero_array().
    
    Since I stumbled over this slighly sublte point, I thought it is
    worthwile to point it our in a comment.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Wed Dec 11 19:55:20 CET 2013 on sn-devel-104
    
    (cherry picked from commit 27baff0ec96cded0446ecd7739e9d31aaeb90868)
    
    The last 36 patches address bug #10259 - shadow_copy2 module "Previous Version"
    not working in Windows 7.
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Mon Jan 13 12:13:18 CET 2014 on sn-devel-104

commit d06f278ce78e9ea6a48a31cbeb83c6b8c0a93f4a
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 11 09:34:47 2013 +0100

    shadow_copy2: revert expensive and unnecessary zero-initialization
    
    I was being overly cautious. This is initialization is not
    necessary, since further down in the for-loop, the memory
    always gets fully initialized because the insert string is
    inserted at various slash positions.
    
    So this talloc_zero_array can be skipped: this an expensive
    thing to do in virtually every VFS call.
    
    This essentially reverts commit 249e9b4a34d8959bd94735c1921ecfc24d6a2705.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 71318d7d685f8e1e112076f84ef2d788acb83547)

commit 4982328573b190aef0befdde9b0ddf0a85b3a080
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Dec 10 15:24:31 2013 +0100

    docs: Fix typos in vfs_shadow_copy2.8.xml.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Tue Dec 10 18:49:21 CET 2013 on sn-devel-104
    
    (cherry picked from commit c16afddeef2938e218df63b1c669caa5fb65d39c)

commit 6c445a93de0fa2fccb19820f3d30544a3940709b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 4 10:27:24 2013 +0100

    docs: update the manpage of vfs_shadow_copy2
    
    Document the configuration and all the options
    available for the shadow_copy2 module.
    
    Pair-Programmed-With: Björn Baumbach <bb at sernet.de>
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Dec  6 22:26:31 CET 2013 on sn-devel-104
    (cherry picked from commit f6ac6f20540f81257e1f180454b6a2c1239e85fa)

commit cc044294e125b9fe17d81dfd22d1f17016c58642
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 4 15:55:19 2013 +0100

    s3:modules:shadow_copy2: remove redundant documentation comment block
    
    and refer to the manual page instead
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6685e6512e03d9420439a730a40fcca3411a48db)

commit aca395e0c0860a6881941b8ffc9d3b338e812b7e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 4 15:50:26 2013 +0100

    s3:modules:shadow_copy2: improve headline comment
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit bffaf17d482cb1ad88698ea1a00aa7e4ddb0c0e7)

commit c949684d016d42d47c691d5db21763b15ee3edf5
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 4 13:40:14 2013 +0100

    s3:module:shadow_copy2: add my (C)
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit b5b5674287c935bf923cf570cf218ffb0ae7ce78)

commit 4f0111f0135d4ab361306fbd47d882b28dac0fc8
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 31 00:46:01 2013 +0200

    shadow_copy2: use stored mount_point instead of recalculating.
    
    In the case of snapdirseverywhere but NOT crossmountpoints.
    
    This spares stat calls.
    And is the only correct thing to do if the mount point was
    specified in the configuration.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6ccbc1347d3240fc3c874a1957b654456fb6234c)

commit 497aff745a75ce75989738bb8bf756b9ffa66ed6
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 31 00:45:16 2013 +0200

    shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere mode
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 935120dbc01890e313e2902b13141d4a13fe96d5)

commit a8378b0d58d149fa32847eb80d001d0d89c089a2
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 23 16:23:03 2013 +0200

    shadow_copy2: fix shadow_copy2_convert() in the classical case.
    
    I.e. the non-snapdirseverywhere case.
    This in particular fixes the case of a snapdir hierarchy
    that is parallel to the share or mountpoint and not subordinate.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 9ab89371c8eddad2f274736b508866e2a92b74a3)

commit 39e8999828b677f80c47cfc2bd6bd9cba9090338
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 15:06:22 2013 +0200

    shadow_copy2: add some blank lines for visual separation to shadow_copy2_convert()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 86988db1f0ebd170d2bc91b6ed78f8845bfd270c)

commit eb31ad9edd9fb1ed3c8424e3b6854fb671278276
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 28 16:59:25 2013 +0200

    shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 249e9b4a34d8959bd94735c1921ecfc24d6a2705)

commit 4693fb10bbeaf636c5eb98484ce30a13cf4cfb82
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 17:16:23 2013 +0200

    shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical case
    
    I.e., fix detection of already converted names.
    
    This is done by using the shadow_copy2_snapshot_path() function
    and comparing if the input string starts with that.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 4b8d9c65f45db426716763629f1e22b0eb859a99)

commit cbebc8f9454d46394d9d1ea1f1193dadb560f5f7
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 23:57:30 2013 +0200

    shadow_copy2: add some debug to shadow_copy2_strip_snapshot()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit afcb84e69f46671030710bdda1c8798235b9ace7)

commit 151774ed18f9e90b9d9720c1050ab1f924578f59
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 17:14:49 2013 +0200

    shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()
    
    This should make it more easy to understand what the cases are.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 3d053b1ab3e0b918509e06086a54834a9ae9cdb7)

commit 9ca7ac7734696d0a69d65312b5af4a16ba20a9c1
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 31 00:18:52 2013 +0200

    shadow_copy2: introduce shadow_copy2_snapshot_path()
    
    This builds the posix snapshot path for the connection
    at the provided timestamp. For the non-snapdirseverywhere case.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 38e108563d7e9e14203bf4dabfda09bd1408e980)

commit bcbfdf9e6841cb6b6689c5ad7e06cbaec95c3068
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 30 23:51:02 2013 +0200

    shadow_copy2: factor shadow_copy2_posix_gmt_string() out of shadow_copy2_insert_string()
    
    for re-use..
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 4cc5140bbe207f08d9b4fb0d119e74cc839e55dd)

commit b4d54acea22372800643fcf02e410190026a4cdb
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 17:12:21 2013 +0200

    shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute mode
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 304a0f531caa5f33f205739470f17e983d25a6b5)

commit 7c14f3479dc824768ace8a470a1fd147bfc8b914
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 28 17:01:20 2013 +0200

    shadow_copy2: make shadow_copy2_find_snapdir() return const char *
    
    instead of char *. This eliminates compiler warnings.
    snapdir is a const string in all occasions.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit e86923eb52633c5b6133c45678355ce69bb43a54)

commit 1ca532a4972599778acea857c0af44c9da10fd63
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 23 16:21:46 2013 +0200

    shadow_copy2: in the classical case, use configured path in shadow_copy2_find_snapdir()
    
    There is no point in searching for snapdir if not in snapdirseverywhere mode.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit dbdb436a80e2fb75d9fd8ae17192702123c3b530)

commit 8422130ddbd0c7ed3b926bdfbba5da1b7f2b7536
Author: Michael Adam <obnox at samba.org>
Date:   Sat Jun 1 02:14:41 2013 +0200

    shadow_copy2: implement disk_free
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit ea898ea1ac1cc9364c5b7396db3902aeb114cfb8)

commit c4b12f3ed3a7b45610abf002fa885fd1af39735c
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 31 17:17:27 2013 +0200

    shadow_copy2: log resulting config at the end of shadow_copy2_connect()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit c4f9954ebb04da94a5bcd2cb328fb2fbaf9fa062)

commit be89e66ded4a96279b7c2031bd909683159bc42f
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 4 00:07:15 2013 +0200

    shadow_copy2: add snapshot_basepath to the config.
    
    This is the absolute version of snapdir.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit a7ca55c8da6fbe6452a7a0bfc3c84b5941b8aa27)

commit ce9a972880ed3dc30ae9f8cedf6404f2ea5d589c
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 4 00:04:06 2013 +0200

    shadow_copy2: add rel_connectpath to config.
    
    This is the share root, relative to the basedir.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d34dc1b0025d18afc9ce638c7000b702f98b5d03)

commit 36333db69a1646e0dfd59924ebb0697a8affe561
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 31 16:36:33 2013 +0200

    shadow_copy2: introduce "shadow:mountpoint" option
    
    Possiblity to explicitly set the share's mount point.
    This is useful mainly for debugging and testing purposes.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 2d5a3af4bc44d13877a26fa1857b3ceafe138de8)

commit 799c1d520918d410ddd780f2e95e5ed24664b288
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 30 17:26:44 2013 +0200

    shadow_copy2: re-add the basedir option.
    
    Disable basedir if it is not an absolute path or if
    snapdirseverywhere or crossmountpoints is enabled.
    
    Pair-Programmed-With: Björn Baumbach <bb at sernet.de>
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Signed-off-by: Björn Baumbach <bb at sernet.de>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit ed751b9ee49d8e4a319759640321e8b49be4f154)

commit 315f913524e0a43b91888664ff54d5c4137d4749
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 30 13:19:50 2013 +0200

    shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 1e887fcda097b93a879df726f2b7c2c8d3c4cf54)

commit 47416db1b340cb51b42ab70d56cf0ce3a518cd57
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 17:10:51 2013 +0200

    shadow_copy2: introduce the bool "snapdir_absolute" in the config.
    
    Not exposed but to be used internally.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 843954989cbec6640d2565d0d23a48f296740a23)

commit 9e288fa215f11abf37daf61dbce59ab890ac0de7
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 24 01:35:44 2013 +0200

    shadow_copy2: introduce config struct and function shadow_copy2_connect()
    
    This moves the parsing of the config to a central place.
    So users of configuation don't need to call lp_parm_... all the time.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 1ecef5743583cf617f5506bc2fca3baa70cfb9b3)

commit 09aa316cc1e0dc985e7fdcdda40e9d761ab8d24e
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 17:11:44 2013 +0200

    shadow_copy2: add comment explaining the SMB level GMT format pattern
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6da7375cd881f85f2873578db7fcfb368deab94f)

commit df3ff47ce6b37a357bc1dca068bc81eca1539170
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 29 01:13:57 2013 +0200

    shadow_copy2: add comment block explaining shadow_copy2_convert()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5c900fd930edd45e9f23b36c1e68e5c2d8b96867)

commit 9adcb5b81b5ffd2ecaa63b6dd87734be60e72efc
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 24 17:20:42 2013 +0200

    shadow_copy2: add comment block explaining shadow_copy2_insert_string()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5da5512985cf65c09abb33abaf5e8dc28167dac3)

commit f8fd361bbfa69deb3fef3e890906a7092cfebe53
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 24 00:01:14 2013 +0200

    shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit b90d1e6ac06fd4c1aaaceadcb711800499334117)

commit b338605277d4b51a56dfeb24c2325ab0e53655bd
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 23 23:59:49 2013 +0200

    shadow_copy2: add header comment explaining have_snapdir()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5b494b3dea559f632d57c9d33172e46e459e852f)

commit 4135afc371cb0b37396dccac18464cce5a71167d
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 23 23:32:15 2013 +0200

    shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 9361824ddd291cb0e543a5a0829246831fcb9e84)

commit 6fe4ae32a53da3583f0b6282a5b492dfddc75f47
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 4 13:15:34 2013 +0200

    shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()
    
    According to coding guidelines.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 01cb88977da5bc44443407b100345531d047c77c)

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

Summary of changes:
 docs-xml/manpages/vfs_shadow_copy2.8.xml |  290 ++++++++++--
 source3/include/smb.h                    |   10 +-
 source3/modules/vfs_shadow_copy2.c       |  723 ++++++++++++++++++++++++------
 3 files changed, 839 insertions(+), 184 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_shadow_copy2.8.xml b/docs-xml/manpages/vfs_shadow_copy2.8.xml
index b313416..1cb9aba 100644
--- a/docs-xml/manpages/vfs_shadow_copy2.8.xml
+++ b/docs-xml/manpages/vfs_shadow_copy2.8.xml
@@ -13,7 +13,8 @@
 
 <refnamediv>
 	<refname>vfs_shadow_copy2</refname>
-	<refpurpose>Expose snapshots to Windows clients as shadow copies.</refpurpose>
+	<refpurpose>Expose snapshots to Windows clients as shadow copies.
+	</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
@@ -29,21 +30,57 @@
 	<citerefentry><refentrytitle>samba</refentrytitle>
 	<manvolnum>7</manvolnum></citerefentry> suite.</para>
 
-	<para>The <command>vfs_shadow_copy2</command> VFS module functionality
-	that is similar to Microsoft Shadow Copy services. When setup properly,
+	<para>
+	The <command>vfs_shadow_copy2</command> VFS module offers a
+	functionality similar to Microsoft Shadow Copy services.
+	When set up properly,
 	this module allows Microsoft Shadow Copy clients to browse
-	"shadow copies" on Samba shares.
+	through file system snapshots as "shadow copies" on Samba shares.
 	</para>
 
-	<para>This is a 2nd implementation of a shadow copy module. This
-	version has the following features:</para>
+	<para>
+	This is a second implementation of a shadow copy module
+	which has the following additional features (compared to the original
+	<citerefentry><refentrytitle>shadow_copy</refentrytitle>
+	<manvolnum>8</manvolnum></citerefentry> module):
+	</para>
 	<orderedlist continuation="restarts" inheritnum="ignore" numeration="arabic">
-        <listitem><para>You don't need to populate your shares with symlinks to the
-	snapshots. This can be very important when you have thousands of
-	shares, or use [homes].</para></listitem>
-	<listitem><para>The inode number of the files is altered so it is different
-	from the original. This allows the 'restore' button to work
-	without a sharing violation.</para></listitem>
+	<listitem><para>
+	There is no need any more to populate your share's root directory
+	with symlinks to the snapshots if the file system stores the
+	snapshots elsewhere.
+	Instead, you can flexibly configure the module where to look for
+	the file system snapshots.
+	This can be very important when you have thousands of
+	shares, or use [homes].
+	</para></listitem>
+	<listitem><para>
+	Snapshot directories need not be in one fixed central place but
+	can be located anywhere in the directory tree. This mode helps to
+	support file systems that offer snapshotting of particular
+	subtrees, for example the GPFS independent file sets.
+	</para></listitem>
+	<listitem><para>
+	Vanity naming for snapshots: snapshots can be named in any format
+	compatible with str[fp]time conversions.
+	</para></listitem>
+	<listitem><para>
+	Timestamps can be represented in localtime rather than UTC.
+	</para></listitem>
+	<listitem><para>
+	The inode number of the files can optionally be altered to be
+	different from the original. This fixes the 'restore' button
+	in the Windows GUI to work without a sharing violation when
+	serving from file systems, like GPFS, that return the same
+	device and inode number for the snapshot file and the original.
+	</para></listitem>
+	<listitem><para>
+	Shadow copy results are by default sorted before being sent to the
+	client. This is beneficial for filesystems that don't read
+	directories alphabetically (the default unix). Sort ordering can be
+	configured and sorting can be turned off completely if the file
+	system sorts its directory listing.
+	</para></listitem>
 	</orderedlist>
 
 	<para>This module is stackable.</para>
@@ -58,25 +95,32 @@
 	support for this.
 	</para>
 
-	<para>Filesystem snapshots must be mounted on
+	<para>Filesystem snapshots must be available under
 	specially named directories in order to be recognized by
-	<command>vfs_shadow_copy2</command>. The snapshot mount points must
-	be immediate children of a the directory being shared.</para>
-
-	<para>The snapshot naming convention is @GMT-YYYY.MM.DD-hh.mm.ss,
-	where:
+	<command>vfs_shadow_copy2</command>. These snapshot directory
+	is typically a direct subdirectory of the share root's mountpoint
+	but there are other modes that can be configured with the
+	parameters described in detail below.</para>
+
+	<para>The snapshot at a given point in time is expected in a
+	subdirectory of the snapshot directory where the snapshot's
+	directory is expected to be a formatted version of the
+	snapshot time. The default format which can be changed
+	with the <command>shadow:format</command> option
+	is @GMT-YYYY.MM.DD-hh.mm.ss, where:
 	<itemizedlist>
-		<listitem><para><command>YYYY</command> is the 4 digit year</para></listitem>
-		<listitem><para><command>MM</command> is the 2 digit month</para></listitem>
-		<listitem><para><command>DD</command> is the 2 digit day</para></listitem>
-		<listitem><para><command>hh</command> is the 2 digit hour</para></listitem>
-		<listitem><para><command>mm</command> is the 2 digit minute</para></listitem>
-		<listitem><para><command>ss</command> is the 2 digit second.</para></listitem>
-		</itemizedlist>
+	<listitem><para><command>YYYY</command> is the 4 digit year</para></listitem>
+	<listitem><para><command>MM</command> is the 2 digit month</para></listitem>
+	<listitem><para><command>DD</command> is the 2 digit day</para></listitem>
+	<listitem><para><command>hh</command> is the 2 digit hour</para></listitem>
+	<listitem><para><command>mm</command> is the 2 digit minute</para></listitem>
+	<listitem><para><command>ss</command> is the 2 digit second.</para></listitem>
+	</itemizedlist>
 	</para>
 
-	<para>The <command>vfs_shadow_copy2</command> snapshot naming convention can be
-	produced with the following <citerefentry><refentrytitle>date</refentrytitle>
+	<para>The <command>vfs_shadow_copy2</command> snapshot naming
+	convention can be produced with the following
+	<citerefentry><refentrytitle>date</refentrytitle>
 	<manvolnum>1</manvolnum></citerefentry> command:
 	<programlisting>
 	TZ=GMT date + at GMT-%Y.%m.%d-%H.%M.%S
@@ -89,11 +133,47 @@
 
         <variablelist>
 		<varlistentry>
+                <term>shadow:mountpoint = MOUNTPOINT
+                </term>
+                <listitem>
+		<para>
+		With this parameter, one can specify the mount point
+		of the filesystem that contains the share path.
+		Usually this mount point is automatically detected.
+		But for some constellations, in particular tests,
+		it can be convenient to be able to specify it.
+		</para>
+		<para>Example: shadow:mountpoint = /path/to/filesystem</para>
+		<para>Default: shadow:mountpoint = NOT SPECIFIED</para>
+                </listitem>
+                </varlistentry>
+
+		<varlistentry>
                 <term>shadow:snapdir = SNAPDIR
                 </term>
                 <listitem>
-                <para>Path to the directory where snapshots are kept.
-                </para>
+		<para>
+		Path to the directory where the file system of
+		the share keeps its snapshots.
+		If an absolute path is specified, it is used as-is.
+		If a relative path is specified, then it is taken
+		relative to the mount point of the filesystem of
+		the share root. (See <command>shadow:mountpoint</command>.)
+		</para>
+		<para>
+		Note that <command>shadow:snapdirseverywhere</command>
+		depends on this parameter and needs a relative path.
+		Setting an absolute path disables
+		<command>shadow:snapdirseverywhere</command>.
+		</para>
+		<para>
+		Note that the <command>shadow:crossmountpoints</command>
+		option also requires a relative snapdir.
+		Setting an absolute path disables
+		<command>shadow:crossmountpoints</command>.
+		</para>
+		<para>Example: shadow:snapdir = /some/absolute/path</para>
+		<para>Default: shadow:snapdir = .snapshots</para>
                 </listitem>
                 </varlistentry>
 
@@ -101,21 +181,65 @@
                 <term>shadow:basedir = BASEDIR
 		</term>
                 <listitem>
-                <para>Path to the base directory that snapshots are from.
-                </para>
+		<para>
+		The basedir option allows to specify a directory
+		between the share's mount point and the share root,
+		relative to which the file system's snapshots are taken.
+		</para>
+		<para>
+		For example, if
+		<itemizedlist>
+		<listitem><para>
+		<command>basedir = mountpoint/rel_basedir</command>
+		</para></listitem>
+		<listitem><para>
+		<command>share_root = basedir/rel_share_root</command>
+		</para></listitem>
+		<listitem><para>
+		<command>snapshot_path = mountpoint/snapdir</command>
+		</para>
+		<para>
+		or
+		<command>snapshot_path = snapdir</command>
+		if snapdir is absolute
+		</para></listitem>
+		</itemizedlist>
+		then the snapshot of a
+		<command>file = mountpoint/rel_basedir/rel_share_root/rel_file</command>
+		at a time TIME will be found under
+		<command>snapshot_path/FS_GMT_TOKEN(TIME)/rel_share_root/rel_file</command>,
+		where FS_GMT_TOKEN(TIME) is the timestamp string belonging
+		to TIME in the format required by the file system.
+		(See <command>shadow:format</command>.)
+		</para>
+		<para>The default for the basedir is the mount point
+		of the file system of the share root
+		(see <command>shadow:mountpoint</command>).
+		</para>
+		<para>
+		Note that the <command>shadow:snapdirseverywhere</command>
+		and  <command>shadow:crossmountpoints</command>
+		options are incompatible with <command>shadow:basedir</command>
+		and disable the basedir setting.
+		</para>
                 </listitem>
                 </varlistentry>
 
 		<varlistentry>
-                <term>shadow:sort = asc/desc, or not specified for unsorted (default)
+                <term>shadow:sort = asc/desc
                 </term>
                 <listitem>
-                <para>By this parameter one can specify that the shadow
-		copy directories should be sorted before they are sent to the
-		client.  This can be beneficial as unix filesystems are usually
-		not listed alphabetically sorted. If enabled, you typically
-		want to specify descending order.
-                </para>
+		<para>By default, this module sorts the shadow copy data
+		alphabetically before sending it to the client.
+		With this parameter, one can specify the sort order.
+		Possible known values are desc (descending, the default)
+		and asc (ascending). If the file system lists directories
+		alphabetically sorted, one can turn off sorting in this
+		module by specifying any other value.
+		</para>
+		<para>Example: shadow:sort = asc</para>
+		<para>Example: shadow:sort = none</para>
+		<para>Default: shadow:sort = desc</para>
                 </listitem>
                 </varlistentry>
 
@@ -124,9 +248,10 @@
                 </term>
                 <listitem>
                 <para>This is an optional parameter that indicates whether the
-		snapshot names are in UTC/GMT or in local time. By default
-		UTC is expected.
+		snapshot names are in UTC/GMT or in local time. If it is
+		disabled then UTC/GMT is expected.
                 </para>
+		<para>shadow:localtime = no</para>
                 </listitem>
                 </varlistentry>
 
@@ -135,14 +260,28 @@
                 </term>
                 <listitem>
                 <para>This is an optional parameter that specifies the format
-		specification for the naming of snapshots.  The format must
-		be compatible with the conversion specifications recognized
-		by str[fp]time.  The default value is "@GMT-%Y.%m.%d-%H.%M.%S".
+		specification for the naming of snapshots in the file system.
+		The format must be compatible with the conversion
+		specifications recognized by str[fp]time.
                 </para>
+		<para>Default: shadow:format = "@GMT-%Y.%m.%d-%H.%M.%S"</para>
                 </listitem>
                 </varlistentry>
 
 		<varlistentry>
+		<term>shadow:sscanf = yes/no</term>
+		<listitem>
+		<para>
+		This paramter can be used to specify that the time in
+		format string is given as an unsigned long integer (%lu)
+		rather than a time strptime() can parse.
+		The result must be a unix time_t time.
+		</para>
+		<para>Default: shadow:sscanf = no</para>
+		</listitem>
+		</varlistentry>
+
+		<varlistentry>
                 <term>shadow:fixinodes = yes/no
                 </term>
                 <listitem>
@@ -155,23 +294,78 @@
 		this option then the 'restore' button in the shadow copy UI
 		will fail with a sharing violation.
                 </para>
+		<para>Default: shadow:fixinodes = no</para>
                 </listitem>
                 </varlistentry>
+
 		<varlistentry>
 		<term>shadow:snapdirseverywhere = yes/no
 		</term>
 		<listitem>
-		<para>If you enable <command moreinfo="none">
-		shadow:snapdirseverywhere </command> then this module will look
-		out for snapshot directories in the current and all parent
-		directories of the current working directory.
+		<para>
+		If you enable
+		<command moreinfo="none">shadow:snapdirseverywhere </command>
+		then this module will look
+		out for snapshot directories in the current working directory
+		and all parent directories, stopping at the mount point
+		by default.
+		But see <command>shadow:crossmountpoints</command> how to change
+		that behaviour.
+		</para>
+		<para>
 		An example where this is needed are independent filesets in
 		IBM's GPFS, but other filesystems might support snapshotting
 		only particular subtrees of the filesystem as well.
 		</para>
+		<para>
+		Note that <command>shadow:snapdirseverywhere</command>
+		depends on <command>shadow:snapdir</command> and needs it to be
+		a relative path. Setting an absolute snapdir path disables
+		<command>shadow:snapdirseverywhere</command>.
+		</para>
+		<para>
+		Note that this option is incompatible with the
+		<command>shadow:basedir</command> option and removes the
+		<command>shadow:basedir</command> setting by itself.
+		</para>
+		<para>Example: shadow:snapdirseverywhere = yes</para>
+		<para>Default: shadow:snapdirseverywhere = no</para>
 		</listitem>
 		</varlistentry>
 
+		<varlistentry>
+                <term>shadow:crossmountpoints = yes/no
+                </term>
+                <listitem>
+		<para>
+		This option is effective in the case of
+		<command>shadow:snapdirseverywhere = yes</command>.
+		Setting this option makes the module not stop at the
+		first mount point encountered when looking for snapdirs,
+		but lets it search potentially all through the path
+		instead.
+                </para>
+		<para>
+		An example where this is needed are independent filesets in
+		IBM's GPFS, but other filesystems might support snapshotting
+		only particular subtrees of the filesystem as well.
+		</para>
+		<para>
+		Note that <command>shadow:snapdirseverywhere</command>
+		depends on <command>shadow:snapdir</command> and needs it to be
+		a relative path. Setting an absolute snapdir path disables
+		<command>shadow:snapdirseverywhere</command>.
+		</para>
+		<para>
+		Note that this option is incompatible with the
+		<command>shadow:basedir</command> option and removes the
+		<command>shadow:basedir</command> setting by itself.
+		</para>
+		<para>Example: shadow:crossmountpoints = yes</para>
+		<para>Default: shadow:crossmountpoints = no</para>
+                </listitem>
+                </varlistentry>
+
 		</variablelist>
 </refsect1>
 
@@ -209,7 +403,7 @@
 <refsect1>
 	<title>VERSION</title>
 
-	<para>This man page is correct for version 3.2.7 of the Samba suite.
+	<para>This man page is correct for version 4.0 of the Samba suite.
 	</para>
 </refsect1>
 
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 568ba54..0057b44 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -567,7 +567,15 @@ Offset  Data			length.
 #define NOTIFY_ACTION_REMOVED_STREAM 7
 #define NOTIFY_ACTION_MODIFIED_STREAM 8
 
-/* timestamp format used in "previous versions" */
+/*
+ * Timestamp format used in "previous versions":
+ * The is the windows-level format of the @GMT- token.
+ * It is a fixed format not to be confused with the
+ * format for the POSIX-Level token of the shadow_copy2
+ * VFS module that can be configured via the "shadow:format"
+ * configuration option but defaults to the same format.
+ * See the shadow_copy2 module.
+ */
 #define GMT_NAME_LEN 24 /* length of a @GMT- name */
 #define GMT_FORMAT "@GMT-%Y.%m.%d-%H.%M.%S"
 
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index e96eb02..8964c22 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1,10 +1,11 @@
 /*
- * Third attempt at a shadow copy module
+ * shadow_copy2: a shadow copy module (second implementation)
  *
  * Copyright (C) Andrew Tridgell   2007 (portions taken from shadow_copy2)
  * Copyright (C) Ed Plese          2009
  * Copyright (C) Volker Lendecke   2011
  * Copyright (C) Christian Ambach  2011
+ * Copyright (C) Michael Adam      2013
  *
  * 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
@@ -22,83 +23,10 @@
  */
 
 /*
-
-  This is a 3rd implemetation of a shadow copy module for exposing
-  snapshots to windows clients as shadow copies. This version has the
-  following features:
-
-     1) you don't need to populate your shares with symlinks to the
-     snapshots. This can be very important when you have thousands of
-     shares, or use [homes]
-
-     2) the inode number of the files is altered so it is different
-     from the original. This allows the 'restore' button to work
-     without a sharing violation
-
-     3) shadow copy results can be sorted before being sent to the
-     client.  This is beneficial for filesystems that don't read
-     directories alphabetically (the default unix).
-
-     4) vanity naming for snapshots. Snapshots can be named in any
-     format compatible with str[fp]time conversions.
-
-     5) time stamps in snapshot names can be represented in localtime
-     rather than UTC.
-
-  Module options:
-
-      shadow:snapdir = <directory where snapshots are kept>
-
-      This is the directory containing the @GMT-* snapshot directories. If it is an absolute
-      path it is used as-is. If it is a relative path, then it is taken relative to the mount
-      point of the filesystem that the root of this share is on
-
-      shadow:basedir = <base directory that snapshots are from>
-
-      This is an optional parameter that specifies the directory that
-      the snapshots are relative to. It defaults to the filesystem
-      mount point
-
-      shadow:fixinodes = yes/no
-
-      If you enable shadow:fixinodes then this module will modify the
-      apparent inode number of files in the snapshot directories using
-      a hash of the files path. This is needed for snapshot systems
-      where the snapshots have the same device:inode number as the
-      original files (such as happens with GPFS snapshots). If you
-      don't set this option then the 'restore' button in the shadow
-      copy UI will fail with a sharing violation.
-
-      shadow:sort = asc/desc, or not specified for unsorted (default)
-
-      This is an optional parameter that specifies that the shadow
-      copy directories should be sorted before sending them to the
-      client.  This can be beneficial as unix filesystems are usually
-      not listed alphabetically sorted.  If enabled, you typically
-      want to specify descending order.
-
-      shadow:format = <format specification for snapshot names>
-
-      This is an optional parameter that specifies the format
-      specification for the naming of snapshots.  The format must
-      be compatible with the conversion specifications recognized
-      by str[fp]time.  The default value is "@GMT-%Y.%m.%d-%H.%M.%S".
-
-      shadow:sscanf = yes/no (default is no)
-
-      The time is the unsigned long integer (%lu) in the format string


-- 
Samba Shared Repository


More information about the samba-cvs mailing list