-/* $OpenBSD: switchctl.c,v 1.1 2016/07/19 16:54:26 reyk Exp $ */
+/* $OpenBSD: switchctl.c,v 1.2 2016/07/20 21:04:44 reyk Exp $ */
/*
* Copyright (c) 2007-2015 Reyk Floeter <reyk@openbsd.org>
err(1, "connect: %s", sock);
}
+ /*
+ * pledge in switchctl:
+ * stdio - for malloc and basic I/O including events.
+ * dns - for parsehostport() in the device spec.
+ */
+ if (pledge("stdio dns", NULL) == -1)
+ err(1, "pledge");
+
if (res->ibuf != NULL)
ibuf = res->ibuf;
else