Linux-VServer pastebin service

Posted by Anonymous on Wed 6th Sep 17:05
download | new post

  1. int  
  2. gr_pid_is_chrooted(struct task_struct *p)  
  3. {  
  4. #ifdef CONFIG_GRKERNSEC_CHROOT_FINDTASK  
  5.     if (!grsec_enable_chroot_findtask || !proc_is_chrooted(current) || !p || current->vxi == NULL)  
  6.         return 0;  
  7.  
  8.     task_lock(p);  
  9.     if ((p->exit_state & (EXIT_ZOMBIE | EXIT_DEAD)) ||  
  10.         !have_same_root(current, p)) {  
  11.         task_unlock(p);  
  12.         return 1;  
  13.     }  
  14.     task_unlock(p);  
  15. #endif  
  16.     return 0;  

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
Your Name

Remember my name in a cookie