httpd2
httpd2 copied to clipboard
try using libc::setgroups for macOS
This is a draft because
a. I only have a cursory understanding of groups and dropping privileges b. I never have called libc directly before c. hard-coded the length of &gid.as_raw() to be 1, need to read what length is actually supposed to be (with u32, is length 4? 1? machine-dependent?) d. raw pointer reference might be incorrect (instead of referring to memory address of the u32, it takes the group as the address)
but, at least cargo build works on macos and i was able to run /target/release/httpd2 --upgrade . in the source directory and things just worked.