From: Steve French <smfrench@gmail.com>
To: "Kenneth D'souza" <kdsouza@redhat.com>
Cc: CIFS <linux-cifs@vger.kernel.org>, Pavel Shilovsky <piastryyy@gmail.com>
Subject: Re: [PATCH] getcifsacl: Do not go to parse_sec_desc if getxattr fails.
Date: Mon, 18 Feb 2019 22:40:47 -0600 [thread overview]
Message-ID: <CAH2r5musFyuqHofaeEtjd5ecK95x-60ByZ=Zi=fAXVLMXG=Y9Q@mail.gmail.com> (raw)
In-Reply-To: <20190219014343.29526-1-kdsouza@redhat.com>
Reviewed-by: Steve French <stfrench@microsoft.com>
On Mon, Feb 18, 2019 at 7:43 PM Kenneth D'souza <kdsouza@redhat.com> wrote:
>
> Add more to the error message by printing the filename and error.
>
> Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
> ---
> getcifsacl.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/getcifsacl.c b/getcifsacl.c
> index f08cdea..7f6e673 100644
> --- a/getcifsacl.c
> +++ b/getcifsacl.c
> @@ -399,7 +399,12 @@ cifsacl:
> bufsize += BUFSIZE;
> goto cifsacl;
> } else
> - printf("getxattr error: %d\n", errno);
> + {
> + fprintf(stderr, "getxattr failed on %s: %s\n", filename, strerror(errno) );
> + free(attrval);
> + ret = -1;
> + goto out;
> + }
> }
>
> parse_sec_desc((struct cifs_ntsd *)attrval, attrlen, raw);
> --
> 2.20.1
>
--
Thanks,
Steve
next prev parent reply other threads:[~2019-02-19 4:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 1:43 [PATCH] getcifsacl: Do not go to parse_sec_desc if getxattr fails Kenneth D'souza
2019-02-19 4:40 ` Steve French [this message]
2019-03-09 0:37 ` Pavel Shilovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH2r5musFyuqHofaeEtjd5ecK95x-60ByZ=Zi=fAXVLMXG=Y9Q@mail.gmail.com' \
--to=smfrench@gmail.com \
--cc=kdsouza@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=piastryyy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).