From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: [PATCH 1/1] nss_getpwnam: ignore case when comparing domain names
Date: Sat, 12 Nov 2011 10:21:50 -0500 [thread overview]
Message-ID: <1321111310-9481-1-git-send-email-steved@redhat.com> (raw)
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>
---
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;
}
--
1.7.7
next reply other threads:[~2011-11-12 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-12 15:21 Steve Dickson [this message]
2011-11-14 21:16 ` [PATCH 1/1] nss_getpwnam: ignore case when comparing domain names Steve Dickson
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=1321111310-9481-1-git-send-email-steved@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