Re: passwd NIS+ YP compat mode

2003-06-22 Thread Thyer, Matthew
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.bakTue May 27 08:47:24 2003
+++ /usr/src/lib/libc/gen/getpwent.cWed 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

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


Re: passwd NIS+ YP compat mode

2003-06-25 Thread Thyer, Matthew
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:   '[EMAIL PROTECTED]'
> Cc:   '[EMAIL PROTECTED]'; 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.bakTue May 27 08:47:24 2003
> +++ /usr/src/lib/libc/gen/getpwent.cWed 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
> 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: passwd NIS+ YP compat mode

2003-06-25 Thread Daniel Eischen
On Wed, 25 Jun 2003, Thyer, Matthew wrote:

> The silence is deafening.
> 
> Please commit this if it's the correct solution.

I'll do it in a few days if no-one else has anything to say about
it.  Speak up or forever hold your peace.


> 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: '[EMAIL PROTECTED]'
> > Cc: '[EMAIL PROTECTED]'; 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.
> > 
> > 

-- 
Dan Eischen

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


RE: passwd NIS+ YP compat mode

2003-06-25 Thread Thyer, Matthew
Untested in any other environment other than client of Solaris 8 NIS+ in YP compat.

However I am using the AMD automounter to mount users home directories from HP-UX 
10.20, Solaris 8 and 9 systems succesfully.

Relevant parts of my /etc/rc.conf and /etc/amd.conf are:

ifconfig_xl0="DHCP"
nisdomainname="one.two"
nis_client_enable="YES"
nis_client_flags="-s -S one.two,a.big.expensive.server.com -m"
rpcbind_enable="YES"
nfs_server_enable="YES"
nfs_client_enable="YES"
mountd_flags="-r"
amd_enable="YES"
amd_flags="-F /etc/amd.conf"

Extract of /etc/amd.conf:

[global]
map_options = opts:=intr,rsize=8192,wsize=8192
mount_type = nfs
auto_dir = /.tmp_mnt
cache_duration = 300
log_file = syslog
restart_mounts = yes
unmount_on_exit = no

[/home]
map_name = amd.home
map_type = nis

freeme: {1005} ypmatch user1 amd.home
host==freeme;type:=link;fs:=/export/home/user1 || 
rhost:=freeme;type:=nfs;rfs:=/export/home/user1;sublink:=.

-Original Message-
From: John De Boskey [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 10:51 AM
To: Thyer, Matthew
Cc: yoshint
Subject: Re: passwd NIS+ YP compat mode


Is there a PR for this?

I understand this patch fixes ypclient to solaris NIS+ compat. Have you tested
it in any other configs?

-John

- Thyer, Matthew's Original Message -
> 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: '[EMAIL PROTECTED]'
> > Cc: '[EMAIL PROTECTED]'; 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.bakTue May 27 08:47:24 2003
> > +++ /usr/src/lib/libc/gen/getpwent.cWed 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
> > 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
--
As said by Napolean Bonaparte:
"Never ascribe to malice, that which is adequately explained by incompetence"

After being embraced by MS:

"When accused of malice, always hide behind incompetence".
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: passwd NIS+ YP compat mode

2003-05-27 Thread TOMITA Yoshinori
>> On Tue, 27 May 2003 21:46:04 +0900, TOMITA Yoshinori
>> <[EMAIL PROTECTED]> said:

T> Hello all,
T> After cvsup-ed today 2003-5-27 and make buildworld and so on,
T> NIS passwd database are completely ignored.
T> But NIS group database seems to be used as usual.

T> Out NIS server is actually NIS+ in YP comaptible mode.
T> I traced the function getpwnam() and reached following code.

T> What can I do ?


T> ==[getpwent.c]=
T> static int
T> nis_map(char *domain, enum nss_lookup_type how, char *buffer, size_t bufsize,
T> int *master)

T>...

T>  rv = yp_order(domain, buffer, &order); <-- this returns YPERR_YPERR
T>  if (rv == 0)
T>  return (NS_SUCCESS);

T> ==[yplib.c]=

T> int
T> yp_order(char *indomain, char *inmap, int *outorder)

T>...

T>  /*
T>   * NIS+ in YP compat mode doesn't support the YPPROC_ORDER
T>   * procedure.
T>   */
T>  if (r == RPC_PROCUNAVAIL) {
T>  return(YPERR_YPERR); <--- Here
T>  }
T> 



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.bakTue May 27 08:47:24 2003
+++ /usr/src/lib/libc/gen/getpwent.cWed 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

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