Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/imgact_binmisc.c
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | imgact_binmisc_exec(struct image_params *imgp) | ||||
const char *image_header = imgp->image_header; | const char *image_header = imgp->image_header; | ||||
const char *fname = NULL; | const char *fname = NULL; | ||||
int error = 0; | int error = 0; | ||||
size_t offset, l; | size_t offset, l; | ||||
imgact_binmisc_entry_t *ibe; | imgact_binmisc_entry_t *ibe; | ||||
struct sbuf *sname; | struct sbuf *sname; | ||||
char *s, *d; | char *s, *d; | ||||
/* | |||||
* This image activator doesn't support an explicit interpreter. | |||||
*/ | |||||
if (imgp->args->interpreter != -1) { | |||||
return (EINVAL); | |||||
} | |||||
/* Do we have an interpreter for the given image header? */ | /* Do we have an interpreter for the given image header? */ | ||||
sx_slock(&interp_list_sx); | sx_slock(&interp_list_sx); | ||||
if ((ibe = imgact_binmisc_find_interpreter(image_header)) == NULL) { | if ((ibe = imgact_binmisc_find_interpreter(image_header)) == NULL) { | ||||
sx_sunlock(&interp_list_sx); | sx_sunlock(&interp_list_sx); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
/* No interpreter nesting allowed. */ | /* No interpreter nesting allowed. */ | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |