`erd --long` crashes when attempting to display user/group info for nonexistant group/user
nwoythal opened this issue · 0 comments
nwoythal commented
I have a file on my filesystem that is owned by a GID that doesn't exist locally (but does inside a container) -- when erd
attempts to fetch the data from this file, a SIGSEGV is generated:
$ touch foo
$ sudo chown :9999 foo
$ ls -plaht foo
-rw-rw-r-- 1 natewo 9999 0 Jun 7 11:54 foo
$ erd --no-config --long foo
[1] 1025586 segmentation fault (core dumped) erd foo
$ sudo chown 9999:natewo foo
$ ls -plaht foo
-rw-rw-r-- 1 9999 natewo 0 Jun 7 11:54 foo
$ erd --no-config --long foo
[1] 1025644 segmentation fault (core dumped) erd fo
FWIW I know very little about rust, but it seems to be coming from src/fs/ug.rs:try_get_user
/src/fs/ug.rs:try_get_group