Age | Commit message (Collapse) | Author |
|
|
|
|
|
symfollow true/false.)
|
|
under traversal. Pass through full flag set in dirtree_add_node(), add
dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot
of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
|
|
LLVM has its own nuts warnings about things that aren't wrong, but disabling
them with the relevant -Wno-* warning disabling command line option drives
gcc nuts because it's a command line option it doesn't recognize. (gcc 4.2.1
dies with an error. gcc 4.6 warns about it _only_ if it's warning about
something else. (PICK ONE, either you warn about this or you don't, distract
people from actual problems with noise about something clearly unrelated to
what just changed is extra-stupid.)
So just probe for it, and add the flag only if it doesn't complain about it
while we're producing an unrelated warning.
|
|
|
|
Previously we'd go into an infinite loop because we weren't
incrementing optargs.
Also add a missing flush so an error on stderr won't overtake the
escape code that resets reverse video.
Disclaimer: the new behavior isn't exactly like the desktop version;
surprisingly they try to open the next file _before_ they prompt. That
feels weird to me as a user, and seems like it would lead to a more
awkward implementation, but if you're more concerned about
authenticity...
|
|
|
|
This patch uses lgetfilecon rather than fgetfilecon because
dirtree_parentfd always seems to return -1 in this function. If/when
the SMACK code is fixed to work with dirtree_parentfd, I'll send a
matching patch for SELinux.
In the meantime, this works, and although ls -h is still on my to-do
list, I think this patch is sufficient to let us replace toolbox ls
with toybox ls.
|
|
|
|
Need to come up with a better solution to this, but the problem is that
single.sh's symbol enabling isn't dependency aware, and "silentoldconfig"
prompts. I suspect the better solution is "write a kconfig replacement".
|
|
Use perror_exit to show the likely "Operation not permitted" if klogctl fails.
|
|
|
|
but, dumpleases read from "udhcpd.leases".
|
|
Use qstrcmp instead of alphasort (which expects struct dirent arguments).
Don't use perror_exit because property_list doesn't set errno.
|
|
|
|
parsing infrastructure segfaults because there's no next shortopt but the list isn't empty. (There was a test for this, but we're simultaneously traversing two lists and it was testing the wrong one.)
|
|
|
|
|
|
Behavior change in flags: allow -long to work together, and -l1 work like -l
not -1.
I didn't make ls -gCl remember the g, though. (Because -Cg and -gC take
the last one: I'll preserve explicit state but not implicit state. And if
-1Cl and -lC1 aren't going to behave the same, it wasn't consistent anyway.)
|
|
|
|
|
|
|
|
|
|
Option triggers printing security context,
for smack that is file's access smack label.
Change-Id: I9054d9bcfe4d149e8fbfa0831b6ab50165d2bd91
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No actual editing yet.
|
|
|
|
Test is 'echo "AAA c 1 0 0 2 5 0 0 1" | makedevs' makes AAA not AAA0.
|
|
(I commented out the android-only #include in getprop to do what compile
testing I could, and then forgot to uncomment it.)
|
|
alphasort), add compile-time probe for config symbol TOYBOX_ON_ANDROID.
|
|
Use DEVPATH, DEVNAME, MAJOR, MINOR, and SUBSYSTEM instead of
checking the current path and reading .../dev.
While we're here, probe for partitions in block devices.
This uses a very lame check for ACTION (which can be add, remove,
or change): if it is "remove", then unlink the device.
|
|
|
|
|
|
|
|
Sticky shift key...
|
|
|
|
The shell's pseudo-variable is called LINES. This is true of at least
bash and mksh.
|
|
|
|
|
|
|
|
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().
|
|
ioctl(). (This is a thing Android's old mount already does.)
|
|
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
|
|
Also switch to xopen for O_CLOEXEC paranoia and to avoid a conditional.
Change-Id: Iee5c4c124bcac800313f586768ffcaade542bd22
|