> Hi Mark,
> portmap is up and running.
> ifconfig shows  UP BROADCAST RUNNING MULTICAST
> It's using an OSA card
> ypbind comes up with either version of yp.conf
> i.e.   domain us.oracle.com broadcast
> or    domain  us.orcacle.com   server pasysyp1.us.oracle.com
> If I use the second version, I must add  pasysyp1 to /etc/hosts.
> No error messages with the second version.    Use the "broadcast"
> version on SLES8.

Not related to this problem, but you are aware that using broadcast to
locate a plain NIS server is a fairly serious security exposure...?

> >I'm running SuSE SLES 9, kernel  2.6.5-7.97-s390x glibc-2.3.3-98.28
> >When I start ypbind,  I get the following error:
> >ypbind: RPC: Timed out
> >ypbind:: broadcast: RPC: Can't encode arguments.
> >My IP is  x.x 54.18
> >netmask 255.255.252.0
> >network x.x.52.0
> >broadcast  x.x.55.255
> >This works on my SLES8 servers.
> >/etc/yp.conf
> >domain  us.oracle.com  broadcast
> >
> >The subnet has domain servers but broadcast doesn't seem to work. If  I
> >code yp.conf with server and IP instead of broadcast, ypbind comes up.
> >nsswitch.conf has
> >passwd: compat
> >group:  compat
> >hosts and services   files dns
> >everything else files
> >Any suggestions?

In the past, there was a glibc bug that would cause this error message
to be issued due to the authnone_marshal routine failing in a ugly
way. I wonder if SLES9 has managed to resurface this bug.

When I recompile auth_none.c from libc CVS into a shared object and
LD_PRELOAD it, the errors disappear.  The biggest difference between
the two is that libc's auth_none is compiled to be thread safe and
mine isn't.

Looking at the code in auth_none.c I see that authnone_marshal is
buggy in the presence of multiple threads:

/*ARGSUSED */
static bool_t
authnone_marshal (AUTH *client, XDR *xdrs)
{
  struct authnone_private_s *ap;

  ap = (struct authnone_private_s *) authnone_private;
  if (ap == NULL)
    return FALSE;
  return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client,
  ap->mcnt);
}

It ignores its client parameter and uses authnone_private directly.
But authnone_private is thread local data.  Therefore, if the RPC client
structure is created in one thread and used in another, the pointer
will be NULL in the second thread and this code will fail.

This patch should be the minimal change to fix the bug:

--- auth_none.c.orig Thu Apr 11 00:20:50 2002
+++ auth_none.c      Thu Apr 11 00:21:44 2002
@@ -97,13 +97,10 @@
   return (&ap->no_client);
 }

-/*ARGSUSED */
 static bool_t
 authnone_marshal (AUTH *client, XDR *xdrs)
 {
-  struct authnone_private_s *ap;
-
-  ap = (struct authnone_private_s *) authnone_private;
+  ap = (struct authnone_private_s *) client;
   if (ap == NULL)
     return FALSE;
   return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client,
 ap->mcnt);

I will attempt to rebuild glibc overnight with this patch applied, and
see if it works.

A more thorough fix would be to change authnone_create to use
pthread_once instead of thread-local data.  There is no reason why
each thread needs its own copy of authnone_private.

If this works, then you should pester SuSE for a formal fix.  If it is
this problem, I'll put a fix out on our support site for our Linux
support customers.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to