aboutsummaryrefslogtreecommitdiff
path: root/coreutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Patch from Shaun Jackman:landley2005-05-091-22/+15
| | | | | | | | | | | | | | | | | | | | | > This patch modfies expr to use portable POSIX regex rather than BSD > regex. ... > This updated patch implements an anchored regex by checking that the > match starts at offset 0. More to the point, this patch uses the same regex that sed.c is already using (opportunity to suck in less library code), and even building a dynamically linked busybox with just expr the result is a slightly smaller binary (by 94 bytes, I dunno what nm --size-sort has to say about it because I didn't build with debug info, since that changes the binary size a lot by disabling optimization...) Your mileage may vary. Handle with caution. Do not taunt happy fun ball. git-svn-id: svn://busybox.net/trunk/busybox@10272 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Manuel points out that if printf needs a flush to act like dprintf, the resultlandley2005-05-071-2/+1
| | | | | | | | is bigger. Revert last patch. git-svn-id: svn://busybox.net/trunk/busybox@10268 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Shaun Jackman pointed out that dprintf(STDOUT_FILENO,...) is just a printf.landley2005-05-071-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10263 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A patch from Takeharu KATO to update/fix SE-Linux support.landley2005-05-032-36/+41
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10238 69ca8d6d-28ef-0310-b511-8ec308f3f277
* On Wednesday 13 April 2005 09:12 pm, Shaun Jackman wrote:landley2005-04-301-26/+13
| | | | | | | | | > This patch fixes a memory leak in hash_file by using the BUFFER macros > instead of xmalloc. Please apply. git-svn-id: svn://busybox.net/trunk/busybox@10207 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Matthew S. Wood:landley2005-04-291-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | > The following patch adds support for the -S and -b flags to `ln'. These > flags [especially -b] are used extensively in Debian pre and post > installation scripts. Comments from Vladimir Oleynik influenced the final patch, and I also ripped out the in-file changelog since it belongs here. At the time, it said: /* Apr 15, 2004 Matthew S. Wood (mwood@realmsys.com) * * Implement '-b' (backup) flag. * Implement '-S' (backup suffix) flag. * * * Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) * * Fixed bug involving -n option. Essentially, -n was always in effect. */ git-svn-id: svn://busybox.net/trunk/busybox@10202 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix stupid build mistake i made earlier as pointed out by psmvapier2005-04-261-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10182 69ca8d6d-28ef-0310-b511-8ec308f3f277
* rework human_fstype to cut down sizevapier2005-04-241-78/+47
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10170 69ca8d6d-28ef-0310-b511-8ec308f3f277
* rework options to get rid of extra variablesvapier2005-04-241-15/+11
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10169 69ca8d6d-28ef-0310-b511-8ec308f3f277
* stat implementation based upon coreutilsvapier2005-04-233-0/+615
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10163 69ca8d6d-28ef-0310-b511-8ec308f3f277
* cast the time pointer so gcc stops warning over nothingvapier2005-04-231-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10153 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use bb_fflush_stdout_and_exit instead of exitvapier2005-04-231-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10152 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grab sum from coreutils, clean it up, and make it busybox happyvapier2005-04-213-0/+189
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10148 69ca8d6d-28ef-0310-b511-8ec308f3f277
* add a printenv implementationvapier2005-04-213-0/+59
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10147 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix whitespacevapier2005-04-211-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10146 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Bernhard Fischer to make a bunch of symbols staticandersen2005-04-162-4/+4
| | | | | | | which were otherwise cluttering the global namespace. git-svn-id: svn://busybox.net/trunk/busybox@10121 69ca8d6d-28ef-0310-b511-8ec308f3f277
* In Bug 208, bernhardf writes:vapier2005-04-161-2/+2
| | | | | | | | | On machines with only ANSI compliant compilers, not explitily delcaring an empty parameter list 'void' causes failure. git-svn-id: svn://busybox.net/trunk/busybox@10113 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fake out support for POSIX -H and -L options since busybox cp dereferences ↵vapier2005-04-141-5/+13
| | | | | | everything by default git-svn-id: svn://busybox.net/trunk/busybox@10097 69ca8d6d-28ef-0310-b511-8ec308f3f277
* add aliases == and [[ for = and [ to support more bash scriptsvapier2005-04-141-1/+7
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10096 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add 'nice' and replace 'renice' with a new implementation.mjn32005-02-133-0/+93
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9868 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Sort rewrite to be SUSv3 compliant. New config option, updated help, andlandley2005-01-242-56/+306
| | | | | | | a couple of infrastructure bits. git-svn-id: svn://busybox.net/trunk/busybox@9767 69ca8d6d-28ef-0310-b511-8ec308f3f277
* cp: make -P a synonym for -dvapier2005-01-071-1/+7
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9650 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from David Daney:andersen2004-10-111-0/+9
| | | | | | | | | | | It seems that date -s MMDDHHMMYYYY.ss will ignore the .ss part. This patch tries to fix the problem. David Daney. git-svn-id: svn://busybox.net/trunk/busybox@9406 69ca8d6d-28ef-0310-b511-8ec308f3f277
* egor duda writes:andersen2004-10-084-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hi! I've created a patch to busybox' build system to allow building it in separate tree in a manner similar to kbuild from kernel version 2.6. That is, one runs command like 'make O=/build/some/where/for/specific/target/and/options' and everything is built in this exact directory, provided that it exists. I understand that applyingc such invasive changes during 'release candidates' stage of development is at best unwise. So, i'm currently asking for comments about this patch, starting from whether such thing is needed at all to whether it coded properly. 'make check' should work now, and one make creates Makefile in build directory, so one can run 'make' in build directory after that. One possible caveat is that if we build in some directory other than source one, the source directory should be 'distclean'ed first. egor git-svn-id: svn://busybox.net/trunk/busybox@9320 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from William Barsse to fix a segfault when multiple files are specified.bug12004-09-301-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9287 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from David Daney to make the -i option work with -l.bug12004-09-241-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9273 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add a missing brace, patch by Hideki IWAMOTObug12004-09-151-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9257 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito writes,bug12004-09-151-41/+35
| | | | | | | | "This patch fixes all the bugs in id previously spotted by vodz and me. The binary size increased a bit, but now it should work as expected." git-svn-id: svn://busybox.net/trunk/busybox@9256 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch by Felipe Kellermann, use the common escape handling function and ↵bug12004-09-151-133/+21
| | | | | | remove some unused code. git-svn-id: svn://busybox.net/trunk/busybox@9254 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito writes:andersen2004-09-022-67/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Erik, Hi to all, This is part five of the my_get*id story. I've tweaked a bit this two functions to make them more flexible, but this changes will not affect existing code. Now they work so: 1) my_getpwuid( char *user, uid_t uid, int bufsize) if bufsize is > 0 char *user cannot be set to NULL on success username is written on static allocated buffer on failure uid as string is written to buffer and NULL is returned if bufsize is = 0 char *user can be set to NULL on success username is returned on failure NULL is returned if bufsize is < 0 char *user can be set to NULL on success username is returned on failure an error message is printed and the program exits 2) 1) my_getgrgid( char *group, uid_t uid, int bufsize) if bufsize is > 0 char *group cannot be set to NULL on success groupname is written on static allocated buffer on failure gid as string is written to buffer and NULL is returned if bufsize is = 0 char *group can be set to NULL on success groupname is returned on failure NULL is returned if bufsize is < 0 char *group can be set to nULL on success groupname is returned on failure an error message is printed and the program exits This changes were needed mainly for my new id applet. It is somewhat bigger then the previous but matches the behaviour of GNU id and is capable to handle usernames of whatever length. BTW: at a first look it seems to me that it will integrate well (with just a few changes) with the pending patch in patches/id_groups_alias.patch. The increase in size is balanced by the removal of my_getpwnamegid.c from libbb as this was used only in previous id applet and by size optimizations made possible in whoami.c and in passwd.c. I know that we are in feature freeze but I think that i've tested it enough (at least I hope so.......). git-svn-id: svn://busybox.net/trunk/busybox@9194 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixup some warningsandersen2004-08-281-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9180 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito writes:andersen2004-08-261-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Hi, I've fixed also the issue of whoami cutting down usernames. This time I cannot send a diff because i don't know if my previous patches will be applied or not, so I send in the whole file. The changes I've made don't affect size but ensure that usernames of whatever lenght are correctly displayed. root@localhost:/dev/pts/3:/root/Desktop/busybox/coreutils# size whoami_orig.o text data bss dec hex filename 102 0 0 102 66 whoami_orig.o root@localhost:/dev/pts/3:/root/Desktop/busybox/coreutils# size whoami.o text data bss dec hex filename 93 0 0 93 5d whoami.o This should be applied even if the other patches aren't as this matches the behaviour of the GNU whoami. Thanks in advance, Ciao, Tito git-svn-id: svn://busybox.net/trunk/busybox@9168 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito writes:andersen2004-08-263-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, I've spent the half night staring at the devilish my_getpwuid and my_getgrgid functions trying to find out a way to avoid actual and future potential buffer overflow problems without breaking existing code. Finally I've found a not intrusive way to do this that surely doesn't break existing code and fixes a couple of problems too. The attached patch: 1) changes the behaviour of my_getpwuid and my_getgrgid to avoid potetntial buffer overflows 2) fixes all occurences of this function calls in tar.c , id.c , ls.c, whoami.c, logger.c, libbb.h. 3) The behaviour of tar, ls and logger is unchanged. 4) The behavior of ps with somewhat longer usernames messing up output is fixed. 5) The only bigger change was the increasing of size of the buffers in id.c to avoid false negatives (unknown user: xxxxxx) with usernames longer than 8 chars. The value i used ( 32 chars ) was taken from the tar header ( see gname and uname). Maybe this buffers can be reduced a bit ( to 16 or whatever ), this is up to you. 6) The increase of size of the binary is not so dramatic: size busybox text data bss dec hex filename 239568 2300 36816 278684 4409c busybox size busybox_fixed text data bss dec hex filename 239616 2300 36816 278732 440cc busybox 7) The behaviour of whoami changed: actually it prints out an username cut down to the size of the buffer. This could be fixed by increasing the size of the buffer as in id.c or avoid the use of my_getpwuid and use getpwuid directly instead. Maybe this colud be also remain unchanged...... Please apply if you think it is ok to do so. The diff applies on today's cvs tarball (2004-08-25). Thanks in advance, Ciao, Tito git-svn-id: svn://busybox.net/trunk/busybox@9165 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Bastian Blank to add 64 bit support to the test command.bug12004-08-112-14/+35
| | | | | | | Example of broken usage: ./busybox test 2147483648 -gt 2147483648 git-svn-id: svn://busybox.net/trunk/busybox@9084 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tito, farmatito at tiscali dot it writes:andersen2004-08-031-1/+1
| | | | | | | | | | | | | | Hi to all, This patch is useful for: 1) remove an unused var from extern char *find_real_root_device_name(const char* name) changing it to extern char *find_real_root_device_name(void). 2) fixes include/libbb.h, coreutils/df.c, util-linux/mount.c and util-linux/umount.c accordingly. 3) fixes a bug, really a false positive, in find_real_root_device_name() that happens if in the /dev directory exists a link named root (/dev/root) that should be skipped but is not. This affects applets like df that display wrong results git-svn-id: svn://busybox.net/trunk/busybox@9056 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixup getty, login, etc so the utmp and wtmp are updated, allowingandersen2004-07-301-0/+1
| | | | | | | | the 'who' and 'last' applets among other things to work as expected. -Erik git-svn-id: svn://busybox.net/trunk/busybox@9047 69ca8d6d-28ef-0310-b511-8ec308f3f277
* BusyBox has no business hard coding the number of major and minor bits for aandersen2004-07-261-7/+3
| | | | | | | | | | | | dev_t. This is especially important now that the user space concept of a dev_t and the kernel concept of a dev_t are divergant. The only bit of user space allowed to know the number of major and minor bits is include/sys/sysmacros.h (i.e. part of libc). When used with a current C library and a 2.6.x kernel, this fix should allow BusyBox to support wide device major/minor numbers. -Erik git-svn-id: svn://busybox.net/trunk/busybox@9015 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Felipe Kellermann, fix endless loop when first > last andbug12004-07-231-6/+13
| | | | | | | increment > 0. git-svn-id: svn://busybox.net/trunk/busybox@9010 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Felipe Kellermann writes,bug12004-07-231-5/+5
| | | | | | | | | | | "As noticed today by Steven Scholz, the od's `-v' was broken. I've fixed that and now both the flags `-v' and `-a' are OK" Fixes a segfault in echo "uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu\02bar\4"| ./busybox od -av git-svn-id: svn://busybox.net/trunk/busybox@9004 69ca8d6d-28ef-0310-b511-8ec308f3f277
* If read were to return with an error, bad things would happen. Fix it.mjn32004-05-261-2/+6
| | | | | | | Also, make sure read errors are reflected in the applet exit code. git-svn-id: svn://busybox.net/trunk/busybox@8879 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use STDIN_FILENO rather than '0'andersen2004-05-261-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8871 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Rob Landley writes:andersen2004-05-261-1/+1
| | | | | | | | | | | Run this test, against both busybox and a non-busybox version of "tee". while true; do i=$[$i+1]; echo "hello $i"; sleep 1; done | ./busybox tee Now run the busybox one again with the following small patch applied: git-svn-id: svn://busybox.net/trunk/busybox@8869 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Steve Grubb writes:andersen2004-05-051-1/+3
| | | | | | | | | | | | | | Hi, I just re-reviewed the patch I just sent...and it needed to be BUFSIZ-3 in dos2unix.c . tempFn is BUFSIZ so the last addressable spot it BUFSIZ-1. The loop increments by 2. That's why it should be BUFSIZ-3. Best Regards, Steve Grubb git-svn-id: svn://busybox.net/trunk/busybox@8805 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Steve Grubb writes:andersen2004-05-051-1/+1
| | | | | | | | | | | | | | Hello, I found and patched 2 more bugs. The first is a misplaced semi-colon. The second one is a buffer overflow. I doubt the buffer overflow is triggered in real life. But you never know what those wily hackers are up to. Thanks, Steve Grubb git-svn-id: svn://busybox.net/trunk/busybox@8804 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update my email address, document some of my tasks in the AUTHORS filebug12004-04-253-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8782 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Thats odd. I guess this was cut-n-paste error, but vodzandersen2004-04-161-1/+1
| | | | | | | email address was wrong! git-svn-id: svn://busybox.net/trunk/busybox@8765 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Larry Doolittle writes:andersen2004-04-1410-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry git-svn-id: svn://busybox.net/trunk/busybox@8759 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix non standard 'date -R' formattingandersen2004-04-061-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8691 69ca8d6d-28ef-0310-b511-8ec308f3f277
* s/fileno\(stdin\)/STDIN_FILENO/gandersen2004-03-272-5/+5
| | | | | | | s/fileno\(stdout\)/STDOUT_FILENO/g git-svn-id: svn://busybox.net/trunk/busybox@8663 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Brian Pomerantz writes:andersen2004-03-231-1/+1
| | | | | | | | | | | | | | | | | | | I've noticed a bug in the "autowidth" feature more, and is probably in others. The call to the function get_terminal_width_height() passes in a file descriptor but that file descriptor is never used, instead the ioctl() is called with 0. In more_main() the call to get_terminal_width_height() passes 0 as the file descriptor instead of fileno(cin). This isn't a problem when you more a file (e.g. "more /etc/passwd") but when you pipe a file to it (e.g. "cat /etc/passwd | more") the size of the terminal cannot be determined because file descriptor 0 is not a terminal. The fix is simple, I've attached a patch for more.c and get_terminal_width_height.c. BAPper git-svn-id: svn://busybox.net/trunk/busybox@8656 69ca8d6d-28ef-0310-b511-8ec308f3f277