aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/chroot.c5
-rw-r--r--toys/other/login.c3
-rw-r--r--toys/other/modinfo.c2
-rw-r--r--toys/other/vconfig.c2
-rw-r--r--toys/other/vmstat.c3
5 files changed, 15 insertions, 0 deletions
diff --git a/toys/other/chroot.c b/toys/other/chroot.c
index e82dd803..4260d98f 100644
--- a/toys/other/chroot.c
+++ b/toys/other/chroot.c
@@ -1,6 +1,11 @@
/* chroot.c - Run command in new root directory.
*
* Copyright 2007 Rob Landley <rob@landley.net>
+ *
+ * TODO: The test for root is "==" so root can trivially escape a chroot by
+ * moving it below cwd, ala mkdir("sub"); chroot("sub"); chdir("../../../..")
+ * The container guys use pivot_root() to deal with this, which does actually
+ * edit mount tree. (New option? Kernel patch?)
USE_CHROOT(NEWTOY(chroot, "^<1", TOYFLAG_USR|TOYFLAG_SBIN))
diff --git a/toys/other/login.c b/toys/other/login.c
index 837dd977..b728286b 100644
--- a/toys/other/login.c
+++ b/toys/other/login.c
@@ -4,6 +4,9 @@
*
* No support for PAM/securetty/selinux/login script/issue/utmp
* Relies on libcrypt for hash calculation.
+ *
+ * TODO: this command predates "pending" but needs cleanup. It #defines
+ * random stuff, calls exit() form a signal handler... yeah.
USE_LOGIN(NEWTOY(login, ">1fph:", TOYFLAG_BIN))
diff --git a/toys/other/modinfo.c b/toys/other/modinfo.c
index a7e6b4bc..3a7e821f 100644
--- a/toys/other/modinfo.c
+++ b/toys/other/modinfo.c
@@ -1,6 +1,8 @@
/* modinfo.c - Display module info
*
* Copyright 2012 Andre Renaud <andre@bluewatersys.com>
+ *
+ * TODO: cleanup
USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_BIN))
diff --git a/toys/other/vconfig.c b/toys/other/vconfig.c
index eff918c1..fd785273 100644
--- a/toys/other/vconfig.c
+++ b/toys/other/vconfig.c
@@ -4,6 +4,8 @@
* Copyright 2012 Kyungwan Han <asura321@gmail.com>
*
* No standard
+ *
+ * TODO: cleanup
USE_VCONFIG(NEWTOY(vconfig, "<2>4", TOYFLAG_NEEDROOT|TOYFLAG_SBIN))
diff --git a/toys/other/vmstat.c b/toys/other/vmstat.c
index eed79459..c11e46b1 100644
--- a/toys/other/vmstat.c
+++ b/toys/other/vmstat.c
@@ -1,6 +1,9 @@
/* vmstat.c - Report virtual memory statistics.
*
* Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
+ *
+ * TODO: I have no idea how the "io" and "system" categories are calculated.
+ * whatever we're doing isn't matching what other implementations are doing.
USE_VMSTAT(NEWTOY(vmstat, ">2n", TOYFLAG_BIN))