remctl_open

Langue: en

Version: 2007-09-01 (fedora - 06/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

remctl_open - Connect to a remote remctl server

SYNOPSIS

#include <remctl.h>

int remctl_open(struct remctl *r, const char *host,
                   unsigned short port,
                   const char *principal);

DESCRIPTION

remctl_open() opens a TCP connection to the given host on the given port and then authenticates using the remctl protocol and the service principal principal. r is a remctl struct created via remctl_new(). host must not be NULL. If port is 0, the library first attempts to connect to the registered port of 4373 and then tries the legacy port of 4444 if that fails. Future versions of the library will drop this fallback to 4444. If principal is NULL, a service principal of "host/host" in the default local realm is used.

The remctl protocol uses Kerberos v5 via GSS-API for authentication. The underlying GSS-API library will use the default ticket cache for authentication, so to successfully use remctl_open(), the caller should already have Kerberos tickets for an appropriate realm stored in its default ticket cache. The environment variable KRB5CCNAME can be used to control which ticket cache is used.

RETURN VALUE

remctl_open() returns true on success and false on failure. On failure, the caller should call remctl_error() to retrieve the error message.

CAVEATS

The default behavior, when a port of 0 is given, of trying 4373 and falling back to 4444 will be removed in a future version of this library in favor of using the "remctl" service in /etc/services if set and then falling back on only 4373. 4444 was the poorly-chosen original remctl port and should be phased out.

NOTES

The remctl port number, 4373, was derived by tracing the diagonals of a QWERTY keyboard up from the letters "remc" to the number row.

SEE ALSO

remctl_new(3), remctl_error(3)

The current version of the remctl library and complete details of the remctl protocol are available from its web page at <http://www.eyrie.org/~eagle/software/remctl/>.

AUTHOR

Russ Allbery <rra@stanford.edu>