mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Check return code of setuid() in traceroute.
While it will not fail in normal circumstances, better safe than sorry. Reported by: LLVM's clang static analyzer MFC after: 3 days
This commit is contained in:
parent
c65c068a5f
commit
04e7229db5
1 changed files with 4 additions and 1 deletions
|
|
@ -509,7 +509,10 @@ main(int argc, char **argv)
|
|||
sockerrno = errno;
|
||||
}
|
||||
|
||||
setuid(getuid());
|
||||
if (setuid(getuid()) != 0) {
|
||||
perror("setuid()");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef IPCTL_DEFTTL
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue