linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Jeff Layton <jlayton@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] gssd: ensure that preferred_realm is non-NULL before passing it to strcmp
Date: Tue, 16 Sep 2014 09:30:34 -0400	[thread overview]
Message-ID: <54183B7A.3060209@RedHat.com> (raw)
In-Reply-To: <1410194154-25567-1-git-send-email-jlayton@primarydata.com>



On 09/08/2014 12:35 PM, Jeff Layton wrote:
> It's possible for "preferred_realm" to be NULL, in which case we
> don't want to pass it to strcmp. Other places that use this variable
> test whether it's NULL first -- we need to do the same here.
> 
> This should fix the gssd crash reported here:
> 
>     https://bugzilla.redhat.com/show_bug.cgi?id=1108615
> 
> Reported-by: Brian J. Murrell <brian@interlinx.bc.ca>
> Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Committed... 

steved.

> ---
>  utils/gssd/krb5_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
> index 8369fdf0ed27..f1ebc0d09731 100644
> --- a/utils/gssd/krb5_util.c
> +++ b/utils/gssd/krb5_util.c
> @@ -876,7 +876,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
>  	i = 0;
>  	realm = realmnames[i];
>  
> -	if (strcmp (realm, preferred_realm) != 0) {
> +	if (preferred_realm && strcmp (realm, preferred_realm) != 0) {
>  		realm = preferred_realm;
>  		/* resetting the realmnames index */
>  		i = -1;
> 

      reply	other threads:[~2014-09-16 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 16:35 [PATCH] gssd: ensure that preferred_realm is non-NULL before passing it to strcmp Jeff Layton
2014-09-16 13:30 ` 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=54183B7A.3060209@RedHat.com \
    --to=steved@redhat.com \
    --cc=jlayton@primarydata.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 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).