move the last crypt-* things into lib-crypt, adapt configure.ac
[apps/madmutt.git] / mutt_tunnel.c
index db5f50e..a37fa11 100644 (file)
 # include "config.h"
 #endif
 
+#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
+
 #include "mutt.h"
 #include "mutt_socket.h"
 #include "mutt_tunnel.h"
 
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/str.h"
 
 #include <netinet/in.h>
 #include <sys/types.h>
@@ -59,7 +60,7 @@ static int tunnel_socket_open (CONNECTION * conn)
   int rc;
   int pin[2], pout[2];
 
-  tunnel = (TUNNEL_DATA *) safe_malloc (sizeof (TUNNEL_DATA));
+  tunnel = p_new(TUNNEL_DATA, 1);
   conn->sockdata = tunnel;
 
   mutt_message (_("Connecting with \"%s\"..."), Tunnel);
@@ -87,7 +88,7 @@ static int tunnel_socket_open (CONNECTION * conn)
     /* Don't let the subprocess think it can use the controlling tty */
     setsid ();
 
-    execl (EXECSHELL, "sh", "-c", Tunnel, NULL);
+    execl ("/bin/sh", "sh", "-c", Tunnel, NULL);
     _exit (127);
   }
   mutt_unblock_signals_system (1);
@@ -129,7 +130,7 @@ static int tunnel_socket_close (CONNECTION * conn)
                NONULL(mutt_strsysexit(WEXITSTATUS(status))));
     mutt_sleep (2);
   }
-  FREE (&conn->sockdata);
+  p_delete(&conn->sockdata);
   return 0;
 }