[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Jul 6 23:24:05 CEST 2015


The branch, master has been updated
       via  cdbc6d9 ctdb: Accept the key in hex format for the pstore command
       via  1d25a51 sharesec: Remove error message for unmarshall_sec_desc failure
      from  589de04 docs: Document smbclient "notify" command

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


- Log -----------------------------------------------------------------
commit cdbc6d92c6bf0645c5a23955e8ec5e253212e86d
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Jul 2 13:06:32 2015 -0700

    ctdb: Accept the key in hex format for the pstore command
    
    This follows the same pattern as the tstore command, and it allows
    specifying key strings with a trailing \0 character.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Mon Jul  6 23:23:22 CEST 2015 on sn-devel-104

commit 1d25a5159134a124e976d51438bbe858b917ba6d
Author: Christof Schmitt <cs at samba.org>
Date:   Wed Jul 1 01:15:57 2015 +0200

    sharesec: Remove error message for unmarshall_sec_desc failure
    
    In a cluster setup, running sharesec -D results in an empty record that
    triggers this message. The situation is correctly handled in the code
    (unmarshall_sec_desc fails and sharesec uses the default), so simply
    remove the message in this case.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 ctdb/tools/ctdb.c      | 13 +++++++++++--
 source3/lib/sharesec.c |  2 --
 2 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 9b7fb11..91ada44 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -4231,8 +4231,17 @@ static int control_pstore(struct ctdb_context *ctdb, int argc, const char **argv
 		return -1;
 	}
 
-	key.dptr  = discard_const(argv[1]);
-	key.dsize = strlen(argv[1]);
+	if (!strncmp(argv[1], "0x", 2)) {
+		key = hextodata(tmp_ctx, argv[1] + 2);
+		if (key.dsize == 0) {
+			printf("Failed to convert \"%s\" into a TDB_DATA\n", argv[1]);
+			return -1;
+		}
+	} else {
+		key.dptr  = discard_const(argv[1]);
+		key.dsize = strlen(argv[1]);
+	}
+
 	ret = ctdb_transaction_store(h, key, data);
 	if (ret != 0) {
 		DEBUG(DEBUG_ERR,("Failed to store record\n"));
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c
index dbe5de7..d790b08 100644
--- a/source3/lib/sharesec.c
+++ b/source3/lib/sharesec.c
@@ -331,8 +331,6 @@ struct security_descriptor *get_share_security( TALLOC_CTX *ctx, const char *ser
 	TALLOC_FREE(data.dptr);
 
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(0, ("unmarshall_sec_desc failed: %s\n",
-			  nt_errstr(status)));
 		return get_share_security_default(ctx, psize,
 						  SEC_RIGHTS_DIR_ALL);
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list