avoid some compiler warnings
[util-vserver.git] / util-vserver / src / vps.c
index 48bfaa8..aae3bbf 100644 (file)
@@ -28,6 +28,7 @@
 #include <assert.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <errno.h>
 
 #define ENSC_WRAPPERS_VSERVER  1
 #define ENSC_WRAPPERS_STDLIB   1
@@ -239,6 +240,12 @@ int main(int argc, char *argv[])
     exit(wrapper_exit_code);
   }
 
+  if (access("/proc/uptime",R_OK)==-1 && errno==ENOENT)
+    WRITE_MSG(2,
+             "WARNING: can not access /proc/uptime. Usually, this is caused by\n"
+             "         procfs-security. Please read the FAQ for more details\n"
+             "         http://www.linux-vserver.org/index.php?page=Linux-Vserver+FAQ\n");
+
   Epipe(p);
   pid = Efork();