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

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


The branch, v4-1-test has been updated
       via  d49d8b6 s3-passdb: Fix string duplication to pointers.
       via  bf88959 wbinfo: Fix a memory leak in wbinfo_ping_dc().
       via  07f1312 s3-libads: Fix memory leaks in ads_build_path().
       via  a498c8a lib: Fix strict-aliasing warning in md5 code.
       via  a91d000 shadow_copy2: add a comment explaining why we don't talloc_zero_array().
       via  cc773c5 shadow_copy2: revert expensive and unnecessary zero-initialization
       via  e8bc1ac docs: Fix typos in vfs_shadow_copy2.8.xml.
       via  4fe0bad docs: update the manpage of vfs_shadow_copy2
       via  33fb6c1 s3:modules:shadow_copy2: remove redundant documentation comment block
       via  572ca24 s3:modules:shadow_copy2: improve headline comment
       via  44db7d8 s3:module:shadow_copy2: add my (C)
       via  db8ea0a shadow_copy2: use stored mount_point instead of recalculating.
       via  5e9daae shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere mode
       via  c775897 shadow_copy2: fix shadow_copy2_convert() in the classical case.
       via  3672c20 shadow_copy2: add some blank lines for visual separation to shadow_copy2_convert()
       via  9f269c9 shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()
       via  285e1e4 shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical case
       via  790fcac shadow_copy2: add some debug to shadow_copy2_strip_snapshot()
       via  9607710 shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()
       via  9af2451 shadow_copy2: introduce shadow_copy2_snapshot_path()
       via  042b0aa shadow_copy2: factor shadow_copy2_posix_gmt_string() out of shadow_copy2_insert_string()
       via  15170c0 shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute mode
       via  b6a6eb5 shadow_copy2: make shadow_copy2_find_snapdir() return const char *
       via  f61106d shadow_copy2: in the classical case, use configured path in shadow_copy2_find_snapdir()
       via  47a0a04 shadow_copy2: implement disk_free
       via  cfa7632 shadow_copy2: log resulting config at the end of shadow_copy2_connect()
       via  1b1d020 shadow_copy2: add snapshot_basepath to the config.
       via  fa6b219 shadow_copy2: add rel_connectpath to config.
       via  9b376b7 shadow_copy2: introduce "shadow:mountpoint" option
       via  52c70fb shadow_copy2: re-add the basedir option.
       via  266a8de shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.
       via  e86972d shadow_copy2: introduce the bool "snapdir_absolute" in the config.
       via  5037f83 shadow_copy2: introduce config struct and function shadow_copy2_connect()
       via  0985cce shadow_copy2: add comment explaining the SMB level GMT format pattern
       via  cd96d92 shadow_copy2: add comment block explaining shadow_copy2_convert()
       via  b578f7c shadow_copy2: add comment block explaining shadow_copy2_insert_string()
       via  259b8de shadow_copy2: add comment block explaining shadow_copy2_find_snapdir()
       via  f8c613b shadow_copy2: add header comment explaining have_snapdir()
       via  09242f8 shadow_copy2: add comment header describing shadow_copy2_strip_snapshot()
       via  ee34996 shadow_copy2: break overly long lines in shadow_copy2_snapshot_to_gmt()
      from  9f00bda s3: winbindd: Move calling setup_domain_child() into add_trusted_domain().

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


- Log -----------------------------------------------------------------
commit d49d8b6dfc899c740930396ddd1964f0d9a8051c
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Jan 9 15:20:21 2014 +0100

    s3-passdb: Fix string duplication to pointers.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Günther Deschner <gd at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Jan  9 22:35:25 CET 2014 on sn-devel-104
    
    (cherry picked from commit bff3ac250e9d4e7d91820eb53c28257aa38fff88)
    
    The last 4 patches address bug #10367 - Fix several memory leaks.
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Mon Jan 13 12:09:26 CET 2014 on sn-devel-104

commit bf889595459658824478d5538518f5ca72e5f327
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Jan 9 15:12:24 2014 +0100

    wbinfo: Fix a memory leak in wbinfo_ping_dc().
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Günther Deschner <gd at samba.org>
    (cherry picked from commit 541164d47a86bab90ef96a9be40b8c0997abdd61)

commit 07f131274b706420f8b4a71029a94b9001e57323
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Jan 9 15:06:14 2014 +0100

    s3-libads: Fix memory leaks in ads_build_path().
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Günther Deschner <gd at samba.org>
    (cherry picked from commit c8371b4ec12f2dea6ce18724de59a23e04826c1d)

commit a498c8a8e793568aab9ad145a6aad5d41323d6df
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Jan 9 14:50:18 2014 +0100

    lib: Fix strict-aliasing warning in md5 code.
    
    If the compiler detects strict aliasing problems it isn't able to
    optimize the code.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Günther Deschner <gd at samba.org>
    (cherry picked from commit 615efa4ae84373ae8aefb36fcf7583338665429a)

commit a91d000e6c928c0053063d09bd5592b744d4115b
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.

