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
@ -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 New Issue
Block a user