Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libjail/jail.c
Show First 20 Lines • Show All 1,042 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
int kl; | int kl; | ||||
if (strcmp(name, "linux") == 0 || strncmp(name, "linux.", 6) == 0) | if (strcmp(name, "linux") == 0 || strncmp(name, "linux.", 6) == 0) | ||||
kl = kldload("linux"); | kl = kldload("linux"); | ||||
else if (strcmp(name, "sysvmsg") == 0 || strcmp(name, "sysvsem") == 0 || | else if (strcmp(name, "sysvmsg") == 0 || strcmp(name, "sysvsem") == 0 || | ||||
strcmp(name, "sysvshm") == 0) | strcmp(name, "sysvshm") == 0) | ||||
kl = kldload(name); | kl = kldload(name); | ||||
else { | else if (strncmp(name, "allow.mount.", 12) == 0) { | ||||
/* Load the matching filesystem */ | |||||
kl = kldload(name + 12); | |||||
if (kl < 0 && errno == ENOENT && | |||||
strncmp(name + 12, "no", 2) == 0) | |||||
kl = kldload(name + 14); | |||||
} else { | |||||
errno = ENOENT; | errno = ENOENT; | ||||
return (-1); | return (-1); | ||||
} | } | ||||
if (kl < 0 && errno == EEXIST) { | if (kl < 0 && errno == EEXIST) { | ||||
/* | /* | ||||
* In the module is already loaded, then it must not contain | * In the module is already loaded, then it must not contain | ||||
* the parameter. | * the parameter. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |