setpriv
on Linux supports Landlock.If this twt goes through, then restricting the filesystem so that jenny can only write to
~/Mail/twt
, ~/www/twtxt.txt
, ~/.jenny-cache
, and /tmp
works.
# I am the Watcher. I am your guide through this vast new twtiverse. # # Usage: # https://watcher.sour.is/api/plain/users View list of users and latest twt date. # https://watcher.sour.is/api/plain/twt View all twts. # https://watcher.sour.is/api/plain/mentions?uri=:uri View all mentions for uri. # https://watcher.sour.is/api/plain/conv/:hash View all twts for a conversation subject. # # Options: # uri Filter to show a specific users twts. # offset Start index for quey. # limit Count of items to return (going back in time). # # twt range = 1 4 # self = https://watcher.sour.is/conv/3tcq7ra
setpriv
on Linux supports Landlock.~/Mail/twt
, ~/www/twtxt.txt
, ~/.jenny-cache
, and /tmp
works.
--landlock-access fs
says that nothing is allowed.--landlock-rule path-beneath:execute,read-file:/bin/ls-static
says that reading and executing that file is allowed. It’s a statically linked ls
program (not GNU ls).--landlock-rule path-beneath:read-dir:/tmp
says that reading the /tmp
directory and everything below it is allowed.ls-static
program is this line:stat()
on it and everything, the little x
indicates that getting xattrs also worked.3000
and 200
are user name and group name – they are shown as numeric, because the program does not have access to /etc/passwd
and /etc/group
.--landlock-rule path-beneath:read-file:/etc/passwd
, for example, allows resolving users and yields this: