Serenity Operating System
at master 20 lines 442 B view raw
1/* 2 * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <LibCore/System.h> 8#include <LibMain/Main.h> 9#include <stdio.h> 10#include <unistd.h> 11 12ErrorOr<int> serenity_main(Main::Arguments) 13{ 14 TRY(Core::System::pledge("stdio rpath")); 15 TRY(Core::System::unveil("/etc/passwd", "r")); 16 TRY(Core::System::unveil(nullptr, nullptr)); 17 18 puts(getlogin()); 19 return 0; 20}