nss_getpwnam: ignore case when comparing domain names
Subsystems (2)
PATCH 1/1 nss_getpwnam: ignore case when comparing domain names
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 <[email protected]>
--- nss.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
nss.c +1 -1
@@ -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; }
Signature · 1 line
1.7.7
Quoted 6 lines · Steve Dickson
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 <[email protected]>
Committed...
steved.
Quoted 17 lines
--- nss.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)nss.c +1
-1@@ -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; }