elf-util: do not ignore prctl() errors
We want to avoid loops, so fail and return if we can't disable core dumping CID#1467004
This commit is contained in:
committed by
Luca Boccassi
parent
a783421498
commit
541b127170
@@ -604,8 +604,11 @@ int parse_elf_object(int fd, const char *executable, bool fork_disable_dump, cha
|
||||
}
|
||||
if (r == 0) {
|
||||
/* We want to avoid loops, given this can be called from systemd-coredump */
|
||||
if (fork_disable_dump)
|
||||
prctl(PR_SET_DUMPABLE, 0);
|
||||
if (fork_disable_dump) {
|
||||
r = RET_NERRNO(prctl(PR_SET_DUMPABLE, 0));
|
||||
if (r < 0)
|
||||
goto child_fail;
|
||||
}
|
||||
|
||||
r = parse_core(fd, executable, ret ? &buf : NULL, ret_package_metadata ? &package_metadata : NULL);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user