Skip to content

Commit

Permalink
Remove dubious condition on scriptlet exec()
Browse files Browse the repository at this point in the history
The check used to make some sense back in rpm < 4.12 where xx depended
on rpm_execcon() result, but even there it was only meaningful when
SELinux was enabled. It would seem to make sense to simply remove the
dubious check entirely.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
rpurdie authored and pmatilai committed Jun 11, 2018
1 parent d3fae43 commit b4667e9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rpmscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
/* XXX Don't mtrace into children. */
unsetenv("MALLOC_CHECK_");

if (xx == 0) {
xx = execv(argv[0], argv);
}
xx = execv(argv[0], argv);
}
_exit(127); /* exit 127 for compatibility with bash(1) */
}
Expand Down

0 comments on commit b4667e9

Please sign in to comment.