Imported Upstream version 3.2.0
[debian/amanda] / common-src / bsd-security.c
index be023602e9fe1a39ab494dcb4e3b9aef3823c1f0..ad2929219e93031d2b060aa15cae0391edfadacb 100644 (file)
@@ -73,6 +73,7 @@ const security_driver_t bsd_security_driver = {
     "BSD",
     bsd_connect,
     bsd_accept,
+    sec_get_authenticated_peer_name_hostname,
     bsd_close,
     udpbsd_sendpkt,
     udp_recvpkt,
@@ -138,7 +139,7 @@ bsd_connect(
     (void)conf_fn;     /* Quiet unused parameter warning */
     (void)datap;        /* Quiet unused parameter warning */
 
-    bh = alloc(SIZEOF(*bh));
+    bh = g_new0(struct sec_handle, 1);
     bh->proto_handle=NULL;
     security_handleinit(&bh->sech, &bsd_security_driver);
 
@@ -398,7 +399,7 @@ bsd_stream_server(
 
     assert(bh != NULL);
 
-    bs = alloc(SIZEOF(*bs));
+    bs = g_new0(struct sec_stream, 1);
     security_streaminit(&bs->secstr, &bsd_security_driver);
     bs->socket = stream_server(SU_GET_FAMILY(&bh->udp->peer), &bs->port,
                               (size_t)STREAM_BUFSIZE, (size_t)STREAM_BUFSIZE,
@@ -453,7 +454,7 @@ bsd_stream_client(
 
     assert(bh != NULL);
 
-    bs = alloc(SIZEOF(*bs));
+    bs = g_new0(struct sec_stream, 1);
     security_streaminit(&bs->secstr, &bsd_security_driver);
     bs->fd = stream_client(bh->hostname, (in_port_t)id,
        STREAM_BUFSIZE, STREAM_BUFSIZE, &bs->port, 0);