[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Mar 31 13:18:05 MDT 2015


The branch, master has been updated
       via  cd4442c s3-passdb: Fix 'force user' with winbind default domain
       via  5c166d5 selftest: run the FSRVP test suite against s3fs
       via  2e9ea9f selftest: add snapshot share configuration
       via  7a96325 doc: add vfs_shell_snap manpage
       via  9d29f7e vfs: add vfs_shell_snap module
       via  5056c5a doc: explain vfs_btrfs remote snapshot configuration
       via  f64c2fe doc: explain vfs_snapper remote snapshot configuration
       via  9af9b43 doc: "prune stale" and "sequence timeout" fssd parameters
       via  7a38f14 fsrvp: prune shadow copies if associated path doesn't exist
       via  b6e0340 fsrvp: add remote snapshot RPC server
       via  9f7dd07 vfs_snapper: create/delete snapshot support
       via  9b5b46a vfs_btrfs: add snapshot create/delete calls
       via  9f95038 replace: check for dirname() and basename()
       via  67ee428 vfs: add snapshot create/delete hooks
       via  13fa1b8 torture: add local FSRVP server state tests
       via  9c8ae44 fsrvp: add server state storage back-end
       via  b773136 librpc: add FSRVP server state idl
      from  bdf0a81 waf: Remove 'linkflags.remove(x)' line added in error.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cd4442c7ac93e165862c9195a7c345472646aa59
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Mar 31 18:15:51 2015 +0200

    s3-passdb: Fix 'force user' with winbind default domain
    
    If we set 'winbind use default domain' and specify 'force user = user'
    without a domain name we fail to log in. In this case we need to try a
    lookup with the domain name.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11185
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Mar 31 21:17:23 CEST 2015 on sn-devel-104

commit 5c166d5cdbc21b4e40f6a8f88f5d190763234f17
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 15 00:45:17 2013 +0200

    selftest: run the FSRVP test suite against s3fs
    
    With FSRVP server support now present along with suitable mock-up test
    infrastructure, run the FSRVP test suite against s3fs.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2e9ea9f195d2050d17d3c5748a26c6ca0f6e3ff0
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 15 00:42:35 2013 +0200

    selftest: add snapshot share configuration
    
    Define a share that uses both vfs_shell_snap and fake_snap.pl to create,
    delete and expose fake snapshots in response to FSRVP requests.
    Additionally test snapshot enumeration and access via the shadow_copy2
    module.
    
    Allow for simple testing of FSRVP message sequence timeouts, by
    specifying an artificially small interval.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7a96325baa80df515e110c5e110c2cde53a26ede
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Jul 7 14:16:13 2014 +0200

    doc: add vfs_shell_snap manpage
    
    Document usage of the shell_snap VFS module, explaining when and how
    each of the shell script commands are called.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9d29f7ea1794380bb1a381570298f52cb4d53041
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Jan 30 14:42:46 2013 +0100

    vfs: add vfs_shell_snap module
    
    The shell_snap VFS module plumbs into the snapshot (aka shadow-copy)
    management paths used by Samba's File Server Remote VSS Protocol (FSRVP)
    server.
    The following shell callouts may be configured in smb.conf:
    
    shell_snap: check path command
    	- Called when an FSRVP client wishes to check whether a given
    	  share supports snapshot create/delete requests.
    	- The command is called with a single <share path> argument.
    	- The command must return 0 if <share path> is capable of being
    	  snapshotted.
    
    shell_snap: create command
    	- Called when an FSRVP client wishes to create a snapshot.
    	- The command is called with a single <share path> argument.
    	- The command must return 0 status if the snapshot was
    	  successfully taken.
    	- The command must output the path of the newly created snapshot
    	  to stdout.
    
    shell_snap: delete command
    	- Called when an FSRVP client wishes to delete a snapshot.
    	- The command is called with <base share path> and
    	  <snapshot share path> arguments.
    	- The command must return 0 status if the snapshot was
    	  successfully removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5056c5a72720c9b004a2ed22dbeb5b52db56f3e5
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Sep 14 20:55:40 2012 +0200

    doc: explain vfs_btrfs remote snapshot configuration
    
    This extends the vfs_btrfs man page to also cover FSRVP remote snapshot
    behaviour and configuration.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f64c2fe68a1f0f93bd11412b2001daf0958b5ea0
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Feb 14 01:18:41 2014 +0100

    doc: explain vfs_snapper remote snapshot configuration
    
    This extends the vfs_snapper man page to also cover FSRVP remote
    snapshot behaviour and configuration.
    The permissions section is also extended to describe specific Samba and
    Snapper requirements for remote snapshot creation and deletion using
    DiskShadow.exe.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9af9b436ed3bc3e74ca7ddf437d16c26a8d540b8
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Nov 26 13:01:00 2014 +0100

    doc: "prune stale" and "sequence timeout" fssd parameters
    
    This change adds smb.conf documentation for the "fss: prune stale" and
    "fss: sequence timeout" parameters accepted by Samba's FSRVP server.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7a38f148acbaa5d1d773e5609492e4ade1f456aa
Author: Noel Power <noel.power at suse.com>
Date:   Thu Nov 13 11:13:35 2014 +0000

    fsrvp: prune shadow copies if associated path doesn't exist
    
    This patch implements some simple FSRVP server housekeeping. On startup
    the server scans the cached entries, any entries where the underlying
    system paths associated with shadow copies no longer exist are removed
    from the cache and from the registry.
    
    This behaviour is disabled by default, but can be enabled via the new
    "fss: prune stale" smb.conf parameter.
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b6e034069f2a61d622c9fcacd30ff63e2fb59f92
Author: David Disseldorp <ddiss at samba.org>
Date:   Tue Apr 10 14:32:41 2012 +0200

    fsrvp: add remote snapshot RPC server
    
    The Samba fss_agent RPC server is an implementation of the File Server
    Remote VSS (Volume Shadow Copy Service) Protocol, or FSRVP for short.
    
    FSRVP is new with Windows Server 2012, and allows authenticated clients
    to remotely request the creation, exposure and deletion of share
    snapshots.
    
    The fss_agent RPC server processes requests on the FssAgentRpc named
    pipe, and dispatches relevant snapshot creation and deletion requests
    through to the VFS.
    The registry smb.conf back-end is used to expose snapshot shares, with
    configuration parameters and share ACLs cloned from the base share.
    
    There are three FSRVP client implementations that I'm aware of:
    - Samba rpcclient includes fss_X commands.
    - Windows Server 2012 includes diskshadow.exe.
    - System Center 2012.
    
    FSRVP operations are only processed for users with:
    - Built-in Administrators group membership, or
    - Built-in Backup Operators group membership, or
    - Backup Operator privileges, or
    - Security token matches the initial process UID
    
    MS-FSRVP specifies that server state should be stored persistently
    during operation and retrieved on startup. Use the existing fss_srv.tdb
    FSRVP state storage back-end to satisfy this requirement.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9f7dd07d2658ac50ea3a1db8c4541ec3f87b8d6b
Author: David Disseldorp <ddiss at samba.org>
Date:   Sun Oct 14 19:54:24 2012 +0200

    vfs_snapper: create/delete snapshot support
    
    Extend vfs_snapper to support the new remote snapshot creation and
    deletion hooks added for FSRVP.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9b5b46a0921aa86f6b7da77e5735b7386e67af05
Author: David Disseldorp <ddiss at samba.org>
Date:   Tue Sep 4 15:29:58 2012 +0200

    vfs_btrfs: add snapshot create/delete calls
    
    The "btrfs: manipulate snapshots" smb.conf parameter is disabled by
    default, to encourage use of, and pass requests through to, the
    vfs_snapper module.
    When enabled, issue BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SNAP_DESTROY
    ioctls accordingly. The ioctls are issued as root, so rely on permission
    checks in the calling FSRVP server process.
    
    Base share paths must exist as btrfs subvolumes in order to
    be supported for snapshot operations.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9f95038f9b18084c91c0e12d48629f8c575e73ec
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Mar 23 19:37:05 2015 +0100

    replace: check for dirname() and basename()
    
    These functions are provided by libgen.h, and conform to POSIX.1-2001.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 67ee428467e1f49bf8d0b819280329554ef5aee6
Author: David Disseldorp <ddiss at samba.org>
Date:   Tue Apr 10 03:16:57 2012 +0200

    vfs: add snapshot create/delete hooks
    
    This change adds three new VFS hooks covering snapshot manipulation:
    - snap_check_path
      Check whether a path supports snapshots.
    - snap_create
      Request the creation of a snapshot of the provided path.
    - snap_delete
      Request the deletion of a snapshot.
    
    These VFS call-outs will be used in future by Samba's File Server Remote
    VSS Protocol (FSRVP) server.
    
    MS-FSVRP states:
      At any given time, Windows servers allow only one shadow copy set to
      be going through the creation process.
    Therefore, only provide synchronous hooks for now, which can be
    converted to asynchronous _send/_recv functions when the corresponding
    DCE/RPC server infrastructure is in place.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 13fa1b8776d2280ba3d4dfc35e7134cd0aaee70f
Author: David Disseldorp <ddiss at samba.org>
Date:   Tue Sep 11 11:59:45 2012 +0200

    torture: add local FSRVP server state tests
    
    Test the storage and retrieval of FSRVP server state, with varying
    shadow-copy set, shadow copy and share map hierarchies.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9c8ae4454c8803d0ab807c5b47da01b6d251839b
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Jan 3 16:21:22 2014 +0100

    fsrvp: add server state storage back-end
    
    MS-FSRVP specifies:
      the server MUST persist all state information into an implementation-
      specific configuration store.
    
    This change adds a fss_srv TDB database to preserve FSRVP server state,
    with the following keys used to track shadow copy state and hierarchy:
    - sc_set/<shadow copy set GUID>
      A shadow copy set tracks a collection of zero or more shadow copies,
      as initiated by a StartShadowCopySet FSRVP client request.
    - sc_set/<shadow copy set GUID>/sc/<shadow copy GUID>
      A shadow copy defines information about a snapshot base volume, the
      snapshot path, and a collection of share maps. It is initiated by an
      AddToShadowCopySet client request.
    - sc_set/<shadow copy set GUID>/sc/<shadow copy GUID>/smap/<smap GUID>
      A share map tracks new shares that are created to expose shadow
      copies.
    
    All structures are marshalled into on-disk format using the previously
    added fsrvp_state IDL library.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b773136f9e844f72408e321c69ccf99081995821
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Mar 25 12:35:27 2015 +0100

    librpc: add FSRVP server state idl
    
    FSRVP server state must be retained persistently. This change adds IDL
    definitions for the share map, shadow-copy and shadow-copy set types,
    which will be used for marshalling and unmarshalling state alongside
    database storage or retrieval.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 docs-xml/manpages/vfs_btrfs.8.xml                  |   54 +-
 docs-xml/manpages/vfs_full_audit.8.xml             |    3 +
 docs-xml/manpages/vfs_shell_snap.8.xml             |  155 ++
 docs-xml/manpages/vfs_snapper.8.xml                |   33 +-
 docs-xml/smbdotconf/misc/fssprunestale.xml         |   16 +
 docs-xml/smbdotconf/misc/fsssequencetimeout.xml    |   16 +
 docs-xml/smbdotconf/misc/rpcdaemon.xml             |    7 +-
 docs-xml/wscript_build                             |    1 +
 examples/VFS/skel_opaque.c                         |   30 +
 examples/VFS/skel_transparent.c                    |   32 +
 lib/replace/wscript                                |    3 +-
 librpc/idl/fsrvp_state.idl                         |   36 +
 librpc/idl/wscript_build                           |    3 +-
 librpc/wscript_build                               |    5 +
 python/samba/tests/docs.py                         |    2 +-
 selftest/knownfail                                 |    1 +
 selftest/selftesthelpers.py                        |    1 +
 selftest/skip                                      |    1 -
 selftest/target/Samba3.pm                          |   18 +
 source3/include/vfs.h                              |   31 +
 source3/include/vfs_macros.h                       |   15 +
 source3/modules/vfs_btrfs.c                        |  320 ++++
 source3/modules/vfs_default.c                      |   30 +
 source3/modules/vfs_full_audit.c                   |   56 +-
 source3/modules/vfs_shell_snap.c                   |  201 +++
 source3/modules/vfs_snapper.c                      |  586 +++++++
 source3/modules/vfs_time_audit.c                   |   76 +-
 source3/modules/wscript_build                      |    8 +
 source3/passdb/lookup_sid.c                        |   24 +
 source3/rpc_server/fss/srv_fss_agent.c             | 1762 ++++++++++++++++++++
 .../rpc_server/fss/srv_fss_agent.h                 |   15 +-
 source3/rpc_server/fss/srv_fss_private.h           |   92 +
 source3/rpc_server/fss/srv_fss_state.c             |  698 ++++++++
 source3/rpc_server/{epmd.c => fssd.c}              |  125 +-
 source3/rpc_server/rpc_config.c                    |    4 +-
 source3/rpc_server/rpc_config.h                    |    4 +-
 source3/rpc_server/wscript_build                   |   14 +
 source3/selftest/tests.py                          |    1 +
 source3/smbd/server.c                              |    7 +
 source3/smbd/vfs.c                                 |   33 +
 source3/wscript                                    |    5 +-
 source3/wscript_build                              |    2 +-
 source4/torture/local/fsrvp_state.c                |  494 ++++++
 source4/torture/local/local.c                      |    1 +
 source4/torture/local/wscript_build                |    5 +-
 45 files changed, 4927 insertions(+), 99 deletions(-)
 create mode 100644 docs-xml/manpages/vfs_shell_snap.8.xml
 create mode 100644 docs-xml/smbdotconf/misc/fssprunestale.xml
 create mode 100644 docs-xml/smbdotconf/misc/fsssequencetimeout.xml
 create mode 100644 librpc/idl/fsrvp_state.idl
 create mode 100644 source3/modules/vfs_shell_snap.c
 create mode 100644 source3/rpc_server/fss/srv_fss_agent.c
 copy lib/util/talloc_report.h => source3/rpc_server/fss/srv_fss_agent.h (71%)
 create mode 100644 source3/rpc_server/fss/srv_fss_private.h
 create mode 100644 source3/rpc_server/fss/srv_fss_state.c
 copy source3/rpc_server/{epmd.c => fssd.c} (56%)
 create mode 100644 source4/torture/local/fsrvp_state.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_btrfs.8.xml b/docs-xml/manpages/vfs_btrfs.8.xml
index 4911f47..a2788bb 100644
--- a/docs-xml/manpages/vfs_btrfs.8.xml
+++ b/docs-xml/manpages/vfs_btrfs.8.xml
@@ -51,21 +51,69 @@
 	</para>
 
 	<para>
+		Btrfs snapshots can be manipulated by Samba's FSRVP server.
+		Snapshot manipulation using this module is currently considered
+		experimental, and is therefore disabled by default. The
+		<command>vfs_snapper</command> module is instead recommended for
+		this purpose.
+	</para>
+
+	<para>
 		This module is stackable.
 	</para>
 </refsect1>
 
 <refsect1>
+	<title>OPTIONS</title>
+
+	<variablelist>
+		<varlistentry>
+		<term>btrfs: manipulate snapshots = [yes|no]</term>
+		<listitem>
+		<para>
+		When set to <emphasis>yes</emphasis>, experimental support for
+		the creation and deletion of snapshots via corresponding Btrfs
+		IOCTLs will be enabled. The default is <emphasis>no</emphasis>,
+		which means that such requests are passed through to any
+		underlying VFS module.
+		</para>
+		</listitem>
+		</varlistentry>
+	</variablelist>
+</refsect1>
+
+<refsect1>
 	<title>CONFIGURATION</title>
 
 	<para>
 		<command>vfs_btrfs</command> requires that the underlying share
-		path is a Btrfs filesystem.
+		path is a Btrfs subvolume.
 	</para>
-
 	<programlisting>
 		<smbconfsection name="[share]"/>
 		<smbconfoption name="vfs objects">btrfs</smbconfoption>
+		<smbconfoption name="btrfs: manipulate snapshots">no</smbconfoption>
+	</programlisting>
+	<para>
+		To use the experimental snapshot manipulation functionality
+		provided by this module, it must be explicity enabled, and
+		Samba's FSRVP server must be running.
+	</para>
+	<para>
+		The <command>vfs_shadow_copy</command> module can be used to
+		expose snapshots created by <command>vfs_btrfs</command> to
+		Windows Explorer as file / directory "previous versions".
+	</para>
+
+	<programlisting>
+		<smbconfsection name="[global]"/>
+		<smbconfoption name="rpc_daemon:fssd">fork</smbconfoption>
+		<smbconfoption name="registry shares">yes</smbconfoption>
+		<smbconfoption name="include">registry</smbconfoption>
+
+		<smbconfsection name="[share]"/>
+		<smbconfoption name="vfs objects">btrfs shadow_copy</smbconfoption>
+		<smbconfoption name="btrfs: manipulate snapshots">yes</smbconfoption>
 	</programlisting>
 </refsect1>
 
@@ -73,7 +121,7 @@
 	<title>VERSION</title>
 
 	<para>
-		This man page is correct for version 4.1.0 of the Samba suite.
+		This man page is correct for version 4.3.0 of the Samba suite.
 	</para>
 </refsect1>
 
diff --git a/docs-xml/manpages/vfs_full_audit.8.xml b/docs-xml/manpages/vfs_full_audit.8.xml
index 7107fcb..bc69618 100644
--- a/docs-xml/manpages/vfs_full_audit.8.xml
+++ b/docs-xml/manpages/vfs_full_audit.8.xml
@@ -96,6 +96,9 @@
         <member>set_nt_acl</member>
         <member>set_quota</member>
         <member>setxattr</member>
+        <member>snap_check_path</member>
+        <member>snap_create</member>
+        <member>snap_delete</member>
         <member>stat</member>
         <member>statvfs</member>
         <member>symlink</member>
diff --git a/docs-xml/manpages/vfs_shell_snap.8.xml b/docs-xml/manpages/vfs_shell_snap.8.xml
new file mode 100644
index 0000000..7155662
--- /dev/null
+++ b/docs-xml/manpages/vfs_shell_snap.8.xml
@@ -0,0 +1,155 @@
+<?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_shell_snap.8">
+
+<refmeta>
+	<refentrytitle>vfs_shell_snap</refentrytitle>
+	<manvolnum>8</manvolnum>
+	<refmiscinfo class="source">Samba</refmiscinfo>
+	<refmiscinfo class="manual">System Administration tools</refmiscinfo>
+	<refmiscinfo class="version">4.2</refmiscinfo>
+</refmeta>
+
+
+<refnamediv>
+	<refname>vfs_shell_snap</refname>
+	<refpurpose>
+		Shell script callouts for snapshot creation and deletion
+	</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+	<cmdsynopsis>
+		<command>vfs objects = shell_snap</command>
+	</cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1>
+	<title>DESCRIPTION</title>
+
+	<para>This VFS module is part of the
+	<citerefentry><refentrytitle>samba</refentrytitle>
+	<manvolnum>8</manvolnum></citerefentry> suite.</para>
+
+	<para>
+		The <command>vfs_shell_snap</command> VFS provides shell-script
+		callouts for snapshot creation and deletion operations issued
+		by remote clients using the File Server Remote VSS Protocol
+		(FSRVP).
+	</para>
+
+	<para>
+		The following shell callouts may be configured in smb.conf:
+	</para>
+	<para>
+		<smbconfoption name="shell_snap:check path command"></smbconfoption>
+		<itemizedlist>
+			<listitem><para>
+				Called when an FSRVP client wishes to check
+				whether a given share supports snapshot
+				create/delete requests.
+			</para></listitem>
+			<listitem><para>
+				The command is called with a single
+				<parameter>share_path</parameter> argument.
+			</para></listitem>
+			<listitem><para>
+				The command must return 0 if
+				<parameter>share_path</parameter> is capable of
+				being snapshotted.
+			</para></listitem>
+		</itemizedlist>
+	</para>
+	<para>
+		<smbconfoption name="shell_snap:create command"></smbconfoption>
+		<itemizedlist>
+			<listitem><para>
+				Called when an FSRVP client wishes to create
+				a snapshot.
+			</para></listitem>
+			<listitem><para>
+				The command is called with a single
+				<parameter>share_path</parameter> argument.
+			</para></listitem>
+			<listitem><para>
+				The command must return 0 status if the
+				snapshot was successfully taken.
+			</para></listitem>
+			<listitem><para>
+				The command must output the path of the newly
+				created snapshot to stdout.
+			</para></listitem>
+		</itemizedlist>
+	</para>
+	<para>
+		<smbconfoption name="shell_snap:delete command"></smbconfoption>
+		<itemizedlist>
+			<listitem><para>
+				Called when an FSRVP client wishes to delete
+				a snapshot.
+			</para></listitem>
+			<listitem><para>
+				The command is called with
+				<parameter>base_share_path</parameter> and
+				<parameter>snapshot_share_path</parameter>
+				arguments.
+			</para></listitem>
+			<listitem><para>
+				The command must return 0 status if the
+				snapshot was successfully removed.
+			</para></listitem>
+		</itemizedlist>
+		All commands are executed as the authenticated FSRVP client
+		user.
+	</para>
+
+	<para>
+		This module is stackable.
+	</para>
+</refsect1>
+
+<refsect1>
+	<title>CONFIGURATION</title>
+
+	<programlisting>
+		<smbconfsection name="[share]"/>
+		<smbconfoption name="vfs objects">shell_snap</smbconfoption>
+		<smbconfoption name="shell_snap:check path command">
+			snap_check_path.sh</smbconfoption>
+		<smbconfoption name="shell_snap:create command">
+			snap_create.sh</smbconfoption>
+		<smbconfoption name="shell_snap:delete command">
+			snap_delete.sh</smbconfoption>
+	</programlisting>
+
+	<para>
+		Samba's FSRVP server must be configured in the [global] section:
+	</para>
+
+	<programlisting>
+		<smbconfsection name="[global]"/>
+		<smbconfoption name="rpc_daemon:fssd">fork</smbconfoption>
+		<smbconfoption name="registry shares">yes</smbconfoption>
+		<smbconfoption name="include">registry</smbconfoption>
+	</programlisting>
+</refsect1>
+
+<refsect1>
+	<title>VERSION</title>
+
+	<para>
+		This man page is correct for version 4.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>
+
+</refsect1>
+
+</refentry>
diff --git a/docs-xml/manpages/vfs_snapper.8.xml b/docs-xml/manpages/vfs_snapper.8.xml
index 0e06ec5..802573b 100644
--- a/docs-xml/manpages/vfs_snapper.8.xml
+++ b/docs-xml/manpages/vfs_snapper.8.xml
@@ -39,6 +39,12 @@
 	</para>
 
 	<para>
+		Snapshots can also be created and remove remotely, using the
+		File Server Remote VSS Protocol (FSRVP). Snapshot creation and
+		deletion requests are forwarded to snapper via DBus.
+	</para>
+
+	<para>
 		This module is stackable.
 	</para>
 </refsect1>
@@ -56,6 +62,18 @@
 		<smbconfsection name="[share]"/>
 		<smbconfoption name="vfs objects">snapper</smbconfoption>
 	</programlisting>
+
+	<para>
+		For remote snapshot creation and deletion, Samba's FSRVP
+		server must be configured in the [global] section:
+	</para>
+
+	<programlisting>
+		<smbconfsection name="[global]"/>
+		<smbconfoption name="rpc_daemon:fssd">fork</smbconfoption>
+		<smbconfoption name="registry shares">yes</smbconfoption>
+		<smbconfoption name="include">registry</smbconfoption>
+	</programlisting>
 </refsect1>
 
 <refsect1>
@@ -70,13 +88,26 @@
 		options. Snapper can grant these users and groups .snapshots
 		traversal access automatically via the SYNC_ACL option.
 	</para>
+	<para>
+		Remote snapshot creation and deletion is only permitted by Samba
+		for Active Directory administrators, backup operators, or users
+		explicitly granted SeBackupPrivilege. Snapper must also permit
+		creation and deletion for the appropriate user, via snapper's
+		ALLOW_USERS or ALLOW_GROUPS options.
+	</para>
+	<para>
+		The DiskShadow.exe FSRVP client initially authenticates as the
+		Active Directory computer account. This account must therefore
+		be granted the same permissions as the user account issuing the
+		snapshot creation and deletion requests.
+	</para>
 </refsect1>
 
 <refsect1>
 	<title>VERSION</title>
 
 	<para>
-		This man page is correct for version 4.2.0 of the Samba suite.
+		This man page is correct for version 4.3.0 of the Samba suite.
 	</para>
 </refsect1>
 
diff --git a/docs-xml/smbdotconf/misc/fssprunestale.xml b/docs-xml/smbdotconf/misc/fssprunestale.xml
new file mode 100644
index 0000000..d583104
--- /dev/null
+++ b/docs-xml/smbdotconf/misc/fssprunestale.xml
@@ -0,0 +1,16 @@
+<samba:parameter name="fss: prune stale"
+                 context="G"
+		 type="boolean"
+		 advanced="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>
+	When enabled, Samba's File Server Remove VSS Protocol (FSRVP) server
+	checks all FSRVP initiated snapshots on startup, and removes any
+	corresponding state (including share definitions) for nonexistent
+	snapshot paths.
+	</para>
+</description>
+<value type="default">no</value>
+<value type="example">yes</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/misc/fsssequencetimeout.xml b/docs-xml/smbdotconf/misc/fsssequencetimeout.xml
new file mode 100644
index 0000000..9419a33
--- /dev/null
+++ b/docs-xml/smbdotconf/misc/fsssequencetimeout.xml
@@ -0,0 +1,16 @@
+<samba:parameter name="fss: sequence timeout"
+                 context="G"
+		 type="integer"
+		 advanced="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>
+	The File Server Remove VSS Protocol (FSRVP) server includes a message
+	sequence timer to ensure cleanup on unexpected client disconnect. This
+	parameter overrides the default timeout between FSRVP operations.
+	FSRVP timeouts can be completely disabled via a value of 0.
+	</para>
+</description>
+<value type="default">180 or 1800, depending on operation</value>
+<value type="example">0</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/misc/rpcdaemon.xml b/docs-xml/smbdotconf/misc/rpcdaemon.xml
index 5fbe886..a06e91d 100644
--- a/docs-xml/smbdotconf/misc/rpcdaemon.xml
+++ b/docs-xml/smbdotconf/misc/rpcdaemon.xml
@@ -56,13 +56,14 @@
 	</para>
 
 	<para>
-	Samba includes separate daemons for spoolss and the lsarpc/lsass,
-	netlogon and samr pipes. Currently three daemons are available and they
-	are called:
+	Samba includes separate daemons for spoolss, lsarpc/lsass, netlogon,
+	samr, and FSRVP. Currently four daemons are available and they are
+	called:
 	<programlisting>
 		epmd
 		lsasd
 		spoolssd
+		fssd
 	</programlisting>
 	Example:
 	<programlisting>
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
index 66da399..f54ae15 100644
--- a/docs-xml/wscript_build
+++ b/docs-xml/wscript_build
@@ -77,6 +77,7 @@ manpages='''
          manpages/vfs_scannedonly.8
          manpages/vfs_shadow_copy.8
          manpages/vfs_shadow_copy2.8
+	 manpages/vfs_shell_snap.8
          manpages/vfs_smb_traffic_analyzer.8
 	 manpages/vfs_snapper.8
          manpages/vfs_streams_depot.8
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index b6b1aef..a9cbabf 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -102,6 +102,33 @@ static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
 	return NULL;
 }
 
+static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
+				     TALLOC_CTX *mem_ctx,
+				     const char *service_path,
+				     char **base_volume)
+{
+	return NT_STATUS_NOT_SUPPORTED;
+}
+
+static NTSTATUS skel_snap_create(struct vfs_handle_struct *handle,
+				 TALLOC_CTX *mem_ctx,
+				 const char *base_volume,
+				 time_t *tstamp,
+				 bool rw,
+				 char **base_path,
+				 char **snap_path)
+{
+	return NT_STATUS_NOT_SUPPORTED;
+}
+
+static NTSTATUS skel_snap_delete(struct vfs_handle_struct *handle,
+				 TALLOC_CTX *mem_ctx,
+				 char *base_path,
+				 char *snap_path)
+{
+	return NT_STATUS_NOT_SUPPORTED;
+}
+
 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
 			   const char *mask, uint32 attr)
 {
@@ -830,6 +857,9 @@ struct vfs_fn_pointers skel_opaque_fns = {
 	.statvfs_fn = skel_statvfs,
 	.fs_capabilities_fn = skel_fs_capabilities,
 	.get_dfs_referrals_fn = skel_get_dfs_referrals,
+	.snap_check_path_fn = skel_snap_check_path,
+	.snap_create_fn = skel_snap_create,
+	.snap_delete_fn = skel_snap_delete,
 
 	/* Directory operations */
 
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f7ed537..651eb2f 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -100,6 +100,35 @@ static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
 	return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
 }
 
+static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
+				     TALLOC_CTX *mem_ctx,
+				     const char *service_path,
+				     char **base_volume)
+{
+	return SMB_VFS_NEXT_SNAP_CHECK_PATH(handle, mem_ctx, service_path,
+					    base_volume);
+}
+
+static NTSTATUS skel_snap_create(struct vfs_handle_struct *handle,
+				 TALLOC_CTX *mem_ctx,
+				 const char *base_volume,
+				 time_t *tstamp,
+				 bool rw,
+				 char **base_path,
+				 char **snap_path)
+{
+	return SMB_VFS_NEXT_SNAP_CREATE(handle, mem_ctx, base_volume, tstamp,
+					rw, base_path, snap_path);
+}
+
+static NTSTATUS skel_snap_delete(struct vfs_handle_struct *handle,
+				 TALLOC_CTX *mem_ctx,
+				 char *base_path,
+				 char *snap_path)
+{
+	return SMB_VFS_NEXT_SNAP_DELETE(handle, mem_ctx, base_path, snap_path);
+}
+
 static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
 			   const char *mask, uint32 attr)
 {
@@ -939,6 +968,9 @@ struct vfs_fn_pointers skel_transparent_fns = {
 	.statvfs_fn = skel_statvfs,
 	.fs_capabilities_fn = skel_fs_capabilities,
 	.get_dfs_referrals_fn = skel_get_dfs_referrals,
+	.snap_check_path_fn = skel_snap_check_path,
+	.snap_create_fn = skel_snap_create,
+	.snap_delete_fn = skel_snap_delete,
 
 	/* Directory operations */
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list