From: Steve Dickson <SteveD@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] rpc.gssd: Only clear the retval if it has not been set
Date: Fri, 31 Jul 2015 08:18:20 -0400 [thread overview]
Message-ID: <55BB678C.3050803@RedHat.com> (raw)
In-Reply-To: <1438290916-12071-1-git-send-email-steved@redhat.com>
On 07/30/2015 05:15 PM, Steve Dickson wrote:
> In gssd_search_krb5_keytab() an error code can be
> cleared by blindly setting retval to zero.
>
> Reported-by: Jianhong Yin <jiyin@redhat.com>
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...
steved.
> ---
> utils/gssd/krb5_util.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
> index f1ebc0d..ecf17a2 100644
> --- a/utils/gssd/krb5_util.c
> +++ b/utils/gssd/krb5_util.c
> @@ -772,7 +772,9 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
> "keytab '%s'\n", k5err, kt_name);
> }
>
> - retval = 0;
> + /* Only clear the retval if has not been set */
> + if (retval < 0)
> + retval = 0;
> out:
> free(k5err);
> return retval;
>
prev parent reply other threads:[~2015-07-31 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 21:15 [PATCH] rpc.gssd: Only clear the retval if it has not been set Steve Dickson
2015-07-31 12:18 ` Steve Dickson [this message]
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=55BB678C.3050803@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.