commit cc773c5cb00f958337b58f7d2c1d3c8b37a264f7
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 e8bc1acee2168614f9b62dd44a6247ffe88125e9
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 4fe0bad189ced9d875c21a36a7138efab257f122
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 33fb6c1b2b7a519438f95a22ea90f3ded9456150
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 572ca245fce3964d8ea536b8d6fc6002097ada47
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 44db7d8cc50d5800259a452c93f6a3eb9dc18c16
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 db8ea0afe3c16b92fecc5f46fa9a0785d162270a
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 5e9daae74f15ef1836c2545cf7f624e2e0f22996
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 c77589766a8fc3342cef6803c81727074a9eb6ff
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 3672c20bd382534263566625dba94d3dae8deaaa
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 9f269c90f880e224c61fb46623a60a747c2cac5c
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 285e1e43ef8a26c8d638e721dd59893f71682465
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 790fcacbec92ef62b39abdd0b28209271c4892f3
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 9607710f9c49b1c4c726f8b9b6626c64cf6961a2
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 9af245143b338afad241f7608ffec60b6bae8beb
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 042b0aa22db9d478fdf8c7c2c630553c662e9411
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 15170c0eb11d4efb8ac28bcfe7c285500c996c2b
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 b6a6eb5de31f2fc756637d0fd62fbf7f452b0071
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 f61106d0b61a0a77468c41820551474595b2dfaa
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 47a0a0403cee565fa2674c8dd3b3c92617595f38
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 cfa763243eb1abc0a931d7a698db76cda020f9c1
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 1b1d020f93b7e03daea965e6e3bceedd76bbe5da
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 fa6b21905f95d7d692ddf93f2e070e6ac435995f
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 9b376b749a09ffaeccaa55d182e36e8ad1faa914
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 52c70fbfbca5ecc66a63eb93391e930e9f84ef10
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 266a8dec93ed0dc545b8f8f9151f40b74f0fba44
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 e86972d1490edf29578cdade0c9803a32dc6f821
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 5037f8351af7192483b641ff8d703c383cce226f
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 0985cce104b4e5121809cbb16590e71611f414f8
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 cd96d92d35e7c995c2e6ee2330272f4a5740dd13
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 b578f7c3eeae3871155f72377915ce31eb4ef37b
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 259b8de8d140af0463320b25a1d4b60075df7e7b
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 f8c613b4697109457c88f944876d599dcb31dd50
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 09242f834be806ad72d847cf02bffae5f35e57a7
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 ee34996ea3f3db05c7a9fde68c989cfe07af3dd3
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 ++++++++++--
 lib/crypto/md5.c                         |    9 +-
 nsswitch/wbinfo.c                        |    1 +
 source3/include/smb.h                    |   10 +-
 source3/libads/ads_struct.c              |    2 +
 source3/modules/vfs_shadow_copy2.c       |  723 ++++++++++++++++++++++++------
 source3/passdb/py_passdb.c               |   14 +-
 7 files changed, 860 insertions(+), 189 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/lib/crypto/md5.c b/lib/crypto/md5.c
index b834c91..352f80f 100644
--- a/lib/crypto/md5.c
+++ b/lib/crypto/md5.c
@@ -137,9 +137,12 @@ _PUBLIC_ void MD5Final(uint8_t digest[16], MD5_CTX *ctx)
     }
     byteReverse(ctx->in, 14);
 
-    /* Append length in bits and transform */
-    ((uint32_t *) ctx->in)[14] = ctx->bits[0];
-    ((uint32_t *) ctx->in)[15] = ctx->bits[1];
+    /* Append length in bits and transform.
+     * Use memcpy to avoid strict-aliasing problems.
+     * This way it can be optimized.
+     */
+    memcpy(&ctx->in[14 * sizeof(uint32_t)], &ctx->bits[0], sizeof(uint32_t));
+    memcpy(&ctx->in[15 * sizeof(uint32_t)], &ctx->bits[1], sizeof(uint32_t));
 
     MD5Transform(ctx->buf, (uint32_t *) ctx->in);
     byteReverse((uint8_t *) ctx->buf, 4);
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 3f0310a..0a5ec40 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -838,6 +838,7 @@ static bool wbinfo_ping_dc(void)
 		 dcname ? dcname : "",
 		 WBC_ERROR_IS_OK(wbc_status) ? "succeeded" : "failed");
 
+	wbcFreeMemory(dcname);
 	if (wbc_status == WBC_ERR_AUTH_ERROR) {
 		d_fprintf(stderr, "error code was %s (0x%x)\n",
 			  error->nt_string, error->nt_status);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index cfc12a7..e1ab344 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/libads/ads_struct.c b/source3/libads/ads_struct.c
index fd7e417..30d433e 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -55,12 +55,14 @@ char *ads_build_path(const char *realm, const char *sep, const char *field, int
 	if (strlcpy(ret,field, len) >= len) {
 		/* Truncate ! */
 		free(r);
+		free(ret);
 		return NULL;
 	}
 	p=strtok_r(r, sep, &saveptr);
 	if (p) {
 		if (strlcat(ret, p, len) >= len) {
 			free(r);
+			free(ret);
 			return NULL;
 		}
 
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index aa7e50f..fca05cf 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


-- 
Samba Shared Repository


More information about the samba-cvs mailing list