Subject: RFC2292 addition for rsh/rlogin

From: [email-masked]
Date: Wed, 01 Dec 1999 22:03:19 +0900

2292bis-01 defines the following functions:

>int  rresvport_af(int *port, int family);
>int rcmd_af(char **ahost, unsigned short rport, const char *locuser,
>            const char *remuser, const char *cmd, int *fd2p, int af)
>int rexec_af(char **ahost, unsigned short rport, const char *name,
>             const char *pass, const char *cmd, int *fd2p, int af)

	For the latter two caller needs to pass in6_addr, not sockaddr_in{,6}.
	there's no chance to pass scope id information to these functions,
	so they are not scope-boundary aware.
	It makes more sense if we define them as:

>int rcmd_addr(struct sockaddr *host, unsigned short rport,
>	const char *locuser, const char *remuser, const char *cmd, int *fd2p)
>int rexec_addr(struct sockaddr *host, unsigned short rport,
>	const char *name, const char *pass, const char *cmd, int *fd2p)

	Also, we need the following as well:

>int iruserok_addr(struct sockaddr *sa, int superuser, const char *ruser,
>	const char *luser)
>int ruserok_addr(const struct sockaddr *sa, int superuser, const char *ruser,
>	const char *luser)

	I think we would really need to change them to take struct sockaddr.
	I'm happy with the name changes ("_addr" portion),

itojun
--------------------------------------------------------------------
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]
--------------------------------------------------------------------

---

From: Erik Nordmark <[email-masked]>
Date: Wed, 1 Dec 1999 21:27:34 -0800 (PST)

> 	so they are not scope-boundary aware.

I don't understand your statement. The functions take host names thus they
could very well be scope aware internally (and I assume we want to make the 
implementation of these interfaces scope aware).

> >	const char *name, const char *pass, const char *cmd, int *fd2p)

How does your _addr functions handle the case when a FQDN has multiple 
addresses and we want
to try all of them until we find one that works?
I don't think we want to put that loop and retry logic in the callers to 
rcmd/rexec.

> >int ruserok_addr(const struct sockaddr *sa, int superuser, const char
> *ruser, >	const char *luser)
> 

What problem are you solving by making them take the address instead of the
host name? (I can see that it is simpler for the application since it
doesn't need to call getipnodebyaddr/getnameinfo.)
BTW: What is iruserok()?

   Erik

---

From: [email-masked]
Date: Thu, 02 Dec 1999 19:25:08 +0900

>implementation of these interfaces scope aware).

	I see, I misread the document.  I need to revisit it.

>doesn't need to call getipnodebyaddr/getnameinfo.)

	sorry, ruserok() takes string hostname.  iruserok() is 4.2BSD
	thing, and it takes in_addr (u_int32_t) as address.

	ignore my previous email, I'll revisit documents.

itojun