# SPDX-FileCopyrightText: 2026 Progmasoft # SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 # cgit and git-http-backend read the mirrors and write only the cache of cgit; they reach no # network and keep no rights of their own. # # fcgiwrap runs in httpd_t (/usr/bin/fcgiwrap is httpd_exec_t), so Nginx may connect to it, and # cgit and git-http-backend move into git_script_t; the module in ../selinux allows that move under # NoNewPrivileges. [Service] NoNewPrivileges=yes ProtectSystem=strict ReadWritePaths=/var/cache/cgit ProtectHome=yes PrivateTmp=yes PrivateDevices=yes PrivateNetwork=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectKernelLogs=yes ProtectControlGroups=yes ProtectClock=yes ProtectHostname=yes ProtectProc=invisible ProcSubset=pid RestrictAddressFamilies=AF_UNIX RestrictNamespaces=yes RestrictRealtime=yes RestrictSUIDSGID=yes LockPersonality=yes MemoryDenyWriteExecute=yes SystemCallArchitectures=native SystemCallFilter=@system-service SystemCallFilter=~@privileged @resources CapabilityBoundingSet= AmbientCapabilities= UMask=0077