3 struct rootjail
* chrootjail_Init(){
4 struct rootjail
*this = (struct rootjail
*) g_malloc(sizeof(struct rootjail
));
5 rootjailContext_Init(&this->_fsm
, this);
7 this->newroot
= g_string_new("");
10 void rootjail_savepid(struct rootjail
*this, int pid
){
13 void rootjail_savenewroot(struct rootjail
*this, char *newroot
){
14 g_string_printf(this->newroot
, newroot
);
16 void rootjail_destroyfsm(struct rootjail
*this){
17 //remove fsm from fsm_list
19 g_string_free(this->newroot
,TRUE
);
22 void rootjail_warning(struct rootjail
*this){
23 printf("WARNING: pid %d attempted to open a file before calling chdir()\n", this->pid
);
25 int checknewdir(char * newdir
){
26 if(!strcmp(newdir
, "/"))//returns 0 when strings are equal
30 int thisprocess(struct rootjail
*this, int pid
){
This page took 0.031271 seconds and 4 git commands to generate.