[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Mar 7 19:53:04 MST 2014


The branch, master has been updated
       via  3ac9cb3 For FSRVP use textual error messages instead of hex error codes
       via  05daf6a Add missing FSRVP_E_UNSUPPORTED_CONTEXT constant
      from  a8c0de3 s3-kerberos: remove unused kdc_name from create_local_private_krb5_conf_for_domain().

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


- Log -----------------------------------------------------------------
commit 3ac9cb3d17c5252383e8f971818a426c6ad68c2d
Author: Noel Power <noel.power at suse.com>
Date:   Thu Mar 6 11:57:45 2014 +0000

    For FSRVP use textual error messages instead of hex error codes
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Mar  8 03:52:44 CET 2014 on sn-devel-104

commit 05daf6a25ecbe928987446f39e2d7855328195d1
Author: Noel Power <noel.power at suse.com>
Date:   Thu Mar 6 14:02:26 2014 +0000

    Add missing FSRVP_E_UNSUPPORTED_CONTEXT constant
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 librpc/idl/fsrvp.idl        |    1 +
 source3/rpcclient/cmd_fss.c |   52 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 51 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/fsrvp.idl b/librpc/idl/fsrvp.idl
index d61545b..3a11b87 100644
--- a/librpc/idl/fsrvp.idl
+++ b/librpc/idl/fsrvp.idl
@@ -20,6 +20,7 @@ import "misc.idl";
 	const uint32 FSRVP_E_WAIT_FAILED = 0xFFFFFFFF;
 	const uint32 FSRVP_E_OBJECT_ALREADY_EXISTS = 0x8004230D;
 	const uint32 FSRVP_E_OBJECT_NOT_FOUND = 0x80042308;
+	const uint32 FSRVP_E_UNSUPPORTED_CONTEXT = 0x8004231B;
 	const uint32 FSRVP_E_BAD_ID = 0x80042302;	/* wire, not documented */
 
 	/* TODO move these to generic herror defines or COM in orpc.idl */
diff --git a/source3/rpcclient/cmd_fss.c b/source3/rpcclient/cmd_fss.c
index af194e2..238bd79 100644
--- a/source3/rpcclient/cmd_fss.c
+++ b/source3/rpcclient/cmd_fss.c
@@ -24,6 +24,40 @@
 #include "../librpc/gen_ndr/ndr_fsrvp.h"
 #include "../librpc/gen_ndr/ndr_fsrvp_c.h"
 
+static const struct {
+	uint32_t error_code;
+	const char *error_str;
+} fss_errors[] = {
+	{
+		FSRVP_E_BAD_STATE,
+		"A method call was invalid because of the state of the server."
+	},
+	{
+		FSRVP_E_SHADOW_COPY_SET_IN_PROGRESS,
+		"A call was made to either \'SetContext\' or \'StartShadowCopySet\' while the creation of another shadow copy set is in progress."
+	},
+	{
+		FSRVP_E_NOT_SUPPORTED,
+		"The file store which contains the share to be shadow copied is not supported by the server."
+	},
+	{
+		FSRVP_E_WAIT_TIMEOUT,
+		"The wait for a shadow copy commit or expose operation has timed out."
+	},
+	{
+		FSRVP_E_WAIT_FAILED,
+		"The wait for a shadow copy commit expose operation has failed."
+	},
+	{
+		FSRVP_E_OBJECT_NOT_FOUND,
+		"The specified object does not exist."
+	},
+	{
+		FSRVP_E_UNSUPPORTED_CONTEXT,
+		"The specified context value is invalid."
+	}
+};
+
 struct fss_context_map {
 	uint32_t ctx_val;
 	const char *ctx_str;
@@ -55,6 +89,20 @@ struct fss_context_map ctx_map[] = {
 	{ 0, NULL, NULL },
 };
 
+static const char *get_error_str(uint32_t code)
+{
+	static const char *default_err = "Unknown Error";
+	const char *result = default_err;
+	int i;
+	for (i = 0; i < ARRAY_SIZE(fss_errors); ++i) {
+		if (code == fss_errors[i].error_code) {
+			result = fss_errors[i].error_str;
+			break;
+		}
+	}
+	return result;
+};
+
 static bool map_fss_ctx_str(const char *ctx_str,
 			    uint32_t *ctx_val)
 {
@@ -100,8 +148,8 @@ static NTSTATUS cmd_fss_is_path_sup(struct rpc_pipe_client *cli,
 			  r.in.ShareName));
 		return NT_STATUS_UNSUCCESSFUL;
 	} else if (r.out.result) {
-		DEBUG(0, ("failed IsPathSupported response: 0x%x\n",
-			  r.out.result));
+		DEBUG(0, ("failed IsPathSupported response: 0x%x - \"%s\"\n",
+			  r.out.result, get_error_str(r.out.result)));
 		return NT_STATUS_UNSUCCESSFUL;
 	}
 	printf("UNC %s %s shadow copy requests\n", r.in.ShareName,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list