Skip to content

Instantly share code, notes, and snippets.

@zofrex
Created July 29, 2016 00:16
Show Gist options
  • Save zofrex/0ea5ec81eea294ec59efb83624037e06 to your computer and use it in GitHub Desktop.
Save zofrex/0ea5ec81eea294ec59efb83624037e06 to your computer and use it in GitHub Desktop.
let listener = TcpListener::bind("0.0.0.0:80");
let listener = match listener {
Ok(r) => r,
Err(_) => std::process::exit(1),
};
unsafe {
libc::setgid(501);
libc::setuid(501);
}
let _i = Iron::new(chain).http_on(listener).unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment