Check return code of setuid() in timedc.
While it will not fail in normal circumstances, better safe than sorry. MFC after: 3 days
This commit is contained in:
parent
11522ca501
commit
1ae2ca130d
@ -75,7 +75,8 @@ main(argc, argv)
|
||||
*/
|
||||
if (priv_resources() < 0)
|
||||
errx(1, "could not get privileged resources");
|
||||
(void) setuid(getuid());
|
||||
if (setuid(getuid()) != 0)
|
||||
err(1, "setuid()");
|
||||
|
||||
if (--argc > 0) {
|
||||
c = getcmd(*++argv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user