(possible) bug: pledging (v1.9) non-cosmo '/usr/bin/ls' (9.5) on linux displays permission errors and lists files #1314
Labels
low severity
Used to report low severity bugs (e.g. cosmetic issues, non critical UI glitches)
What happened?
Hello,
This may or may not be a bug, depending on whether or not pledging non-cosmopolitan binaries (i.e.
/usr/bin/ls
) is supported. The cosmopolitanls
works as expected.I was testing out
pledge
withls
and I noticed the following../pledge -v r:$HOME/Downloads/bin -p 'stdio rpath' ls -lah
displays permission errors and lists files../pledge -k -v r:$HOME/Downloads/bin -p 'stdio rpath' ls -lah
fails with a 'Bad system call' (-k flag) (it kills on EPERM, which makes sense)The permissions in the directory are
r-x
, and contain the cosmopolitan binaries. The output of both commands with--ftrace
look identical (other than additional output including the permission errors and list of files)Additional info:
The coredump with
-k
shows:Adding
tty
to the pledge list, and rerunning, produces a coredump with:Finally, adding
fattr
to the pledge list still produces the bad system call error whenlistxattr
is called.Version
Cosompolitan Pledge v1.9
/usr/bin/ls --version
ls (GNU coreutils) 9.5
What operating system are you seeing the problem on?
Linux
Relevant log output
The text was updated successfully, but these errors were encountered: