rcmd(3) Library Functions Manual rcmd(3) rcmd, rresvport, iruserok, ruserok, rcmd_af, rresvport_af, iruserok_af, ruserok_af - (libc -lc) #include /* */ int rcmd(char **restrict ahost, unsigned short inport, const char *restrict locuser, const char *restrict remuser, const char *restrict cmd, int *restrict fd2p); int rresvport(int *port); int iruserok(uint32_t raddr, int superuser, const char *ruser, const char *luser); int ruserok(const char *rhost, int superuser, const char *ruser, const char *luser); int rcmd_af(char **restrict ahost, unsigned short inport, const char *restrict locuser, const char *restrict remuser, const char *restrict cmd, int *restrict fd2p, sa_family_t af); int rresvport_af(int *port, sa_family_t af); int iruserok_af(const void *restrict raddr, int superuser, const char *restrict ruser, const char *restrict luser, sa_family_t af); int ruserok_af(const char *rhost, int superuser, const char *ruser, const char *luser, sa_family_t af); glibc ( feature_test_macros(7)): rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE rcmd() . rresvport() . iruserok() ruserok() rcmd(). rshd(8) ( ). rcmd() rcmd() *ahost gethostbyname(3) -1 . *ahost inport. SOCK_STREAM stdin stdout. fd2p *fd2p. ( 2) UNIX . fd2p 0 stderr ( 2 ) stdout . rshd(8). rresvport() rresvport() . rcmd() . 0 1023. ( CAP_NET_BIND_SERVICE ) . glibc 512 1023. port -: () . iruserok() ruserok() iruserok() ruserok() IP . /etc/hosts.equiv. .rhosts . . hosts.equiv .rhosts iruserok() ruserok() -1. ( gethostname(2)) . IP iruserok() ruserok() DNS . *_af() IPv4 (AF_INET). "_af" . af AF_INET AF_INET6. rcmd_af() AF_UNSPEC. rcmd() . -1 . rresvport() . -1 errno . EAGAIN : " ". ruserok() iruserok() . attributes(7). +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |rcmd(), rcmd_af() | | (MT-Unsafe) | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |rresvport(), | | MT-Safe | |rresvport_af() | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |iruserok(), | | (locale) (MT-Safe) | |ruserok(), | | | |iruserok_af(), | | | |ruserok_af() | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ BSD. iruserok_af() rcmd_af() rresvport_af() ruserok_af() glibc 2.2. Solaris 4.2BSD. "_af" . iruserok() iruserok_af() glibc glibc 2.12. rlogin(1) rsh(1) rexec(3) rexecd(8) rlogind(8) rshd(8) 3 . . : . 6.18 21 2025 rcmd(3)