Help diagnosing NIS breakage ?

TOMITA Yoshinori yoshint at
Thu Jul 17 00:58:29 PDT 2003

hi Bill,

>> On Thu, 17 Jul 2003 00:33:26 -0700 (PDT), wpaul at (Bill
>> Paul) said:

Bi> Grrrrr. I don't know how I can keep getting this wrong. Ok, this
Bi> time I tested the change with a sample program. Try applying
Bi> again. Verify that
Bi> the result matches the file in the fbsd5 test account. The
Bi> getpwuid() routine seems to work ok, though my test for the
Bi> geteuid() == 0 case was a bit of a kludge since I don't actually
Bi> have root on the test box.

Bi> -Bill

I feel that the following else-clause is required to store map name
such as "passwd.byname" in variable buffer.

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

But I have not tested the code yet.

TOMITA Yoshinori

More information about the freebsd-current mailing list