From owner-freebsd-security Sun Jun 6 20:53:52 1999 Delivered-To: freebsd-security@freebsd.org Received: from jason.argos.org (a1-3b169.neo.rr.com [24.93.181.169]) by hub.freebsd.org (Postfix) with ESMTP id 89BEA14CA9 for ; Sun, 6 Jun 1999 20:53:49 -0700 (PDT) (envelope-from mike@argos.org) Received: from localhost (mike@localhost) by jason.argos.org (8.9.1/8.9.1) with ESMTP id XAA04222; Sun, 6 Jun 1999 23:56:08 -0400 Date: Sun, 6 Jun 1999 23:56:07 -0400 (EDT) From: Mike Nowlin To: John Baldwin Cc: Wes Peters , freebsd-security@FreeBSD.ORG Subject: Re: NIS strangeness In-Reply-To: <199906070227.WAA09234@smtp4.erols.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org More info about this whole problem: > > I'm not so sure about that *. If "ypmatch -k username passwd" works, > > the network transport and NIS parts are working just fine. Basically, if "root" is who's calling getpwnam(), the NIS lookup fails. If any other user calls getpwnam(), it works. Example: -------------------- #include #include main() { struct passwd *pwdinfo; pwdinfo = getpwnam("steph"); printf("Name: %s\n", pwdinfo->pw_name); printf("Passwd: %s\n", pwdinfo->pw_passwd); } ------------------ (It sucks, I know... But it was to test a theory.) If root runs this program, it SEGV's and blows up. But if anybody else runs it, it comes back with Name: steph Passwd: * ...as expected. (Steph is another NIS-defined user.) If I replace "steph" with "mike" in the above program, both root & non-root can run it fine. "mike" is NOT a NIS-defined user -- that one actually exists in the local password file. I can do a "ypcat master.passwd", "ypcat passwd", or "ypmatch rubino master.passwd", and they all work -- it's not a missing master.passwd map. This is slowly driving me insane... --Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message