#include "util.h"
#include "event.h"
#include "packet.h"
-#include "queue.h"
#include "security.h"
#include "security-util.h"
#include "stream.h"
-#include "version.h"
/*
* Number of seconds ssh has to start up
void * arg,
void * datap)
{
+ int result;
struct sec_handle *rh;
char *amandad_path=NULL, *client_username=NULL, *ssh_keys=NULL;
rh->ev_timeout = NULL;
rh->rc = NULL;
+ /* get the canonical hostname */
rh->hostname = NULL;
- if (resolve_hostname(hostname, 0, NULL, &rh->hostname) || rh->hostname == NULL) {
+ if ((result = resolve_hostname(hostname, 0, NULL, &rh->hostname)) != 0
+ || rh->hostname == NULL) {
security_seterror(&rh->sech,
- _("%s: ssh could not resolve hostname"), hostname);
+ _("ssh_security could not find canonical name for '%s': %s"),
+ hostname, gai_strerror(result));
(*fn)(arg, &rh->sech, S_ERROR);
return;
}
return (0);
}
+ /* drop root privs for good */
+ set_root_privs(-1);
+
safe_fd(-1, 0);
if(!xamandad_path || strlen(xamandad_path) <= 1)
- xamandad_path = vstralloc(amlibexecdir, "/", "amandad",
- versionsuffix(), NULL);
+ xamandad_path = vstralloc(amlibexecdir, "/", "amandad", NULL);
if(!xclient_username || strlen(xclient_username) <= 1)
xclient_username = CLIENT_LOGIN;
if(!ssh_keys || strlen(ssh_keys) <= 1) {