| #ifndef VSF_SYSDEPUTIL_H |
| #define VSF_SYSDEPUTIL_H |
| |
| #ifndef VSF_FILESIZE_H |
| #include "filesize.h" |
| #endif |
| |
| |
| |
| |
| |
| |
| |
| struct mystr; |
| |
| |
| |
| int vsf_sysdep_check_auth(struct mystr* p_user, |
| const struct mystr* p_pass, |
| const struct mystr* p_remote_host); |
| |
| |
| int vsf_sysdep_has_capabilities(void); |
| int vsf_sysdep_has_capabilities_as_non_root(void); |
| void vsf_sysdep_keep_capabilities(void); |
| enum ESysdepCapabilities |
| { |
| kCapabilityCAP_CHOWN = 1, |
| kCapabilityCAP_NET_BIND_SERVICE = 2 |
| |
| }; |
| void vsf_sysdep_adopt_capabilities(unsigned int caps); |
| |
| |
| |
| |
| int vsf_sysutil_sendfile(const int out_fd, const int in_fd, |
| filesize_t* p_offset, filesize_t num_send, |
| unsigned int max_chunk); |
| |
| |
| |
| |
| |
| void vsf_sysutil_setproctitle_init(int argc, const char* argv[]); |
| void vsf_sysutil_setproctitle(const char* p_text); |
| void vsf_sysutil_setproctitle_str(const struct mystr* p_str); |
| void vsf_sysutil_set_proctitle_prefix(const struct mystr* p_str); |
| |
| |
| void vsf_sysutil_map_anon_pages_init(void); |
| void* vsf_sysutil_map_anon_pages(unsigned int length); |
| |
| |
| void vsf_sysutil_send_fd(int sock_fd, int send_fd); |
| int vsf_sysutil_recv_fd(int sock_fd); |
| |
| |
| void vsf_set_die_if_parent_dies(); |
| |
| void vsf_set_term_if_parent_dies(); |
| |
| |
| |
| int vsf_sysutil_fork_isolate_failok(); |
| |
| |
| |
| int vsf_sysutil_fork_isolate_all_failok(); |
| |
| |
| int vsf_sysutil_fork_newnet(); |
| int vsf_sysutil_getpid_nocache(); |
| |
| #endif |
| |