Skip to content

Commit

Permalink
fix: don't expect /etc/passwd to be a file
Browse files Browse the repository at this point in the history
There's no guarantee we won't encounter a symlink in the traversal for
/etc/passwd, or any other directory for that matter. The only thing we
can guarantee is that "/" is "/", so I'm replacing the "passwd" test with
a new "root" test which verifies just that.
  • Loading branch information
limeytexan committed Feb 18, 2025
1 parent fb12542 commit f1bad90
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion tests/passwd

This file was deleted.

2 changes: 0 additions & 2 deletions tests/passwd.out

This file was deleted.

1 change: 1 addition & 0 deletions tests/root
2 changes: 2 additions & 0 deletions tests/root.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./tests/root -> /
/: directory
File renamed without changes.

0 comments on commit f1bad90

Please sign in to comment.