shithub: gefs

Download patch

ref: 09112b83f8191e1567c06f27ba797fd690024396
parent: 06aaffddcaa0fbf9c814e0e87e85dcdcc54c6888
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 18 18:40:04 EST 2023

user: don't fall back to default users without permissive mode

--- a/TODO
+++ b/TODO
@@ -4,7 +4,6 @@
 
 *** important bits ***
 - repair tools
-- improve security with corrupted /adm files
 
 *** nice to have, can go without ***
 - non-adm controlled snapshots
--- a/user.c
+++ b/user.c
@@ -240,6 +240,11 @@
 			fprint(2, "keeping old table\n");
 			error(e);
 		}
+		if(!permissive){
+			fprint(2, "user table broken: %s\n", e);
+			fprint(2, "\tnot permissive: bailing\n");
+			error(e);
+		}
 		fprint(2, "user table broken: %s\n", e);
 		fprint(2, "\tfalling back to default\n");
 		parseusers(fd, "-1:adm::\n0:none::\n");