Dunno but here's some code to show/check you're chrooted:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
int main(int argc, char **argv) {
struct stat x;
if (stat("/", &x)) {
printf("Unable to stat /");
exit(EXIT_FAILURE);
}
if (x.st_ino==2) {
printf("NOT chrooted\n");
} else {
printf("chrooted OK\n");
}
exit(EXIT_SUCCESS);
}
As you see, basically check if the toplevel dir inode number equals "2".