Subject: 2292bis-01: rcmd_af and rexec_af

From: Vladislav Yasevich <[email-masked]>
Date: Wed, 08 Mar 2000 13:22:06 -0500

When going throught and implementing these function I discovered 
that they are not really thread safe.  

The reason for this is the way we treat the 'ahost' argument.  This
argument is passed in as 'char **' and the function will change
'*ahost' to point to a FQDN for the host [behave the same as rcmd()]
obtained through either getipnodebyname() or getaddrinfo().

The FQDN is a dynamically allocated storage that will not persist
outside the rcmd_af().  Thus a string copy should be used instead,
but we do not know if we have enough room in '*ahost' to contain
an FQDN.

I propose that we change the rcmd_af and rexec_af to be thread safe.
To do that we can change the host argument to be pointer to hostname 
(char *ahost) and ether specified a lenght argument (size_t hostlen)
or we can require that the host buffer be MAXDNAME length.

-vlad 
+++++++++++++++++++++++++++++++
Vladislav Yasevich
Compaq Computer Corp.
110 Spit Brook Rd ZK03-3/T07
Nashua, NH 03062
(603) 884-1079
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------