2021-10-10 22:04:14 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2022-09-06 04:16:25 +00:00
|
|
|
#include <LibCore/SessionManagement.h>
|
2021-11-23 15:07:18 +00:00
|
|
|
#include <LibCore/System.h>
|
|
|
|
#include <LibMain/Main.h>
|
2021-10-10 22:04:14 +00:00
|
|
|
#include <signal.h>
|
|
|
|
|
2021-11-23 15:07:18 +00:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
2021-10-10 22:04:14 +00:00
|
|
|
{
|
2021-11-27 22:26:34 +00:00
|
|
|
TRY(Core::System::pledge("stdio proc rpath"));
|
2021-11-23 15:07:18 +00:00
|
|
|
TRY(Core::System::unveil("/etc/passwd", "r"));
|
|
|
|
TRY(Core::System::unveil(nullptr, nullptr));
|
2021-10-10 22:04:14 +00:00
|
|
|
|
2022-09-06 04:16:25 +00:00
|
|
|
TRY(Core::SessionManagement::logout());
|
2021-10-10 22:04:14 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|