shithub: gefs

Download patch

ref: 1d87f43466480d3f9200260d88ea3d07bcb527a6
parent: ab70b494791bbd0acdc395225db38b46012f8da8
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Nov 22 22:08:51 EST 2023

fs: error when attempting permissive mount as non-adm

--- a/fs.c
+++ b/fs.c
@@ -964,8 +964,11 @@
 	f.duid = d.uid;
 	f.dgid = d.gid;
 	f.dmode = d.mode;
-	if(m->aname[0] == '%' && ingroup(uid, admid))
+	if(m->aname[0] == '%'){
+		if(!ingroup(uid, admid))
+			error(Eperm);
 		f.permit = 1;
+	}
 	if(dupfid(m->conn, m->fid, &f) == nil)
 		error(Efid);