shithub: gefs

Download patch

ref: 19164adc27457c74995ef12323e8d269b81618fd
parent: 6a2f4b2d138dab8a06813ae6ac6ce2077153bd60
author: Michael Forney <mforney@mforney.org>
date: Wed Mar 2 03:49:34 EST 2022

fs: fix qid type check in wstat
wstat should not reject files with other qid types like QTAPPEND or
QTTMP.

Use 'unknown mode' for this error rather than 'unknown fid'.

--- a/fs.c
+++ b/fs.c
@@ -942,8 +942,8 @@
 	de = f->dent;
 	k = f->dent->Key;
 	wlock(de);
-	if(f->dent->qid.type != QTDIR && f->dent->qid.type != QTFILE){
-		rerror(m, Efid);
+	if(f->dent->qid.type & QTAUTH){
+		rerror(m, Emode);
 		goto Out;
 	}
 	if(convM2D(m->stat, m->nstat, &d, strs) <= BIT16SZ){