From 15b97c7b48b33df170b9b7512bb42be389f0f0c3 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Sat, 31 May 2014 17:44:05 -0500 Subject: [PATCH] rrdtool: fix mis-use of getuid Checking whether the application is running with root privileges requires use of geteuid(), not getuid(). Signed-off-by: Peter A. Bigot --- src/rrd_tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rrd_tool.c b/src/rrd_tool.c index a9543744..018e4c54 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -447,8 +447,8 @@ int main( if ((argc == 3) && strcmp("", argv[2])) { if ( -#ifdef HAVE_GETUID - getuid() +#ifdef HAVE_GETEUID + geteuid() #else 1 #endif -- 2.47.2