security.h (684B)
1 #ifndef GITOUT_SECURITY_H_ 2 #define GITOUT_SECURITY_H_ 3 4 #include <stdlib.h> 5 6 // Limit access to only the specified paths. 7 // 8 // No effect on OSes other than OpenBSD. 9 void restrict_filesystem_access(const char* readonly_paths[], 10 size_t readonly_paths_count, 11 const char* readwrite_paths[], 12 size_t readwrite_paths_count); 13 14 typedef enum { 15 kGitout, 16 kGitoutWithCachefile, 17 kGitoutIndex, 18 } RestrictionType; 19 20 // Limits system operations to the minimum required. 21 // 22 // No effect on OSes other than OpenBSD. 23 void restrict_system_operations(RestrictionType type); 24 25 #endif // GITOUT_SECURITY_H_