Allows servers to authenticate clients.
int ruserok (Host, RootUser, RemoteUser, LocalUser)
char * Host;
int RootUser;
char * RemoteUser,
* LocalUser;
The ruserok subroutine allows servers to authenticate clients requesting services.
Always specify the host name. If the local domain and remote domain are the same, specifying the domain parts is optional. To determine the domain of the host, use the gethostname subroutine.
Host | Specifies the name of a remote host. The ruserok subroutine checks for this host in the /etc/host.equiv file. Then, if necessary, the subroutine checks a file in the user's home directory at the server called /$HOME/.rhosts for a host and remote user ID. |
RootUser | Specifies a value to indicate whether the effective user ID of the calling process is a root user. A value of 0 indicates the process does not have a root user ID. A value of 1 indicates that the process has local root user privileges, and the /etc/hosts.equiv file is not checked. |
RemoteUser | Points to a user name that is valid at the remote host. Any valid user name can be specified. |
LocalUser | Points to a user name that is valid at the local host. Any valid user name can be specified. |
The ruserok subroutine returns a 0, if the subroutine successfully locates the name specified by the Host parameter in the /etc/hosts.equiv file or the IDs specified by the Host and RemoteUser parameters are found in the /$HOME/.rhosts file.
If the name specified by the Host parameter was not found, the ruserok subroutine returns a -1.
The ruserok subroutine is part of Base Operating System (BOS) Runtime.
All applications containing the ruserok subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.
/etc/services | Contains service names. |
/etc/host.equiv | Specifies foreign host names. |
/$HOME/.rhosts | Specifies the remote users of a local user account. |
The rlogind command, rshd command.
The gethostname subroutine, rcmd subroutine, rresvport subroutine, sethostname subroutine.
Sockets Overview in AIX 5L Version 5.1 Communications Programming Concepts.