Re: Help diagnosing NIS breakage ?

From: TOMITA Yoshinori <yoshint_at_flab.fujitsu.co.jp>
Date: Thu, 17 Jul 2003 12:17:38 +0900
Hi Bill, I have a question.

>> On Tue, 15 Jul 2003 10:44:15 -0700 (PDT), wpaul_at_freebsd.org (Bill
>> Paul) said:


B> I uploaded a new diff, please test this instead:

B> http://www.freebsd.org/~wpaul/getpwent.diff

B> Thanks for providing me access to this machine, it helped me realize
B> where I'd gone wrong in my patch. If this works for you, and if nobody
B> objects, I will check it in.


Is your patch "getpwent.diff" really for revision 1.82 ?
If so, nis_map() will be like this and I do not think this works.

------ ------ ------ ------ ------ 
static int
nis_map(char *domain, enum nss_lookup_type how, char *buffer, size_t bufsize,
    int *master)
{
	int	rv;
	char	*outname;

	*master = 0;
	if (geteuid() == 0) {
		if (snprintf(buffer, bufsize, "master.passwd.by%s",
		    (how == nss_lt_id) ? "uid" : "name") >= bufsize)
			return (NS_UNAVAIL);
		rv = yp_order(domain, buffer, &outname);
		if (rv == 0)
			*master = 1;
		return (NS_UNAVAIL);
	}

	return (NS_SUCCESS);
}
------ ------ ------ ------ ------ 

In case of geteuid()==0, always NS_UNAVAIL returned
In case of geteuid()!=0, map name is not assigned to *buffer




I did not imagine my idea of yp_order() would break NIS with
ActiveDirectory, which I have never seen so far.

-- 
---
TOMITA Yoshinori
Received on Wed Jul 16 2003 - 18:17:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:15 UTC