From 0d7bbda9b93e4af3c512f835cc502a7e9a60c359 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 16 Jul 2018 01:35:02 +0200 Subject: [PATCH] devmnt: make sure auth chan is on said conection in mntattach() --- sys/src/9/port/devmnt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/src/9/port/devmnt.c b/sys/src/9/port/devmnt.c index 8ff159704..77a64c81a 100644 --- a/sys/src/9/port/devmnt.c +++ b/sys/src/9/port/devmnt.c @@ -307,6 +307,9 @@ mntattach(Chan *c, Chan *ac, char *spec, int flags) Mnt *m; Mntrpc *r; + if(ac != nil && ac->mchan != c) + error(Ebadusefd); + m = c->mux; if(m == nil){ mntversion(c, nil, 0, 0);