ref: 5af9daea17daa01ad339e8f38909b5e44b047495
parent: de1a460fa13ed2bffbdc3cb046cc8831c1d22008
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);