summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed44be5)
raw | patch | inline | side by side (parent: ed44be5)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 30 Dec 2005 14:36:30 +0000 (14:36 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 30 Dec 2005 14:36:30 +0000 (14:36 +0000) |
program/src/rrd_tool.c | patch | blob | history |
diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c
index 22eb62f08e2a6c5579b0bb335b0a0b738fc68689..2e0bf9cf92e30b050887d48fec2e97b4dd5368d3 100644 (file)
--- a/program/src/rrd_tool.c
+++ b/program/src/rrd_tool.c
#endif
RemoteMode=1;
if ((argc == 3) && strcmp("",argv[2])){
- if (getuid()==0){
+
+ if (
+#ifdef HAVE_GETUID
+ getuid()
+#else
+ 1
+#endif
+ == 0 ){
+
#ifdef HAVE_CHROOT
chroot(argv[2]);
if (errno!=0){
#if ! defined(HAVE_CHROOT) || ! defined(HAVE_GETUID)
if (getuid()==0 && ! ChangeRoot){
printf("ERROR: chdir security problem - rrdtool is running as "
- "root an no chroot!\n");
+ "root but not chroot!\n");
return(1);
}
#endif
#if ! defined(HAVE_CHROOT) || ! defined(HAVE_GETUID)
if (getuid()==0 && ! ChangeRoot){
printf("ERROR: mkdir security problem - rrdtool is running as "
- "root an no chroot!\n");
+ "root but not chroot!\n");
return(1);
}
#endif