Serenity Operating System
1/*
2 * Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include <LibCore/SessionManagement.h>
8#include <LibCore/System.h>
9#include <LibMain/Main.h>
10#include <signal.h>
11
12ErrorOr<int> serenity_main(Main::Arguments)
13{
14 TRY(Core::System::pledge("stdio proc rpath"));
15 TRY(Core::System::unveil("/etc/passwd", "r"));
16 TRY(Core::System::unveil(nullptr, nullptr));
17
18 TRY(Core::SessionManagement::logout());
19
20 return 0;
21}