/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include int main(int, char**) { if (pledge("stdio rpath", nullptr) < 0) { perror("pledge"); return 1; } if (unveil("/etc/passwd", "r") < 0) { perror("unveil"); return 1; } unveil(nullptr, nullptr); puts(getlogin()); return 0; }