From owner-freebsd-current@FreeBSD.ORG Wed Jun 25 02:41:29 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5021C37B401 for ; Wed, 25 Jun 2003 02:41:29 -0700 (PDT) Received: from digger1.defence.gov.au (digger1.defence.gov.au [203.5.217.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B05D243FA3 for ; Wed, 25 Jun 2003 02:41:27 -0700 (PDT) (envelope-from Matthew.Thyer@dsto.defence.gov.au) Received: from dsto-ms2.dsto.defence.gov.au (dsto-ms2.dsto.defence.gov.au [131.185.2.150]) by digger1.defence.gov.au with ESMTP id h5P9fc7U007598 for ; Wed, 25 Jun 2003 19:11:38 +0930 (CST) Received: from muttley.dsto.defence.gov.au (unverified) by dsto-ms2.dsto.defence.gov.au ; Wed, 25 Jun 2003 19:11:18 +0930 Received: from ednex501.dsto.defence.gov.au (ednex501.dsto.defence.gov.au [131.185.2.81])h5P9dx802884; Wed, 25 Jun 2003 19:09:59 +0930 (CST) Received: by ednex501.dsto.defence.gov.au with Internet Mail Service (5.5.2653.19) id ; Wed, 25 Jun 2003 19:09:56 +0930 Message-ID: <5F13229E7BA2D611BD0300306E010DB011B176@ednex503.dsto.defence.gov.au> From: "Thyer, Matthew" To: "'yoshint@flab.fujitsu.co.jp'" Date: Wed, 25 Jun 2003 19:10:08 +0930 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" cc: "'FreeBSD-current@FreeBSD.ORG'" Subject: Re: passwd NIS+ YP compat mode X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 09:41:29 -0000 The silence is deafening. Please commit this if it's the correct solution. FreeBSD looks real bad when it cant be a NIS client of Solaris NIS+ (in YP compat) servers. > -----Original Message----- > From: Thyer, Matthew > Sent: Monday, June 23, 2003 12:04 PM > To: 'yoshint@flab.fujitsu.co.jp' > Cc: 'FreeBSD-current@FreeBSD.ORG'; Wilkinson, Alex > Subject: SEC:URe: passwd NIS+ YP compat mode > > Yoshinori's patch for FreeBSD NIS clients of Solaris NIS+ servers in YP compatibility mode works for me. > > Please commit this before 5 becomes -STABLE (I'm shocked the bug has made it into 5.1). > > Solaris NIS+ servers in YP compatibility is a very common configuration in larger enterprises. > > > On Tue, 27 May 2003 18:09:29 -0700, TOMITA Yoshinori wrote: > > I hope this patch will solve this problem for users living under NIS+ > servers. > > I guess yp_order() is used to check masswd.by* or master.passwd.by* > databese really exists. yp_master() can be used for this purpose. But > I do not know the cost of yp_master() compared to yp_order(). > > > --- /usr/src/lib/libc/gen/getpwent.c.bak Tue May 27 08:47:24 2003 > +++ /usr/src/lib/libc/gen/getpwent.c Wed May 28 09:35:50 2003 > @@ -938,14 +938,15 @@ > nis_map(char *domain, enum nss_lookup_type how, char *buffer, size_t bufsize, > int *master) > { > - int rv, order; > + 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, &order); > + rv = yp_master(domain, buffer, &outname); > if (rv == 0) { > *master = 1; > return (NS_SUCCESS); > @@ -954,7 +955,7 @@ > if (snprintf(buffer, bufsize, "passwd.by%s", > (how == nss_lt_id) ? "uid" : "name") >= bufsize) > return (NS_UNAVAIL); > - rv = yp_order(domain, buffer, &order); > + rv = yp_master(domain, buffer, &outname); > if (rv == 0) > return (NS_SUCCESS); > return (NS_UNAVAIL); > > > > -- > --- > TOMITA Yoshinori >