10 #include <sys/types.h>
14 #define SPACE_FILE "/spaces/net"
15 #define VSERVERCONF "/etc/vservers/"
18 get_space_flag(xid_t xid) {
19 char *ctx_space_file, *space_name;
20 struct passwd *slice_user;
21 uint32_t space_flag = 0;
23 slice_user = getpwuid(xid);
28 ctx_space_file=(char *) malloc(sizeof(VSERVERCONF SPACE_FILE "Z")+strlen(slice_user->pw_name));
32 sprintf(ctx_space_file,VSERVERCONF "%s" SPACE_FILE, slice_user->pw_name);
34 if (access(ctx_space_file, F_OK)==0)
35 space_flag |= CLONE_NEWNET;