diff options
author | Rob Landley <rob@landley.net> | 2015-05-31 05:11:28 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-05-31 12:12:35 -0500 |
commit | f033f8607f156464747abe57487c1f6226f94001 (patch) | |
tree | a6df1d5b20e886662c29dd422fcef344f12955d5 /toys | |
parent | 42cc29c7883c852462c6c740c72eff06bca8accc (diff) | |
download | toybox-f033f8607f156464747abe57487c1f6226f94001.tar.gz toybox-f033f8607f156464747abe57487c1f6226f94001.tar.bz2 toybox-f033f8607f156464747abe57487c1f6226f94001.zip |
Move the magic list of commands needing cleanup from toys/pending/README
to greppable TODO annotations in the individual files. (grep -riw TODO)
Diffstat (limited to 'toys')
-rw-r--r-- | toys/other/chroot.c | 5 | ||||
-rw-r--r-- | toys/other/login.c | 3 | ||||
-rw-r--r-- | toys/other/modinfo.c | 2 | ||||
-rw-r--r-- | toys/other/vconfig.c | 2 | ||||
-rw-r--r-- | toys/other/vmstat.c | 3 | ||||
-rw-r--r-- | toys/pending/README | 10 | ||||
-rw-r--r-- | toys/posix/cut.c | 4 | ||||
-rw-r--r-- | toys/posix/du.c | 2 | ||||
-rw-r--r-- | toys/posix/touch.c | 4 | ||||
-rw-r--r-- | toys/posix/xargs.c | 2 |
10 files changed, 27 insertions, 10 deletions
diff --git a/toys/other/chroot.c b/toys/other/chroot.c index e82dd80..4260d98 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 837dd97..b728286 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 a7e6b4b..3a7e821 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 eff918c..fd78527 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 eed7945..c11e46b 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 0257e2b..2eb83e1 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 ca014ae..bb2b22d 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 c72019e..4302997 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 bf96b79..c5ebbab 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 cde71f6..8178bf0 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)) |