git: 9front

Download patch

ref: c7c0d55b0ce91b19c1797a1dd0f7ac3e6875e990
parent: 6efb760e3b7173c782f6618b8bd32a796e7392da
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Apr 2 16:52:34 EDT 2024

ext4srv: fix ..-walk from a dir under root

--- a/sys/src/cmd/ext4srv/ext4srv.c
+++ b/sys/src/cmd/ext4srv/ext4srv.c
@@ -712,6 +712,8 @@
 
 	s = isroot ? estrdup9p(name) : smprint("%s/%s", a->path, name);
 	cleanname(s);
+	if(s[0] == '.' && s[1] == 0) /* special case - root */
+		*s = 0;
 	if(ext4_raw_inode_fill(mp, s, &ino, &inode) < 0)
 		goto err;
 	t = ext4_inode_type(a->p->sb, &inode);
--