From: Diego Nieto Cid <[email protected]> ../../sutils/smp.c: In function 'smp': ../../sutils/smp.c:64:3: warning: ignoring return value of 'setuid' declared with attribute 'warn_unused_result' [-Wunused-result] --- sutils/smp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sutils/smp.c b/sutils/smp.c index b3306a19..b8ca9a75 100644 --- a/sutils/smp.c +++ b/sutils/smp.c @@ -61,7 +61,9 @@ smp (char * const argv[]) /* Drop privileges from suid binary */ mach_port_deallocate (mach_task_self (), _hurd_host_priv); - setuid (getuid ()); + err = setuid (getuid ()); + if (err == -1) + error (1, errno, "failed to drop privileges"); execve (argv[0], argv, environ); -- 2.51.0
