summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 56f6cd5)
raw | patch | inline | side by side (parent: 56f6cd5)
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) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@735 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_tool.c | patch | blob | history |
diff --git a/src/rrd_tool.c b/src/rrd_tool.c
index 22eb62f08e2a6c5579b0bb335b0a0b738fc68689..2e0bf9cf92e30b050887d48fec2e97b4dd5368d3 100644 (file)
--- a/src/rrd_tool.c
+++ b/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