Re: [PATCH net-next v7 08/10] bpf: Add a Landlock sandbox example

From
Alban Crequy <hidden>
Date
2017-09-01 10:25:51
Also in
linux-api, linux-security-module, lkml
Reply to
Mickaël Salaün, 2017-08-21
Hi Mickaël,

On 21 August 2017 at 02:09, Mickaël Salaün [off-list ref] wrote:
Add a basic sandbox tool to create a process isolated from some part of
the system. This sandbox create a read-only environment. It is only
allowed to write to a character device such as a TTY:
...
quoted hunk ↗ jump to hunk
+       /*
+        * This check allows the action on the file if it is a directory or a
+        * pipe. Otherwise, a message is printed to the eBPF log.
+        */
+       if (S_ISCHR(ret) || S_ISFIFO(ret))
+               return 0;

The comment says "directory", but the code checks for "character device".

Thanks!
Alban
Thread (34 messages) 34 messages, 5 authors, last reply 2017-09-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help