skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

trychroot.c (257B)


      1 /* ISC license. */
      2 
      3 #undef _POSIX_C_SOURCE
      4 #undef _XOPEN_SOURCE
      5 
      6 #ifndef _BSD_SOURCE
      7 #define _BSD_SOURCE
      8 #endif
      9 
     10 #ifndef _DEFAULT_SOURCE
     11 #define _DEFAULT_SOURCE
     12 #endif
     13 
     14 #include <unistd.h>
     15 
     16 int main (void)
     17 {
     18   if (chroot("/") < 0) return 1 ;
     19   return 0 ;
     20 }