public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/1] nss_getpwnam: ignore case when comparing domain names
Date: Mon, 14 Nov 2011 16:16:38 -0500	[thread overview]
Message-ID: <4EC18536.5010708@RedHat.com> (raw)
In-Reply-To: <1321111310-9481-1-git-send-email-steved@redhat.com>



On 11/12/2011 10:21 AM, Steve Dickson wrote:
> nss_getpwnam() fails to find the password entry when the
> DNS domain name has both upper and lower characters,
> which is wrong. Case need to be ignored when comparing
> domain names.
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...

steved.

> ---
>  nss.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/nss.c b/nss.c
> index 04aff19..b2b1227 100644
> --- a/nss.c
> +++ b/nss.c
> @@ -141,7 +141,7 @@ static char *strip_domain(const char *name, const char *domain)
>  	if (c == NULL && domain == NULL) {
>  		len = strlen(name) + 1;
>  	} else {
> -		if (domain && strcmp(c + 1, domain) != 0)
> +		if (domain && strcasecmp(c + 1, domain) != 0)
>  			goto out;
>  		len = c - name;
>  	}

      reply	other threads:[~2011-11-14 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12 15:21 [PATCH 1/1] nss_getpwnam: ignore case when comparing domain names Steve Dickson
2011-11-14 21:16 ` 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=4EC18536.5010708@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox