/[path-sandbox]/trunk/libsandbox/wrapper-funcs/execve.c
Gentoo

Diff of /trunk/libsandbox/wrapper-funcs/execve.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 409 Revision 410
13static int (*WRAPPER_TRUE_NAME)(WRAPPER_ARGS) = NULL; 13static int (*WRAPPER_TRUE_NAME)(WRAPPER_ARGS) = NULL;
14 14
15/* See to see if this an ELF and if so, is it static which we can't wrap */ 15/* See to see if this an ELF and if so, is it static which we can't wrap */
16void check_exec(const char *filename) 16void check_exec(const char *filename)
17{ 17{
18 int color = ((is_env_on(ENV_NOCOLOR)) ? 0 : 1);
19 int fd; 18 int fd;
20 unsigned char *elf; 19 unsigned char *elf;
21 struct stat st; 20 struct stat st;
22 21
23 fd = open(filename, O_RDONLY); 22 fd = open(filename, O_RDONLY);
48}) 47})
49 if (elf[EI_CLASS] == ELFCLASS32) 48 if (elf[EI_CLASS] == ELFCLASS32)
50 PARSE_ELF(32); 49 PARSE_ELF(32);
51 else 50 else
52 PARSE_ELF(64); 51 PARSE_ELF(64);
53 SB_EWARN(color, "QA: Static ELF", " %s\n", filename); 52 SB_EWARN("QA: Static ELF", " %s\n", filename);
54 done: 53 done:
55 54
56 out_mmap: 55 out_mmap:
57 munmap(elf, st.st_size); 56 munmap(elf, st.st_size);
58 out_fd: 57 out_fd:

Legend:
Removed from v.409  
changed lines
  Added in v.410

  ViewVC Help
Powered by ViewVC 1.1.20