aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/password.c2
-rw-r--r--lib/pending.h2
-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
-rw-r--r--toys/pending/README10
-rw-r--r--toys/posix/cut.c4
-rw-r--r--toys/posix/du.c2
-rw-r--r--toys/posix/touch.c4
-rw-r--r--toys/posix/xargs.c2
12 files changed, 31 insertions, 10 deletions
diff --git a/lib/password.c b/lib/password.c
index 9654d42d..bf13c441 100644
--- a/lib/password.c
+++ b/lib/password.c
@@ -1,6 +1,8 @@
/* password.c - password read/update helper functions.
*
* Copyright 2012 Ashwini Kumar <ak.ashwini@gmail.com>
+ *
+ * TODO: cleanup
*/
#include "toys.h"
diff --git a/lib/pending.h b/lib/pending.h
index c67d81c8..ffbd0256 100644
--- a/lib/pending.h
+++ b/lib/pending.h
@@ -4,3 +4,5 @@
#define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0'
int read_password(char * buff, int buflen, char* mesg);
int update_password(char *filename, char* username, char* encrypted);
+
+// TODO this goes away when lib/password.c cleaned up
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))
diff --git a/toys/pending/README b/toys/pending/README
index 0257e2bb..2eb83e11 100644
--- a/toys/pending/README
+++ b/toys/pending/README
@@ -7,14 +7,8 @@ Code in this directory may or may not work, some of the commands here are
unfinished stubs, others just need a more thorough inspection than we've had
time for yet. Everything in here defaults to "n" in defconfig.
-Library code awaiting cleanup lives in lib/pending.c
-
-The following commands predate the pending directory, and are awaiting
-cleanup but don't live here:
-
- vmstat, login, du, vconfig, chroot, cut, touch, modinfo, xargs
-
- lib/password.c
+Outside of this directory, several commands (and some library code) have
+TODO annotations.
This directory should go away before the 1.0 release. It's just a staging
area so code submissions don't get lost while awaiting more thorough (and
diff --git a/toys/posix/cut.c b/toys/posix/cut.c
index ca014aea..bb2b22d4 100644
--- a/toys/posix/cut.c
+++ b/toys/posix/cut.c
@@ -3,7 +3,9 @@
* Copyright 2012 Ranjan Kumar <ranjankumar.bth@gmail.com>
* Copyright 2012 Kyungwan Han <asura321@gmail.com>
*
- * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cut.html
+ * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cut.html
+ *
+ * TODO: cleanup
USE_CUT(NEWTOY(cut, "b:|c:|f:|d:sn[!cbf]", TOYFLAG_USR|TOYFLAG_BIN))
diff --git a/toys/posix/du.c b/toys/posix/du.c
index c72019e2..43029973 100644
--- a/toys/posix/du.c
+++ b/toys/posix/du.c
@@ -3,6 +3,8 @@
* Copyright 2012 Ashwini Kumar <ak.ashwini@gmail.com>
*
* See http://opengroup.org/onlinepubs/9699919799/utilities/du.html
+ *
+ * TODO: cleanup
USE_DU(NEWTOY(du, "d#<0hmlcaHkKLsx[-HL][-kKmh]", TOYFLAG_USR|TOYFLAG_BIN))
diff --git a/toys/posix/touch.c b/toys/posix/touch.c
index bf96b793..c5ebbabf 100644
--- a/toys/posix/touch.c
+++ b/toys/posix/touch.c
@@ -2,7 +2,9 @@
*
* Copyright 2012 Choubey Ji <warior.linux@gmail.com>
*
- * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html
+ * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html
+ *
+ * TODO: have another go at merging the -t and -d stanzas
USE_TOUCH(NEWTOY(touch, "acd:mr:t:h[!dtr]", TOYFLAG_BIN))
diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c
index cde71f61..8178bf0c 100644
--- a/toys/posix/xargs.c
+++ b/toys/posix/xargs.c
@@ -3,6 +3,8 @@
* Copyright 2011 Rob Landley <rob@landley.net>
*
* See http://opengroup.org/onlinepubs/9699919799/utilities/xargs.html
+ *
+ * TODO: Rich's whitespace objection, env size isn't fixed anymore.
USE_XARGS(NEWTOY(xargs, "^I:E:L#ptxrn#<1s#0", TOYFLAG_USR|TOYFLAG_BIN))