summaryrefslogtreecommitdiff
path: root/Kernel/Jail.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2023-01-12 22:47:09 +0200
committerJelle Raaijmakers <jelle@gmta.nl>2023-04-24 12:15:29 +0200
commit8289759f1da4c8fa6a390b8e0138a4dd312d1442 (patch)
tree3d2f330f9c9761f27dfba69b625858daf0f60ac9 /Kernel/Jail.h
parentcf8875426d2aeaebc7ded4301c3c7be288ac53ad (diff)
downloadserenity-8289759f1da4c8fa6a390b8e0138a4dd312d1442.zip
Kernel: Allow configuring a Jail to not impose PID isolation restriction
This is quite useful for userspace applications that can't cope with the restriction, but it's still useful to impose other non-configurable restrictions by using jails.
Diffstat (limited to 'Kernel/Jail.h')
-rw-r--r--Kernel/Jail.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Jail.h b/Kernel/Jail.h
index 2f8355eccb..72817db310 100644
--- a/Kernel/Jail.h
+++ b/Kernel/Jail.h
@@ -28,10 +28,10 @@ AK_TYPEDEF_DISTINCT_ORDERED_ID(u64, JailIndex);
class Jail : public AtomicRefCounted<Jail> {
public:
- NonnullRefPtr<ProcessList> process_list();
+ RefPtr<ProcessList> process_list();
static RefPtr<Jail> find_by_index(JailIndex);
- static ErrorOr<NonnullRefPtr<Jail>> create(NonnullOwnPtr<KString> name);
+ static ErrorOr<NonnullRefPtr<Jail>> create(NonnullOwnPtr<KString> name, unsigned flags);
static ErrorOr<void> for_each_when_process_is_not_jailed(Function<ErrorOr<void>(Jail const&)> callback);
StringView name() const { return m_name->view(); }
@@ -41,7 +41,7 @@ public:
SpinlockProtected<size_t, LockRank::None>& attach_count() { return m_attach_count; }
private:
- Jail(NonnullOwnPtr<KString>, JailIndex, NonnullRefPtr<ProcessList>);
+ Jail(NonnullOwnPtr<KString>, JailIndex, RefPtr<ProcessList>);
NonnullOwnPtr<KString> m_name;
JailIndex const m_index;
@@ -52,7 +52,7 @@ public:
using List = IntrusiveListRelaxedConst<&Jail::m_list_node>;
private:
- NonnullRefPtr<ProcessList> const m_process_list;
+ RefPtr<ProcessList> const m_process_list;
SpinlockProtected<size_t, LockRank::None> m_attach_count { 0 };
};