*/
#include "amanda.h"
+#include "match.h"
#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 amandad has to start up
"LOCAL",
local_connect,
sec_accept,
+ sec_get_authenticated_peer_name_localhost,
sec_close,
stream_sendpkt,
stream_recvpkt,
auth_debug(1, _("local: local_connect: %s\n"), hostname);
- rh = alloc(SIZEOF(*rh));
+ rh = g_new0(struct sec_handle, 1);
security_handleinit(&rh->sech, &local_security_driver);
rh->hostname = NULL;
rh->rs = NULL;
error:
(*fn)(arg, &rh->sech, S_ERROR);
+ amfree(rh->hostname);
}
/*
runlocal(
struct tcp_conn * rc,
const char * amandad_path,
- const char * client_username)
+ const char * client_username G_GNUC_UNUSED)
{
int rpipe[2], wpipe[2];
char *xamandad_path = (char *)amandad_path;
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);
#ifndef SINGLE_USERID
if (uid != 0)