shithub: gefs

Download patch

ref: 1dc33dd936c0a90dc06dd3286698df8b4d770ad4
parent: 9e424a38e935655dc2c755056afb54e2840c0855
author: Ori Bernstein <ori@eigenstate.org>
date: Sun May 12 19:08:57 EDT 2024

fs: QTAUTH is a bit flag, not a special value

--- a/fs.c
+++ b/fs.c
@@ -644,7 +644,7 @@
 
 	if(de == nil)
 		return;
-	if(de->qid.type == QTAUTH && adec(&de->ref) == 0){
+	if(de->qid.type & QTAUTH && adec(&de->ref) == 0){
 		free(de);
 		return;
 	}
@@ -2078,10 +2078,10 @@
 	}
 	if(f->dent->gone)
 		error(Ephase);
-	if(f->dent->qid.type == QTAUTH){
+	if(f->dent->qid.type & QTAUTH){
 		authwrite(f, &r, m->data, m->count);
 		goto Out;
-	}		
+	}	
 
 	w = 0;
 	p = m->data;