From: Enrico Scholz Date: Fri, 1 Oct 2004 10:57:34 +0000 (+0000) Subject: added warnings regarding procfs-security X-Git-Tag: IPSENTINEL_VERSION_0_12~277 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c153db573d5648ba62d29ae6f8eed6a87b8c9c4;hp=ae53d976e97aafa6640133059a4bc5fec069a393;p=util-vserver.git added warnings regarding procfs-security git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1715 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/src/vps.c b/util-vserver/src/vps.c index 48bfaa8..aae3bbf 100644 --- a/util-vserver/src/vps.c +++ b/util-vserver/src/vps.c @@ -28,6 +28,7 @@ #include #include #include +#include #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(); diff --git a/util-vserver/src/vserver-stat.c b/util-vserver/src/vserver-stat.c index d8ee389..17425c1 100644 --- a/util-vserver/src/vserver-stat.c +++ b/util-vserver/src/vserver-stat.c @@ -493,6 +493,12 @@ int main(int argc, char **argv) exit(1); } + 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"); + Vector_init(&xid_data, sizeof(struct XidData)); Echdir(PROC_DIR_NAME);