[Spice-devel] [spice-common 2/8] backtrace: Don't attempt to call seteuid(0)

Christophe Fergeau cfergeau at redhat.com
Mon Jan 6 03:22:08 PST 2014


We are mostly likely not running as root, so this call will fail. As we are
supposed to check its return value as it's declared with
warn_unused_result, the current way of using it is wrong, so this commit just
removes the call.
---
 common/backtrace.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/backtrace.c b/common/backtrace.c
index 305bbad..1b7fab3 100644
--- a/common/backtrace.c
+++ b/common/backtrace.c
@@ -78,7 +78,6 @@ static int spice_backtrace_gstack(void)
         /* CHILD */
         char parent[16];
 
-        seteuid(0);
         close(STDIN_FILENO);
         close(STDOUT_FILENO);
         dup2(pipefd[1],STDOUT_FILENO);
-- 
1.8.4.2



More information about the Spice-devel mailing list