httpd2 icon indicating copy to clipboard operation
httpd2 copied to clipboard

try using libc::setgroups for macOS

Open jedahan opened this issue 2 years ago • 0 comments

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.

jedahan avatar Jan 16 '24 21:01 jedahan