Created
July 29, 2016 00:16
-
-
Save zofrex/0ea5ec81eea294ec59efb83624037e06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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