[PATCH] sharesec: Remove error message for unmarshall_sec_desc failure
Christof Schmitt
cs at samba.org
Thu Jul 2 21:49:19 CEST 2015
Just an additional remark: unmarshall_sec_desc still prints an error, in
case the tdb entry is not empty, but cannot be parsed:
# bin/sharesec --view-all
[test]
ndr_pull_error(11): Pull bytes 4 (../librpc/ndr/ndr_basic.c:150)
ndr_pull_security_descriptor failed: Buffer Size Error
REVISION:1
CONTROL:0x8004
OWNER:
GROUP:
ACL:S-1-1-0:0/0x0/0x001f01ff
On Wed, Jul 01, 2015 at 01:04:52PM -0700, Christof Schmitt wrote:
> From c02f268b73a9fdb333658ae8da7cdba5db676b44 Mon Sep 17 00:00:00 2001
> From: Christof Schmitt <cs at samba.org>
> Date: Wed, 1 Jul 2015 01:15:57 +0200
> Subject: [PATCH] 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>
> ---
> source3/lib/sharesec.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> 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);
> }
> --
> 1.7.1
>
More information about the samba-technical
mailing list