NULL
};
-int mac_smack_use(void)
-{
- static int cached_use = -1;
-
- if (cached_use < 0)
- cached_use = access("/sys/fs/smackfs/", F_OK) >= 0;
-
- return cached_use;
-}
-
static int stop_process(char *username)
{
int r;
return 0;
}
-static int normal_user_preprocess(char *username)
-{
- int r;
-
- r = unshare(CLONE_NEWNS);
- if (r < 0) {
- fprintf(stderr, "unshare failed\n");
- return r;
- }
-
- r = mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL);
- if (r < 0) {
- fprintf(stderr, "Failed to change the propagation type of root to SLAVE\n");
- return r;
- }
-
- return 0;
-}
-
static int normal_user_postprocess(char *username)
{
int r;
return -2;
}
- /* pre-processing */
- r = normal_user_preprocess(username);
- if (r < 0) {
- fprintf(stderr, "normal user preprocess failed\n");
- return r;
- }
-
/* If container supports below funcs, below line should be enabled. */
support_container = (access(CONTAINER_LIB, F_OK) == 0) ? 1 : 0;
if (support_container) {