summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/exec.c')
-rw-r--r--usr.sbin/ppp/exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ppp/exec.c b/usr.sbin/ppp/exec.c
index de9e632..80f8343 100644
--- a/usr.sbin/ppp/exec.c
+++ b/usr.sbin/ppp/exec.c
@@ -77,12 +77,13 @@ static struct device execdevice = {
NULL,
NULL,
NULL,
+ NULL,
NULL
};
struct device *
exec_iov2device(int type, struct physical *p, struct iovec *iov,
- int *niov, int maxiov)
+ int *niov, int maxiov, int *auxfd, int *nauxfd)
{
if (type == EXEC_DEVICE) {
free(iov[(*niov)++].iov_base);
@@ -99,6 +100,8 @@ exec_Create(struct physical *p)
if (p->fd < 0 && *p->name.full == '!') {
int fids[2];
+ p->fd--; /* We own the device but maybe can't use it - change fd */
+
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fids) < 0)
log_Printf(LogPHASE, "Unable to create pipe for line exec: %s\n",
strerror(errno));
OpenPOWER on IntegriCloud