Re: [PATCH 1/1] nss_getpwnam: ignore case when comparing domain names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
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;
>  	}
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux