diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-07-24 03:24:42 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-07-24 03:24:42 +0200 |
commit | 409babb990a4740e5274b22d65cb4df451a277fd (patch) | |
tree | ff36a6c0aad5b5bf960540e5d755241fefe11608 /sys/src/9/port | |
parent | 8173223f439546685f0cc4471efc9a9d12fccf4c (diff) |
devtls, devssl: make sure channel has ORDWR mode and is not a mount chan on fdtochan()
Diffstat (limited to 'sys/src/9/port')
-rw-r--r-- | sys/src/9/port/devssl.c | 2 | ||||
-rw-r--r-- | sys/src/9/port/devtls.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/port/devssl.c b/sys/src/9/port/devssl.c index 9c46a8fde..32b207618 100644 --- a/sys/src/9/port/devssl.c +++ b/sys/src/9/port/devssl.c @@ -1436,7 +1436,7 @@ buftochan(char *p) fd = strtoul(p, 0, 0); if(fd < 0) error(Ebadarg); - c = fdtochan(fd, -1, 0, 1); /* error check and inc ref */ + c = fdtochan(fd, ORDWR, 1, 1); /* error check and inc ref */ if(devtab[c->type] == &ssldevtab){ cclose(c); error("cannot ssl encrypt devssl files"); diff --git a/sys/src/9/port/devtls.c b/sys/src/9/port/devtls.c index f5d4fa493..81f50d3a6 100644 --- a/sys/src/9/port/devtls.c +++ b/sys/src/9/port/devtls.c @@ -1872,7 +1872,7 @@ buftochan(char *p) fd = strtoul(p, 0, 0); if(fd < 0) error(Ebadarg); - c = fdtochan(fd, -1, 0, 1); /* error check and inc ref */ + c = fdtochan(fd, ORDWR, 1, 1); /* error check and inc ref */ return c; } |