Advertisement
fangfufu

Restricted shell for SSH tunnel users

Nov 16th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <signal.h>
  4. #include <stdlib.h>
  5. void sig_handler(int signo)
  6. {
  7. if (signo == SIGHUP)
  8. exit(0);
  9. }
  10.  
  11. int main()
  12. {
  13. printf("OK\n");
  14. while(1)
  15. sleep(1);
  16. exit(0);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement