Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jul 2003 12:17:38 +0900
From:      TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
To:        wpaul@freebsd.org (Bill Paul)
Cc:        current@freebsd.org
Subject:   Re: Help diagnosing NIS breakage ?
Message-ID:  <ywl8yqxx2nh.fsf@cerberus.proc.flab.fujitsu.co.jp>
In-Reply-To: <20030715174415.D490537B401@hub.freebsd.org> (Bill Paul's message of "Tue, 15 Jul 2003 10:44:15 -0700 (PDT)")
References:  <EE3D3FBAFFCAED448C21C398FDAD91AC01083B@EBE1.gc.nat> <20030715174415.D490537B401@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Bill, I have a question.

>> On Tue, 15 Jul 2003 10:44:15 -0700 (PDT), wpaul@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ywl8yqxx2nh.fsf>