#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