OSDN Git Service
Elliott Hughes [Sat, 18 Apr 2015 20:40:26 +0000 (13:40 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Xavier Roche [Sat, 18 Apr 2015 01:18:30 +0000 (20:18 -0500)]
Link against libattr and libsmack.
Elliott Hughes [Fri, 17 Apr 2015 07:52:11 +0000 (02:52 -0500)]
Fix a trivial typo in www/about.html.
Sticky shift key...
Rob Landley [Fri, 17 Apr 2015 07:46:11 +0000 (02:46 -0500)]
Make toybox --version use the "git describe" info if it's available.
Elliott Hughes [Fri, 17 Apr 2015 02:21:02 +0000 (21:21 -0500)]
terminal_size should use LINES, not ROWS.
The shell's pseudo-variable is called LINES. This is true of at least
bash and mksh.
Rob Landley [Fri, 17 Apr 2015 01:10:23 +0000 (20:10 -0500)]
Shout from the rooftops that pending is not like other directories.
Rob Landley [Thu, 16 Apr 2015 01:53:00 +0000 (20:53 -0500)]
Put SELINUX in a a menu, and add config option for SMACK.
Elliott Hughes [Wed, 15 Apr 2015 18:40:14 +0000 (11:40 -0700)]
Regenerate generated files.
Change-Id: Ib06b41baacadd957260434b0d9b1217002e5a754
Rob Landley [Wed, 15 Apr 2015 00:37:55 +0000 (19:37 -0500)]
Yet more ps work. Still not there yet.
Elliott Hughes [Mon, 13 Apr 2015 18:16:49 +0000 (11:16 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Change-Id: Ibe0ccccb99218e9c1d00e8c41725ecbac1a068d6
Samuel Holland [Sun, 12 Apr 2015 21:00:16 +0000 (16:00 -0500)]
unshare: fix -r
Calling unshare(2) immediately puts us in the new namespace
with the "overflow" user and group ID. By calling geteuid()
and getegid() in handle_r() after calling unshare(), we try
to map that to root, which Linux refuses to let us do.
What we really want to map to root is the caller's uid/gid
in the original namespace. So we have to save them before
calling unshare().
Rob Landley [Sun, 12 Apr 2015 11:17:11 +0000 (06:17 -0500)]
Before trying to remount read only, see if block device responds to "become rw"
ioctl(). (This is a thing Android's old mount already does.)
Elliott Hughes [Tue, 7 Apr 2015 21:07:46 +0000 (14:07 -0700)]
Implement Android restorecon.
On Android, much of the restorecon logic is in libselinux, so this
isn't portable. We do want to be able to build on the host for
testing *other* toys, though, so #if keeps this building.
Change-Id: Ida5a6713a926140c549d5770d62798f4aedca748
Elliott Hughes [Tue, 7 Apr 2015 20:11:55 +0000 (13:11 -0700)]
Fix load_policy error reporting.
Also switch to xopen for O_CLOEXEC paranoia and to avoid a conditional.
Change-Id: Iee5c4c124bcac800313f586768ffcaade542bd22
Elliott Hughes [Tue, 7 Apr 2015 20:08:51 +0000 (13:08 -0700)]
getenforce takes no arguments.
Change-Id: Icbee1df8b316039c68ef326f9d4d80f32c603b21
Elliott Hughes [Tue, 7 Apr 2015 20:07:47 +0000 (13:07 -0700)]
setenforce takes exactly one argument.
Change-Id: I83c478ea9ddd456c61e3f0f99506a1028a7027a1
Elliott Hughes [Fri, 10 Apr 2015 22:04:28 +0000 (17:04 -0500)]
Make more(1) usable.
> Yes, I know, "don't use pending". Sadly, more(1) is pretty useless
> without this. It gets confused by long lines or tabs.
>
> This patch also adds the missing prompt between multiple files.
actually, it looks like we're already hard-coding some escape
sequences? more(1) doesn't need anything that isn't in ANSI, so here's
an alternative patch that fixes the same bugs as the other patch but
also has a reverse-video prompt:
Elliott Hughes [Fri, 10 Apr 2015 21:57:54 +0000 (16:57 -0500)]
Update www/roadmap.html with Android progress.
Not much progress this week. Just route and umount.
Also remove a stray reference to load_policy which already switched.
Also remove an outdated claim that Android logging is done in the
kernel. It's been in userspace for a while now.
Rob Landley [Fri, 10 Apr 2015 05:14:56 +0000 (00:14 -0500)]
Tweak .gitignore.
Rob Landley [Tue, 7 Apr 2015 19:59:32 +0000 (14:59 -0500)]
Tweak README
Rob Landley [Tue, 7 Apr 2015 19:57:55 +0000 (14:57 -0500)]
Update multiplexer help text for --version
Elliott Hughes [Wed, 8 Apr 2015 17:53:59 +0000 (10:53 -0700)]
Switch to toybox getprop and regenerate generated files.
Change-Id: Ic9ee4d9411bd8904546358db3768d95183be0e82
Rob Landley [Wed, 8 Apr 2015 09:20:31 +0000 (04:20 -0500)]
Revert last mdev commit because it copied code out of a GPLv2 program.
Guys, you CANNOT COPY CODE FROM BUSYBOX. I don't care if I was the initial
author of that file, other people have touched it since.
I know I added "pending" because I couldn't keep up with code review in
realtime and stuff was getting lost, so we needed a place to park things
before they underwent the full dorodango process. I also know none of the
binaries I distribute has anything in pending enabled. But dude, if I'm going
to find stuff like this I have to start reviewing the code BEFORE applying
it to pending, and we all know where that leads.
Please don't do this again.
Elliott Hughes [Wed, 8 Apr 2015 04:41:32 +0000 (21:41 -0700)]
Implement getprop for toybox.
Change-Id: I10cff49b7c09e9d93b3d53848f2e7d590a045405
Elliott Hughes [Wed, 8 Apr 2015 03:36:38 +0000 (20:36 -0700)]
Really switch to toybox setprop.
(I forgot to add the symbolic link.)
Change-Id: Iee0dc95ff5c3d848d37861d223b33213588b10f7
Elliott Hughes [Wed, 8 Apr 2015 00:42:12 +0000 (17:42 -0700)]
Switch to toybox setprop and regenerate generated files.
Change-Id: I63efaef8d27de661eac497a106e2c2c0cac8a9bb
Elliott Hughes [Tue, 7 Apr 2015 22:46:00 +0000 (15:46 -0700)]
Implement setprop for toybox.
Because bionic/libcutils doesn't wait for init, I've duplicated a lot
of the input validation that init does so we can give good error messages.
Change-Id: I175421f7409f88813b88109f58825ce5649f1550
Elliott Hughes [Tue, 7 Apr 2015 21:51:26 +0000 (14:51 -0700)]
Switch to toybox restorecon and regenerate generated files.
Change-Id: If77674a3fb5e0d86193bdcf8850459eef689fba7
Elliott Hughes [Tue, 7 Apr 2015 21:07:46 +0000 (14:07 -0700)]
Implement Android restorecon.
On Android, much of the restorecon logic is in libselinux, so this
isn't portable. We do want to be able to build on the host for
testing *other* toys, though, so #if keeps this building.
Change-Id: Ida5a6713a926140c549d5770d62798f4aedca748
Elliott Hughes [Tue, 7 Apr 2015 20:18:32 +0000 (20:18 +0000)]
Merge "Fix load_policy error reporting."
Elliott Hughes [Tue, 7 Apr 2015 20:14:41 +0000 (13:14 -0700)]
Regenerate generated files.
Change-Id: Id31feaf9e432c29bbd345f1f68ba0ae749005ffb
Elliott Hughes [Tue, 7 Apr 2015 20:13:45 +0000 (20:13 +0000)]
Merge "getenforce takes no arguments."
Elliott Hughes [Tue, 7 Apr 2015 20:11:55 +0000 (13:11 -0700)]
Fix load_policy error reporting.
Also switch to xopen for O_CLOEXEC paranoia and to avoid a conditional.
Change-Id: Iee5c4c124bcac800313f586768ffcaade542bd22
Elliott Hughes [Tue, 7 Apr 2015 20:08:51 +0000 (13:08 -0700)]
getenforce takes no arguments.
Change-Id: Icbee1df8b316039c68ef326f9d4d80f32c603b21
Elliott Hughes [Tue, 7 Apr 2015 20:07:47 +0000 (13:07 -0700)]
setenforce takes exactly one argument.
Change-Id: I83c478ea9ddd456c61e3f0f99506a1028a7027a1
Rob Landley [Tue, 7 Apr 2015 16:54:36 +0000 (11:54 -0500)]
Adding --version broke ./toybox command list. (Oops.)
Rob Landley [Mon, 6 Apr 2015 01:00:33 +0000 (20:00 -0500)]
Announce switch to git.
Rob Landley [Mon, 6 Apr 2015 00:23:36 +0000 (19:23 -0500)]
Add --version to multiplexer.
Can't think of a better place to stick the actual version info than a #define
at the top of main. Makefile and toys.h are equally awkward, querying git
tags wouldn't work if building a release tarball... watch me forget to update
this when cutting a release.
Rob Landley [Mon, 6 Apr 2015 00:21:39 +0000 (19:21 -0500)]
Bite the bullet and switch over to git.
Elliott Hughes [Sun, 5 Apr 2015 17:14:19 +0000 (10:14 -0700)]
Upstream has moved to git.
Change-Id: Ie895a06e69b55982b7099a9b3107af369b5eefde
Paul Barker [Sat, 4 Apr 2015 16:58:06 +0000 (11:58 -0500)]
To ensure that toybox can be installed alongside busybox without
confusing update-alternatives, the paths of the links installed by toybox should
match those installed by busybox. This is accomplished by changing the flags
of a few tools within toybox.
Rob Landley [Sat, 4 Apr 2015 06:26:58 +0000 (01:26 -0500)]
Another in-progress ps snapshot.
Rob Landley [Fri, 3 Apr 2015 16:49:31 +0000 (11:49 -0500)]
Add readfileat() to lib
Rob Landley [Fri, 3 Apr 2015 16:46:44 +0000 (11:46 -0500)]
ps checkpoint du jour. Does not work yet.
Elliott Hughes [Fri, 3 Apr 2015 04:27:05 +0000 (21:27 -0700)]
Switch to toybox umount.
Change-Id: I0714a9c83fabef22623596f42028303337f8f5fb
Rob Landley [Thu, 2 Apr 2015 20:07:36 +0000 (15:07 -0500)]
Redoing ps from scratch. Random checkpoint that probably doesn't even compile.
Checking in a stopping point where I figured out what I did wrong, before changing it.
Elliott Hughes [Mon, 30 Mar 2015 18:25:18 +0000 (11:25 -0700)]
Switch to toybox route.
Change-Id: I20ef956379fb13cf11891564b232df9dfb43be39
Elliott Hughes [Mon, 30 Mar 2015 01:20:13 +0000 (18:20 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Sun, 29 Mar 2015 18:42:22 +0000 (11:42 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Rob Landley [Sun, 29 Mar 2015 17:03:46 +0000 (12:03 -0500)]
Add head test for -123.
Rob Landley [Sun, 29 Mar 2015 17:01:30 +0000 (12:01 -0500)]
Fix head bug pointed out by felix janda (recent -123 code broke first file argument of -n).
Rob Landley [Sun, 29 Mar 2015 01:21:03 +0000 (20:21 -0500)]
Fix sed bug David Halls hit trying to compile libiconv.
Elliott Hughes [Sat, 28 Mar 2015 19:49:31 +0000 (12:49 -0700)]
Regenerate generated files after toybox sync.
Change-Id: Ie46c47811c74decd114bfc0d0cbbc600916fa13e
Elliott Hughes [Sat, 28 Mar 2015 19:35:29 +0000 (12:35 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Rob Landley [Sat, 28 Mar 2015 18:22:27 +0000 (13:22 -0500)]
Fix printf bug (%.s should be %.0s not %s) reported by Isabella Parakiss.
Elliott Hughes [Sat, 28 Mar 2015 18:13:42 +0000 (13:13 -0500)]
Fix an obvious typo in Makefile.
Elliott Hughes [Sat, 28 Mar 2015 07:53:08 +0000 (02:53 -0500)]
update the Android section of roadmap.html
Four obsolete tools were removed from Android, and runcon moved to toybox.
Rob Landley [Sat, 28 Mar 2015 03:03:13 +0000 (22:03 -0500)]
Promote setenforce to android.
Rob Landley [Sat, 28 Mar 2015 03:00:17 +0000 (22:00 -0500)]
Cleanup setenforce.
Rob Landley [Sat, 28 Mar 2015 02:54:58 +0000 (21:54 -0500)]
Promote getenforce.
Rob Landley [Sat, 28 Mar 2015 02:52:24 +0000 (21:52 -0500)]
Cleanup getenforce.
Rob Landley [Sat, 28 Mar 2015 02:41:14 +0000 (21:41 -0500)]
Flag to make llvm shut up about a broken warning.
Rob Landley [Sat, 28 Mar 2015 02:25:44 +0000 (21:25 -0500)]
tail: add old -123 support and comment out #-f until it's actually implemented.
Rob Landley [Sat, 28 Mar 2015 01:50:28 +0000 (20:50 -0500)]
Promote load_policy to android.
Rob Landley [Sat, 28 Mar 2015 01:48:12 +0000 (20:48 -0500)]
Minor cleanup of load_policy.
Rob Landley [Thu, 26 Mar 2015 18:25:20 +0000 (13:25 -0500)]
Explain the craptacular nature of kconfig, and the plan to replace it.
Bernhard Rosenkr?nzer [Wed, 25 Mar 2015 18:46:34 +0000 (13:46 -0500)]
Fix toybox build with C99 compilers
toybox "make menuconfig" currently fails to build if the compiler is in C99
mode (clang 3.6 and gcc 5.0 snapshots default to C99 mode, you can also
reproduce the failure with older gcc by using 'make menuconfig HOSTCC="gcc
-std=gnu99"').
The problem is that inline semantics changed in C99, and kconf_id_lookup's
inline-ness depends on C89 semantics there.
Elliott Hughes [Tue, 24 Mar 2015 19:17:03 +0000 (14:17 -0500)]
Implement load_policy.
Note that this is a case where Android's tool isn't the same as the
usual tool. Ours takes an explicit file containing the policy to be
loaded. restorecon is at least command-line compatible, but the
implementation is all in Android's libselinux where there's a
selinux_android_restorecon function.
Elliott Hughes [Tue, 24 Mar 2015 00:53:47 +0000 (17:53 -0700)]
Regenerate generated files after toybox sync.
Also build toybox runcon.
Change-Id: Ib0db1472e4dbc5d9ac3a3ba1c9732db4c4e3f963
Elliott Hughes [Mon, 23 Mar 2015 23:48:01 +0000 (16:48 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Mon, 23 Mar 2015 21:35:00 +0000 (14:35 -0700)]
Regenerate generated files for toybox sync.
Change-Id: I210b0f17a96ee9947817ce7ad4a25016aabdaf30
Elliott Hughes [Mon, 23 Mar 2015 21:25:36 +0000 (14:25 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD
Rob Landley [Mon, 23 Mar 2015 18:45:47 +0000 (13:45 -0500)]
Promote runcon to android (and add an android menu).
Rob Landley [Mon, 23 Mar 2015 18:09:48 +0000 (13:09 -0500)]
Trivial runcon cleanups.
Elliott Hughes [Mon, 23 Mar 2015 17:46:20 +0000 (12:46 -0500)]
Add runcon(1).
Elliott Hughes [Mon, 23 Mar 2015 17:39:05 +0000 (12:39 -0500)]
add missing space in dd output
Also, coreutils says "s" instead of "seconds". POSIX specifies the
format of the previous two lines, but doesn't even mention this line.
Rob Landley [Mon, 23 Mar 2015 16:49:58 +0000 (11:49 -0500)]
Tweak of Elliott Hughes's fix for an off by one error in human_readable
(137 returned "137 KB".)
Elliott Hughes [Mon, 23 Mar 2015 16:44:56 +0000 (11:44 -0500)]
Update the Android section of the roadmap.
I've removed the reference to fs_mgr, since that's really part of vold
rather than a subset of mount(1), and I've removed the reference to
ifconfig because we're already using the toybox ifconfig and the
reference in this document to the Android command that it referred to
(netcfg) was already removed.
Rob Landley [Sat, 21 Mar 2015 22:15:09 +0000 (17:15 -0500)]
Another bug from David Halls: find -exec wasn't consuming its argument when it didn't activate.
test: find . -name README -exec echo one '{}' ';' -or -exec echo two '{}' ';'
Rob Landley [Sat, 21 Mar 2015 20:49:38 +0000 (15:49 -0500)]
install -D bugfix from David Halls.
(I tweaked some comment text while I was there.)
Rob Landley [Sat, 21 Mar 2015 20:29:21 +0000 (15:29 -0500)]
Patch from David Halls to fix mac/ios portability issue.
Elliott Hughes [Fri, 20 Mar 2015 05:52:46 +0000 (22:52 -0700)]
Add toybox pgrep/pkill.
This is a better alternative to the toybox ps' simple name filtering.
It's much more scriptable too. And pkill makes one of the common uses
directly available.
Change-Id: I92529b68edd136fb8676029abbcc3a9c4d56f218
Rob Landley [Thu, 19 Mar 2015 18:57:02 +0000 (13:57 -0500)]
Add -123 support to head (suggested by Elliott Hughes).
Hyejin Kim [Wed, 18 Mar 2015 21:32:01 +0000 (16:32 -0500)]
mdev : add hotplugin feature
As internal needs, Ranjan Kumar (ranjankumar.bth at gmail.com) added hotplug
feature into mdev.
Rob Landley [Mon, 16 Mar 2015 18:27:16 +0000 (13:27 -0500)]
Fix mount -a segfault without -O, reported by Janus Troelsen.
Rob Landley [Mon, 16 Mar 2015 18:25:29 +0000 (13:25 -0500)]
Rename a function to better describe what it does.
Hyejin Kim [Mon, 16 Mar 2015 00:29:15 +0000 (19:29 -0500)]
I added error handling code in write_rotate().
I think that it is better to check tf->logfd before doing
truncate()/write() and getting error.
Rob Landley [Sat, 14 Mar 2015 17:34:14 +0000 (12:34 -0500)]
More ps cleanup, mostly refactoring.
Rob Landley [Sat, 14 Mar 2015 02:33:34 +0000 (21:33 -0500)]
Minor ps refactoring.
Rob Landley [Sat, 14 Mar 2015 02:17:33 +0000 (21:17 -0500)]
Clean up sort help text.
Use tabs for option indent and don't have -g show up in menu (TOYBOX_FLOAT is
the decision).
Elliott Hughes [Fri, 13 Mar 2015 23:16:20 +0000 (23:16 +0000)]
Merge "Add missing entries to .gitignore."
Elliott Hughes [Fri, 13 Mar 2015 21:51:28 +0000 (14:51 -0700)]
Add missing entries to .gitignore.
Change-Id: I61d88e62f4be45fc7b6161c370d373efd74ebca3
Elliott Hughes [Fri, 13 Mar 2015 21:49:52 +0000 (14:49 -0700)]
Add instructions about how to add a toy.
Change-Id: I8080db4f2d205760880cece72c21a0dd32ec1c78
Rob Landley [Thu, 12 Mar 2015 20:34:03 +0000 (15:34 -0500)]
Switch nsenter to default y.
Rob Landley [Thu, 12 Mar 2015 20:32:50 +0000 (15:32 -0500)]
Implement shred -u and switch to default y in defconfig.
Rob Landley [Thu, 12 Mar 2015 20:16:13 +0000 (15:16 -0500)]
Remove cat -v help text debris.
Rob Landley [Thu, 12 Mar 2015 19:27:36 +0000 (14:27 -0500)]
The time command depends on floating point support.
Rob Landley [Thu, 12 Mar 2015 19:21:33 +0000 (14:21 -0500)]
Make find accept numeric uid/gid, and simplify makedevs using the new infrastructure.
Rob Landley [Thu, 12 Mar 2015 19:20:10 +0000 (14:20 -0500)]
Make install support numeric uid/gids (reported by Kylie McClain).
Rob Landley [Thu, 12 Mar 2015 16:11:08 +0000 (11:11 -0500)]
Factor out xgetgrnamid() and xgetpwnamid() into xwrap.c.