hi Bill,

>> On Thu, 17 Jul 2003 00:33:26 -0700 (PDT), [EMAIL PROTECTED] (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> http://www.freebsd.org/~wpaul/getpwent.diff 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, "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;
        } else {
            if (snprintf(buffer, bufsize, "passwd.by%s",
                         (how == nss_lt_id) ? "uid" : "name") >= bufsize)
                return (NS_UNAVAIL);
        }





But I have not tested the code yet.


-- 
---
TOMITA Yoshinori
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to