From 8289759f1da4c8fa6a390b8e0138a4dd312d1442 Mon Sep 17 00:00:00 2001 From: Liav A Date: Thu, 12 Jan 2023 22:47:09 +0200 Subject: 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. --- Kernel/Jail.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Kernel/Jail.h') 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 { public: - NonnullRefPtr process_list(); + RefPtr process_list(); static RefPtr find_by_index(JailIndex); - static ErrorOr> create(NonnullOwnPtr name); + static ErrorOr> create(NonnullOwnPtr name, unsigned flags); static ErrorOr for_each_when_process_is_not_jailed(Function(Jail const&)> callback); StringView name() const { return m_name->view(); } @@ -41,7 +41,7 @@ public: SpinlockProtected& attach_count() { return m_attach_count; } private: - Jail(NonnullOwnPtr, JailIndex, NonnullRefPtr); + Jail(NonnullOwnPtr, JailIndex, RefPtr); NonnullOwnPtr m_name; JailIndex const m_index; @@ -52,7 +52,7 @@ public: using List = IntrusiveListRelaxedConst<&Jail::m_list_node>; private: - NonnullRefPtr const m_process_list; + RefPtr const m_process_list; SpinlockProtected m_attach_count { 0 }; }; -- cgit v1.2.3